emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112399: Port better to AIX.


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112399: Port better to AIX.
Date: Fri, 26 Apr 2013 12:31:09 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 112399
fixes bug: http://debbugs.gnu.org/14258
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Fri 2013-04-26 12:31:09 -0700
message:
  Port better to AIX.
  
  * 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.
  * src/lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
  to pacify AIX xlc.
modified:
  ChangeLog
  configure.ac
  src/ChangeLog
  src/lisp.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-04-22 05:08:36 +0000
+++ b/ChangeLog 2013-04-26 19:31:09 +0000
@@ -1,3 +1,10 @@
+2013-04-26  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        * make-dist: Do not distribute admin/unidata/Makefile.

=== modified file 'configure.ac'
--- a/configure.ac      2013-04-18 17:12:21 +0000
+++ b/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'
--- a/src/ChangeLog     2013-04-24 15:09:49 +0000
+++ b/src/ChangeLog     2013-04-26 19:31:09 +0000
@@ -1,3 +1,9 @@
+2013-04-26  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        * coding.c (decode_coding_iso_2022): When an invalid escape

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2013-04-07 04:41:19 +0000
+++ b/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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]