From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#14258: Can't compile 24.3 on AIX 6.1 Date: Fri, 26 Apr 2013 12:35:07 -0700 Organization: UCLA Computer Science Department Message-ID: <517AD6EB.4030708@cs.ucla.edu> References: <517A328E.7070208@cs.ucla.edu> <155DEC68569B714B86C2C7075F5EDA9828F0E37D@DAKIYA1.pegasus.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1367004967 31338 80.91.229.3 (26 Apr 2013 19:36:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Apr 2013 19:36:07 +0000 (UTC) Cc: 14258-done@debbugs.gnu.org To: Doug Lewan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 26 21:36:09 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UVoRC-0005RV-KI for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Apr 2013 21:36:06 +0200 Original-Received: from localhost ([::1]:39007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVoRC-0003hA-8z for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Apr 2013 15:36:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVoR7-0003gD-T4 for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2013 15:36:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVoR6-0004ST-Hp for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2013 15:36:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVoR6-0004SK-Df for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2013 15:36:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UVoR7-0006Z6-VG for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2013 15:36:01 -0400 Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Apr 2013 19:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 14258 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 14258@debbugs.gnu.org, eggert@cs.ucla.edu, dougl@shubertticketing.com Original-Received: via spool by 14258-done@debbugs.gnu.org id=D14258.136700492225131 (code D ref 14258); Fri, 26 Apr 2013 19:36:01 +0000 Original-Received: (at 14258-done) by debbugs.gnu.org; 26 Apr 2013 19:35:22 +0000 Original-Received: from localhost ([127.0.0.1]:45376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVoQS-0006XH-Rt for submit@debbugs.gnu.org; Fri, 26 Apr 2013 15:35:21 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:46524) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVoQP-0006Wy-4j for 14258-done@debbugs.gnu.org; Fri, 26 Apr 2013 15:35:19 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id DB1DA39E8105; Fri, 26 Apr 2013 12:35:13 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mm0CnKd+JaNT; Fri, 26 Apr 2013 12:35:11 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net [71.189.154.249]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B124439E8008; Fri, 26 Apr 2013 12:35:11 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130404 Thunderbird/17.0.5 In-Reply-To: <155DEC68569B714B86C2C7075F5EDA9828F0E37D@DAKIYA1.pegasus.local> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73745 Archived-At: On 04/26/2013 08:05 AM, Doug Lewan wrote: > 'xlc -O' worked! Thanks for checking. I installed the following patch to the trunk to try to make this go a bit easier in the next release, and I'm marking the bug as done. === modified file 'ChangeLog' --- ChangeLog 2013-04-22 05:08:36 +0000 +++ ChangeLog 2013-04-26 19:31:09 +0000 @@ -1,3 +1,10 @@ +2013-04-26 Paul Eggert + + Port better to AIX (Bug#14258). + * configure.ac (CFLAGS): Append -O if the user did not specify CFLAGS, + we did not already infer an optimization option, and -O works. + AIX xlc needs -O, otherwise garbage collection doesn't work. + 2013-04-22 Paul Eggert * make-dist: Do not distribute admin/unidata/Makefile. === modified file 'configure.ac' --- configure.ac 2013-04-18 17:12:21 +0000 +++ configure.ac 2013-04-26 19:31:09 +0000 @@ -613,10 +613,10 @@ dnl Amongst other things, this sets AR and ARFLAGS. gl_EARLY -# It's helpful to have C macros available to GDB, so prefer -g3 to -g -# if -g3 works and the user does not specify CFLAGS. -# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. if test "$ac_test_CFLAGS" != set; then + # It's helpful to have C macros available to GDB, so prefer -g3 to -g + # if -g3 works and the user does not specify CFLAGS. + # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. case $CFLAGS in '-g') emacs_g3_CFLAGS='-g3';; @@ -632,13 +632,29 @@ [emacs_cv_prog_cc_g3], [AC_LINK_IFELSE([AC_LANG_PROGRAM()], [emacs_cv_prog_cc_g3=yes], - [emacs_cv_prog_cc_g3=no])]) - if test $emacs_cv_prog_cc_g3 = yes; then - CFLAGS=$emacs_g3_CFLAGS - else + [emacs_cv_prog_cc_g3=no])]) + if test $emacs_cv_prog_cc_g3 != yes; then CFLAGS=$emacs_save_CFLAGS fi fi + + case $CFLAGS in + *-O*) ;; + *) + # No optimization flag was inferred for this non-GCC compiler. + # Try -O. This is needed for xlc on AIX; see Bug#14258. + emacs_save_CFLAGS=$CFLAGS + test -z "$CFLAGS" || CFLAGS="$CFLAGS " + CFLAGS=${CFLAGS}-O + AC_CACHE_CHECK([whether $CC accepts -O], + [emacs_cv_prog_cc_o], + [AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [emacs_cv_prog_cc_o=yes], + [emacs_cv_prog_cc_o=no])]) + if test $emacs_cv_prog_cc_o != yes; then + CFLAGS=$emacs_save_CFLAGS + fi ;; + esac fi AC_ARG_ENABLE([gcc-warnings], === modified file 'src/ChangeLog' --- src/ChangeLog 2013-04-24 15:09:49 +0000 +++ src/ChangeLog 2013-04-26 19:31:09 +0000 @@ -1,3 +1,9 @@ +2013-04-26 Paul Eggert + + Port better to AIX (Bug#14258). + * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too, + to pacify AIX xlc. + 2013-04-24 Kenichi Handa * coding.c (decode_coding_iso_2022): When an invalid escape === modified file 'src/lisp.h' --- src/lisp.h 2013-04-07 04:41:19 +0000 +++ src/lisp.h 2013-04-26 19:31:09 +0000 @@ -231,9 +231,9 @@ #define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 #define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0) -/* Stolen from GDB. The only known compiler that doesn't support - enums in bitfields is MSVC. */ -#ifdef _MSC_VER +/* Idea stolen from GDB. MSVC doesn't support enums in bitfields, + and xlc complains vociferously about them. */ +#if defined _MSC_VER || defined __IBMC__ #define ENUM_BF(TYPE) unsigned int #else #define ENUM_BF(TYPE) enum TYPE