Mercurial > emacs
changeset 108227:135e34f90ef1
Move C_SWITCH_MACHINE, C_SWITCH_SYSTEM from cpp to autoconf.
* configure.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): New output
variables, replacing c_switch_machine, c_switch_system.
* src/s/aix4-2.h (C_SWITCH_SYSTEM):
* src/m/alpha.h (C_SWITCH_MACHINE):
Move to configure.in.
* src/Makefile.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM):
New variables, set by configure.
(ALL_CFLAGS): Use $C_SWITCH_MACHINE and $C_SWITCH_SYSTEM in place of
$c_switch_machine and $c_switch_system.
* lib-src/Makefile.in: Use @C_SWITCH_SYSTEM@, @C_SWITCH_MACHINE@
rather than @c_switch_system@, @c_switch_machine@.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 03 May 2010 19:56:19 -0700 |
parents | 9f224ef51d16 |
children | 385494b60342 |
files | ChangeLog configure.in lib-src/ChangeLog lib-src/Makefile.in src/ChangeLog src/Makefile.in src/m/alpha.h src/s/aix4-2.h |
diffstat | 8 files changed, 63 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon May 03 19:51:49 2010 -0700 +++ b/ChangeLog Mon May 03 19:56:19 2010 -0700 @@ -1,3 +1,8 @@ +2010-05-04 Glenn Morris <rgm@gnu.org> + + * configure.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): New output + variables, replacing c_switch_machine, c_switch_system. + 2010-05-03 Glenn Morris <rgm@gnu.org> * configure.in (LIBXT_OTHER, LIBX_OTHER): New output variables.
--- a/configure.in Mon May 03 19:51:49 2010 -0700 +++ b/configure.in Mon May 03 19:56:19 2010 -0700 @@ -883,15 +883,7 @@ #ifndef LIBS_SYSTEM #define LIBS_SYSTEM #endif -#ifndef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM -#endif -#ifndef C_SWITCH_MACHINE -#define C_SWITCH_MACHINE -#endif configure___ libsrc_libs=LIBS_SYSTEM -configure___ c_switch_system=C_SWITCH_SYSTEM -configure___ c_switch_machine=C_SWITCH_MACHINE configure___ LIBX=-lX11 @@ -969,12 +961,43 @@ ac_link="$ac_link $ld_switch_system" + +C_SWITCH_MACHINE= +if test "$machine" = "alpha"; then + AC_CHECK_DECL([__ELF__]) + if test "$ac_cv_have_decl___ELF__" = "yes"; then + ## With ELF, make sure that all common symbols get allocated to in the + ## data section. Otherwise, the dump of temacs may miss variables in + ## the shared library that have been initialized. For example, with + ## GNU libc, __malloc_initialized would normally be resolved to the + ## shared library's .bss section, which is fatal. + if test "x$GCC" = "xyes"; then + C_SWITCH_MACHINE="-fno-common" + else + AC_MSG_ERROR([What gives? Fix me if DEC Unix supports ELF now.]) + fi + fi +fi +AC_SUBST(C_SWITCH_MACHINE) + + +C_SWITCH_SYSTEM= +## Some programs in src produce warnings saying certain subprograms +## are too complex and need a MAXMEM value greater than 2000 for +## additional optimization. --nils@exp-math.uni-essen.de +test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \ + C_SWITCH_SYSTEM="-ma -qmaxmem=4000" +## gnu-linux might need -D_BSD_SOURCE on old libc5 systems. +## It is redundant in glibc2, since we define _GNU_SOURCE. +AC_SUBST(C_SWITCH_SYSTEM) + + ### Make sure subsequent tests use flags consistent with the build flags. if test x"${OVERRIDE_CPPFLAGS}" != x; then CPPFLAGS="${OVERRIDE_CPPFLAGS}" else - CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS" + CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" fi dnl For AC_FUNC_GETLOADAVG, at least: @@ -2804,8 +2827,6 @@ AC_SUBST(bitmapdir) AC_SUBST(gamedir) AC_SUBST(gameuser) -AC_SUBST(c_switch_system) -AC_SUBST(c_switch_machine) AC_SUBST(unexec) AC_SUBST(LD_SWITCH_X_SITE) AC_SUBST(LD_SWITCH_X_SITE_AUX)
--- a/lib-src/ChangeLog Mon May 03 19:51:49 2010 -0700 +++ b/lib-src/ChangeLog Mon May 03 19:56:19 2010 -0700 @@ -1,3 +1,8 @@ +2010-05-04 Glenn Morris <rgm@gnu.org> + + * Makefile.in: Use @C_SWITCH_SYSTEM@, @C_SWITCH_MACHINE@ rather than + @c_switch_system@, @c_switch_machine@. + 2010-04-26 Dan Nicolaescu <dann@ics.uci.edu> * Makefile.in (LIBS_MACHINE): Remove all uses, unused.
--- a/lib-src/Makefile.in Mon May 03 19:51:49 2010 -0700 +++ b/lib-src/Makefile.in Mon May 03 19:56:19 2010 -0700 @@ -34,8 +34,8 @@ version=@version@ configuration=@configuration@ EXEEXT=@EXEEXT@ -C_SWITCH_SYSTEM=@c_switch_system@ -C_SWITCH_MACHINE=@c_switch_machine@ +C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ +C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ # Program name transformation. TRANSFORM = @program_transform_name@
--- a/src/ChangeLog Mon May 03 19:51:49 2010 -0700 +++ b/src/ChangeLog Mon May 03 19:56:19 2010 -0700 @@ -1,3 +1,13 @@ +2010-05-04 Glenn Morris <rgm@gnu.org> + + * s/aix4-2.h (C_SWITCH_SYSTEM): + * m/alpha.h (C_SWITCH_MACHINE): + Move to configure.in. + * Makefile.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): + New variables, set by configure. + (ALL_CFLAGS): Use $C_SWITCH_MACHINE and $C_SWITCH_SYSTEM in place of + $c_switch_machine and $c_switch_system. + 2010-05-04 Dan Nicolaescu <dann@ics.uci.edu> * s/hpux10-20.h (LIB_STANDARD): New definition.
--- a/src/Makefile.in Mon May 03 19:51:49 2010 -0700 +++ b/src/Makefile.in Mon May 03 19:56:19 2010 -0700 @@ -70,6 +70,11 @@ CRT_DIR=@CRT_DIR@ +## Machine-specific CFLAGS. +C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ +## System-specific CFLAGS. +C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ + LIBTIFF=@LIBTIFF@ LIBJPEG=@LIBJPEG@ LIBPNG=@LIBPNG@ @@ -232,7 +237,7 @@ /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM since it may have -I options that should override those two. */ -ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} @c_switch_machine@ @c_switch_system@ @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS} +ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS} ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ .SUFFIXES: .m @@ -968,7 +973,7 @@ keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \ xterm.h w32term.h nsterm.h nsgui.h lisp.h $(config_h) xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \ - coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \ + coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \ charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h \ xterm.h w32term.h nsterm.h nsgui.h msdos.h composite.h fontset.h ccl.h \ blockinput.h atimer.h systime.h keymap.h font.h
--- a/src/m/alpha.h Mon May 03 19:51:49 2010 -0700 +++ b/src/m/alpha.h Mon May 03 19:56:19 2010 -0700 @@ -77,16 +77,6 @@ /* #define SYSTEM_MALLOC */ #ifdef __ELF__ -/* With ELF, make sure that all common symbols get allocated to in the - data section. Otherwise, the dump of temacs may miss variables in - the shared library that have been initialized. For example, with - GNU libc, __malloc_initialized would normally be resolved to the - shared library's .bss section, which is fatal. */ -# ifdef __GNUC__ -# define C_SWITCH_MACHINE -fno-common -# else -# error What gives? Fix me if DEC Unix supports ELF now. -# endif #undef UNEXEC #define UNEXEC unexelf.o
--- a/src/s/aix4-2.h Mon May 03 19:51:49 2010 -0700 +++ b/src/s/aix4-2.h Mon May 03 19:56:19 2010 -0700 @@ -1,6 +1,6 @@ /* -Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -118,13 +118,6 @@ /* AIX doesn't define this. */ #define unix 1 -#ifndef __GNUC__ -/* Some programs in src produce warnings saying certain subprograms - are to comples and need a MAXMEM value greater than 2000 for - additional optimization. --nils@exp-math.uni-essen.de */ -#define C_SWITCH_SYSTEM -ma -qmaxmem=4000 -#endif - /* string.h defines rindex as a macro, at least with native cc, so we lose declaring char * rindex without this. It is just a guess which versions of AIX need this definition. */