aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-04-26 12:31:09 -0700
committerPaul Eggert2013-04-26 12:31:09 -0700
commitf780d632f2047ccf07208081aa477882ef4ecc2a (patch)
tree2eee9afd1a4113ee2eeb2319807064eb2c68a992
parentff7210d55b30e175da1384ba707ce1340a0c4e11 (diff)
downloademacs-f780d632f2047ccf07208081aa477882ef4ecc2a.tar.gz
emacs-f780d632f2047ccf07208081aa477882ef4ecc2a.zip
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. Fixes: debbugs:14258
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac30
-rw-r--r--src/ChangeLog6
-rw-r--r--src/lisp.h6
4 files changed, 39 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f74726a743..cf1d4f0d54e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12013-04-26 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port better to AIX (Bug#14258).
4 * configure.ac (CFLAGS): Append -O if the user did not specify CFLAGS,
5 we did not already infer an optimization option, and -O works.
6 AIX xlc needs -O, otherwise garbage collection doesn't work.
7
12013-04-22 Paul Eggert <eggert@cs.ucla.edu> 82013-04-22 Paul Eggert <eggert@cs.ucla.edu>
2 9
3 * make-dist: Do not distribute admin/unidata/Makefile. 10 * make-dist: Do not distribute admin/unidata/Makefile.
diff --git a/configure.ac b/configure.ac
index 2b3afc1fb80..6c59dcaa7e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -613,10 +613,10 @@ AC_DEFUN([gl_THREADLIB])
613dnl Amongst other things, this sets AR and ARFLAGS. 613dnl Amongst other things, this sets AR and ARFLAGS.
614gl_EARLY 614gl_EARLY
615 615
616# It's helpful to have C macros available to GDB, so prefer -g3 to -g
617# if -g3 works and the user does not specify CFLAGS.
618# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
619if test "$ac_test_CFLAGS" != set; then 616if test "$ac_test_CFLAGS" != set; then
617 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
618 # if -g3 works and the user does not specify CFLAGS.
619 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
620 case $CFLAGS in 620 case $CFLAGS in
621 '-g') 621 '-g')
622 emacs_g3_CFLAGS='-g3';; 622 emacs_g3_CFLAGS='-g3';;
@@ -632,13 +632,29 @@ if test "$ac_test_CFLAGS" != set; then
632 [emacs_cv_prog_cc_g3], 632 [emacs_cv_prog_cc_g3],
633 [AC_LINK_IFELSE([AC_LANG_PROGRAM()], 633 [AC_LINK_IFELSE([AC_LANG_PROGRAM()],
634 [emacs_cv_prog_cc_g3=yes], 634 [emacs_cv_prog_cc_g3=yes],
635 [emacs_cv_prog_cc_g3=no])]) 635 [emacs_cv_prog_cc_g3=no])])
636 if test $emacs_cv_prog_cc_g3 = yes; then 636 if test $emacs_cv_prog_cc_g3 != yes; then
637 CFLAGS=$emacs_g3_CFLAGS
638 else
639 CFLAGS=$emacs_save_CFLAGS 637 CFLAGS=$emacs_save_CFLAGS
640 fi 638 fi
641 fi 639 fi
640
641 case $CFLAGS in
642 *-O*) ;;
643 *)
644 # No optimization flag was inferred for this non-GCC compiler.
645 # Try -O. This is needed for xlc on AIX; see Bug#14258.
646 emacs_save_CFLAGS=$CFLAGS
647 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
648 CFLAGS=${CFLAGS}-O
649 AC_CACHE_CHECK([whether $CC accepts -O],
650 [emacs_cv_prog_cc_o],
651 [AC_LINK_IFELSE([AC_LANG_PROGRAM()],
652 [emacs_cv_prog_cc_o=yes],
653 [emacs_cv_prog_cc_o=no])])
654 if test $emacs_cv_prog_cc_o != yes; then
655 CFLAGS=$emacs_save_CFLAGS
656 fi ;;
657 esac
642fi 658fi
643 659
644AC_ARG_ENABLE([gcc-warnings], 660AC_ARG_ENABLE([gcc-warnings],
diff --git a/src/ChangeLog b/src/ChangeLog
index 99e2c3d9a84..9ae5c29ab72 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12013-04-26 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port better to AIX (Bug#14258).
4 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
5 to pacify AIX xlc.
6
12013-04-24 Kenichi Handa <handa@gnu.org> 72013-04-24 Kenichi Handa <handa@gnu.org>
2 8
3 * coding.c (decode_coding_iso_2022): When an invalid escape 9 * coding.c (decode_coding_iso_2022): When an invalid escape
diff --git a/src/lisp.h b/src/lisp.h
index bcb866b4cc4..e2c24eed352 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -231,9 +231,9 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 };
231#define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 231#define case_Lisp_Int case Lisp_Int0: case Lisp_Int1
232#define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0) 232#define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0)
233 233
234/* Stolen from GDB. The only known compiler that doesn't support 234/* Idea stolen from GDB. MSVC doesn't support enums in bitfields,
235 enums in bitfields is MSVC. */ 235 and xlc complains vociferously about them. */
236#ifdef _MSC_VER 236#if defined _MSC_VER || defined __IBMC__
237#define ENUM_BF(TYPE) unsigned int 237#define ENUM_BF(TYPE) unsigned int
238#else 238#else
239#define ENUM_BF(TYPE) enum TYPE 239#define ENUM_BF(TYPE) enum TYPE