aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rwxr-xr-xconfigure32
-rw-r--r--configure.in14
-rw-r--r--src/ChangeLog8
-rw-r--r--src/config.in3
-rw-r--r--src/lisp.h8
6 files changed, 67 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 095a4a7813a..b75ef310f78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12011-01-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 * configure.in (HAVE_ATTRIBUTE_ALIGNED): Arrange for this to be
4 defined if the compiler supports GCC-style __attribute__
5 ((__aligned__ ...)). IBM AIX and Oracle Solaris Studio support
6 this syntax.
7
12011-01-17 Paul Eggert <eggert@cs.ucla.edu> 82011-01-17 Paul Eggert <eggert@cs.ucla.edu>
2 9
3 Makefile.in: tidy up the building of lib 10 Makefile.in: tidy up the building of lib
diff --git a/configure b/configure
index a15a9ea56a3..56701c27f5b 100755
--- a/configure
+++ b/configure
@@ -8278,6 +8278,37 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8278 esac 8278 esac
8279 8279
8280 8280
8281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5
8282$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; }
8283if ${emacs_cv_attribute_aligned+:} false; then :
8284 $as_echo_n "(cached) " >&6
8285else
8286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8287/* end confdefs.h. */
8288char __attribute__ ((__aligned__ (1 << 3))) c;
8289int
8290main ()
8291{
8292
8293 ;
8294 return 0;
8295}
8296_ACEOF
8297if ac_fn_c_try_compile "$LINENO"; then :
8298 emacs_cv_attribute_aligned=yes
8299else
8300 emacs_cv_attribute_aligned=no
8301fi
8302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8303fi
8304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5
8305$as_echo "$emacs_cv_attribute_aligned" >&6; }
8306if test $emacs_cv_attribute_aligned = yes; then
8307
8308$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
8309
8310fi
8311
8281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 8312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8282$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } 8313$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
8283set x ${MAKE-make} 8314set x ${MAKE-make}
@@ -18959,4 +18990,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18959$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 18990$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18960fi 18991fi
18961 18992
18962
diff --git a/configure.in b/configure.in
index 2cac4f3e7d0..c338ff37a60 100644
--- a/configure.in
+++ b/configure.in
@@ -1323,6 +1323,19 @@ AH_TEMPLATE(POINTER_TYPE,
1323dnl Check for endianess 1323dnl Check for endianess
1324AC_C_BIGENDIAN 1324AC_C_BIGENDIAN
1325 1325
1326AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))],
1327 [emacs_cv_attribute_aligned],
1328 [AC_COMPILE_IFELSE(
1329 [AC_LANG_PROGRAM(
1330 [[char __attribute__ ((__aligned__ (1 << 3))) c;]],
1331 [[]])],
1332 [emacs_cv_attribute_aligned=yes],
1333 [emacs_cv_attribute_aligned=no])])
1334if test $emacs_cv_attribute_aligned = yes; then
1335 AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1,
1336 [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works.])
1337fi
1338
1326dnl check for Make feature 1339dnl check for Make feature
1327AC_PROG_MAKE_SET 1340AC_PROG_MAKE_SET
1328 1341
@@ -3734,4 +3747,3 @@ if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
3734fi 3747fi
3735 3748
3736], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"]) 3749], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
3737
diff --git a/src/ChangeLog b/src/ChangeLog
index f91ec458464..6e950569fbc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12011-01-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 * lisp.h (DECL_ALIGN): Define if HAVE_ATTRIBUTE_ALIGNED, not if
4 defined __GNUC__. ../configure now checks for this GCC feature,
5 which is now also supported by IBM and Oracle compilers.
6 (USE_LSB_TAG) [defined DECL_ALIGN]: Also define if defined __sun,
7 since Solaris malloc returns mult-of-8.
8
12011-01-18 Stefan Monnier <monnier@iro.umontreal.ca> 92011-01-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 10
3 * image.c (syms_of_image): Don't access XSYMBOL's internals directly. 11 * image.c (syms_of_image): Don't access XSYMBOL's internals directly.
diff --git a/src/config.in b/src/config.in
index d8a9722d316..62e83eea334 100644
--- a/src/config.in
+++ b/src/config.in
@@ -115,6 +115,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
115/* Define to 1 if ALSA is available. */ 115/* Define to 1 if ALSA is available. */
116#undef HAVE_ALSA 116#undef HAVE_ALSA
117 117
118/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */
119#undef HAVE_ATTRIBUTE_ALIGNED
120
118/* Define to 1 if strtold conforms to C99. */ 121/* Define to 1 if strtold conforms to C99. */
119#undef HAVE_C99_STRTOLD 122#undef HAVE_C99_STRTOLD
120 123
diff --git a/src/lisp.h b/src/lisp.h
index d00dbdc5def..5424bf7b83d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -122,16 +122,18 @@ extern void die (const char *, const char *, int) NO_RETURN;
122 TYPEBITS-aligned. */ 122 TYPEBITS-aligned. */
123#ifndef NO_DECL_ALIGN 123#ifndef NO_DECL_ALIGN
124# ifndef DECL_ALIGN 124# ifndef DECL_ALIGN
125/* What compiler directive should we use for non-gcc compilers? -stef */ 125# if HAVE_ATTRIBUTE_ALIGNED
126# if defined (__GNUC__)
127# define DECL_ALIGN(type, var) \ 126# define DECL_ALIGN(type, var) \
128 type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var 127 type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
128# else
129 /* What directives do other compilers use? */
129# endif 130# endif
130# endif 131# endif
131#endif 132#endif
132 133
133/* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */ 134/* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */
134#if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined DARWIN_OS 135#if (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \
136 || defined DARWIN_OS || defined __sun)
135/* We also need to be able to specify mult-of-8 alignment on static vars. */ 137/* We also need to be able to specify mult-of-8 alignment on static vars. */
136# if defined DECL_ALIGN 138# if defined DECL_ALIGN
137# define USE_LSB_TAG 139# define USE_LSB_TAG