diff options
| author | Glenn Morris | 2010-05-06 19:55:47 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-05-06 19:55:47 -0700 |
| commit | 2f86b22b05324b3687dd470bbd85e65d4d8db1d7 (patch) | |
| tree | 46379234ee8f4d02c818b9b93685552b0a09c346 /src | |
| parent | cae7fcf92d01240eb8dd6de99ba8add4d85b397e (diff) | |
| download | emacs-2f86b22b05324b3687dd470bbd85e65d4d8db1d7.tar.gz emacs-2f86b22b05324b3687dd470bbd85e65d4d8db1d7.zip | |
Move LD_SWITCH_SYSTEM from cpp to configure.
* configure.in (LD_SWITCH_SYSTEM): Set with configure, not cpp.
Merges logic from src/s/* and src/Makefile.in.
(LD_SWITCH_SYSTEM_TEMACS): New output variable.
* src/Makefile.in (LD_SWITCH_SYSTEM): Set with configure, not cpp.
(LD_SWITCH_SYSTEM_EXTRA): New variable, set by configure.
(TEMACS_LDFLAGS): Use $LD_SWITCH_SYSTEM and $LD_SWITCH_SYSTEM_EXTRA,
move out of cpp section.
* src/s/freebsd.h (LD_SWITCH_SYSTEM):
* src/s/gnu-linux.h (LD_SWITCH_SYSTEM):
* src/s/netbsd.h (LD_SWITCH_SYSTEM):
* admin/CPP-DEFINES: Remove LD_SWITCH_SYSTEM.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/Makefile.in | 28 | ||||
| -rw-r--r-- | src/s/freebsd.h | 14 | ||||
| -rw-r--r-- | src/s/gnu-linux.h | 15 | ||||
| -rw-r--r-- | src/s/netbsd.h | 8 |
5 files changed, 29 insertions, 47 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 81fe7c07571..04d9d6b8266 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2010-05-07 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (LD_SWITCH_SYSTEM): Set with configure, not cpp. | ||
| 4 | (LD_SWITCH_SYSTEM_EXTRA): New variable, set by configure. | ||
| 5 | (TEMACS_LDFLAGS): Use $LD_SWITCH_SYSTEM and $LD_SWITCH_SYSTEM_EXTRA, | ||
| 6 | move out of cpp section. | ||
| 7 | * s/freebsd.h (LD_SWITCH_SYSTEM): | ||
| 8 | * s/gnu-linux.h (LD_SWITCH_SYSTEM): | ||
| 9 | * s/netbsd.h (LD_SWITCH_SYSTEM): | ||
| 10 | * s/openbsd.h (LD_SWITCH_SYSTEM): Move to configure.in. | ||
| 11 | |||
| 1 | 2010-05-07 Dan Nicolaescu <dann@ics.uci.edu> | 12 | 2010-05-07 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 13 | ||
| 3 | Define LIB_STANDARD and START_FILES using autoconf. | 14 | Define LIB_STANDARD and START_FILES using autoconf. |
diff --git a/src/Makefile.in b/src/Makefile.in index 70ec71f3fb6..5ea321df78c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -73,13 +73,20 @@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ | |||
| 73 | ## System-specific CFLAGS. | 73 | ## System-specific CFLAGS. |
| 74 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ | 74 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ |
| 75 | ## This holds any special options for linking temacs only (ie, not | 75 | ## This holds any special options for linking temacs only (ie, not |
| 76 | ## used by configure). | 76 | ## used by configure). Not used elsewhere because it sometimes |
| 77 | ## contains options that have to do with using Emacs's crt0, | ||
| 78 | ## which are only good with temacs. | ||
| 77 | LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@ | 79 | LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@ |
| 78 | ## Next two must come before LD_SWITCH_SYSTEM. | 80 | ## Next two must come before LD_SWITCH_SYSTEM. |
| 79 | ## If needed, a -R option that says where to find X windows at run time. | 81 | ## If needed, a -R option that says where to find X windows at run time. |
| 80 | LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@ | 82 | LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@ |
| 81 | ## As above, but using -rpath instead. | 83 | ## As above, but using -rpath instead. |
| 82 | LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@ | 84 | LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@ |
| 85 | ## System-specific LDFLAGS. | ||
| 86 | LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@ | ||
| 87 | LD_SWITCH_SYSTEM_EXTRA=@LD_SWITCH_SYSTEM_EXTRA@ | ||
| 88 | ## Flags to pass to ld only for temacs. | ||
| 89 | TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS) | ||
| 83 | 90 | ||
| 84 | LIBTIFF=@LIBTIFF@ | 91 | LIBTIFF=@LIBTIFF@ |
| 85 | LIBJPEG=@LIBJPEG@ | 92 | LIBJPEG=@LIBJPEG@ |
| @@ -189,16 +196,7 @@ DEPFLAGS = -MMD -MF deps/$*.d | |||
| 189 | #define LIBS_SYSTEM | 196 | #define LIBS_SYSTEM |
| 190 | #endif | 197 | #endif |
| 191 | 198 | ||
| 192 | /* Some s/SYSTEM.h files define this to request special switches in ld. */ | 199 | /* This macro is for switches specifically related to X Windows. */ |
| 193 | #ifndef LD_SWITCH_SYSTEM | ||
| 194 | #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) | ||
| 195 | #define LD_SWITCH_SYSTEM -X | ||
| 196 | #else /* (defined (BSD_SYSTEM) && !defined (COFF)) */ | ||
| 197 | #define LD_SWITCH_SYSTEM | ||
| 198 | #endif /* (defined (BSD_SYSTEM) && !defined (COFF)) */ | ||
| 199 | #endif /* LD_SWITCH_SYSTEM */ | ||
| 200 | |||
| 201 | /* These macros are for switches specifically related to X Windows. */ | ||
| 202 | #ifndef LD_SWITCH_X_SITE | 200 | #ifndef LD_SWITCH_X_SITE |
| 203 | #define LD_SWITCH_X_SITE | 201 | #define LD_SWITCH_X_SITE |
| 204 | #endif | 202 | #endif |
| @@ -312,11 +310,6 @@ LD=ld | |||
| 312 | #endif /* not LINKER */ | 310 | #endif /* not LINKER */ |
| 313 | #endif /* not ORDINARY_LINK */ | 311 | #endif /* not ORDINARY_LINK */ |
| 314 | 312 | ||
| 315 | /* Flags to pass to LD only for temacs. */ | ||
| 316 | /* Do not split this line with a backslash. That can cause trouble with | ||
| 317 | some cpps. */ | ||
| 318 | TEMACS_LDFLAGS = LD_SWITCH_SYSTEM $(LD_SWITCH_SYSTEM_TEMACS) | ||
| 319 | |||
| 320 | /* A macro which other sections of Makefile can redefine to munge the | 313 | /* A macro which other sections of Makefile can redefine to munge the |
| 321 | flags before they are passed to LD. This is helpful if you have | 314 | flags before they are passed to LD. This is helpful if you have |
| 322 | redefined LD to something odd, like "gcc". | 315 | redefined LD to something odd, like "gcc". |
| @@ -730,9 +723,6 @@ temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} pr | |||
| 730 | ${LIBES} | 723 | ${LIBES} |
| 731 | #endif | 724 | #endif |
| 732 | 725 | ||
| 733 | /* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM | ||
| 734 | often contains options that have to do with using Emacs''s crt0, | ||
| 735 | which are only good with temacs. */ | ||
| 736 | prefix-args${EXEEXT}: prefix-args.o $(config_h) | 726 | prefix-args${EXEEXT}: prefix-args.o $(config_h) |
| 737 | $(CC) $(LDFLAGS) prefix-args.o -o prefix-args | 727 | $(CC) $(LDFLAGS) prefix-args.o -o prefix-args |
| 738 | 728 | ||
diff --git a/src/s/freebsd.h b/src/s/freebsd.h index 0b56f6b3c81..1e79e1d3581 100644 --- a/src/s/freebsd.h +++ b/src/s/freebsd.h | |||
| @@ -1,9 +1,8 @@ | |||
| 1 | /* System description header for FreeBSD systems. | 1 | /* System description header for FreeBSD systems. |
| 2 | This file describes the parameters that system description files | 2 | |
| 3 | should define or not. | 3 | Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
| 4 | Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
| 5 | 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | 5 | Free Software Foundation, Inc. |
| 6 | Free Software Foundation, Inc. | ||
| 7 | 6 | ||
| 8 | Author: Shawn M. Carey | 7 | Author: Shawn M. Carey |
| 9 | (according to authors.el) | 8 | (according to authors.el) |
| @@ -41,11 +40,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 41 | #define LIBS_TERMCAP -lncurses | 40 | #define LIBS_TERMCAP -lncurses |
| 42 | #endif | 41 | #endif |
| 43 | 42 | ||
| 44 | /* Let `ld' find image libs and similar things in /usr/local/lib. The | ||
| 45 | system compiler, GCC, has apparently been modified to not look | ||
| 46 | there, contrary to what a stock GCC would do. */ | ||
| 47 | |||
| 48 | #define LD_SWITCH_SYSTEM -L/usr/local/lib | ||
| 49 | #undef LIB_GCC | 43 | #undef LIB_GCC |
| 50 | #define LIB_GCC | 44 | #define LIB_GCC |
| 51 | 45 | ||
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index e5ac75ff0d4..f3a06990ed3 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* This file is the configuration file for Linux-based GNU systems | 1 | /* This file is the configuration file for Linux-based GNU systems |
| 2 | Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004, | 2 | |
| 3 | 2005, 2006, 2007, 2008, 2009, 2010 | 3 | Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004, |
| 4 | Free Software Foundation, Inc. | 4 | 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -169,15 +169,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 169 | /* Ask GCC where to find libgcc.a. */ | 169 | /* Ask GCC where to find libgcc.a. */ |
| 170 | #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` | 170 | #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` |
| 171 | 171 | ||
| 172 | /* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option | ||
| 173 | that says where to find X windows at run time. */ | ||
| 174 | |||
| 175 | #ifdef __mips__ | ||
| 176 | #define LD_SWITCH_SYSTEM -G 0 $(LD_SWITCH_X_SITE_AUX) | ||
| 177 | #else | ||
| 178 | #define LD_SWITCH_SYSTEM $(LD_SWITCH_X_SITE_AUX) | ||
| 179 | #endif /* __mips__ */ | ||
| 180 | |||
| 181 | #ifdef emacs | 172 | #ifdef emacs |
| 182 | #define INTERRUPT_INPUT | 173 | #define INTERRUPT_INPUT |
| 183 | #endif | 174 | #endif |
diff --git a/src/s/netbsd.h b/src/s/netbsd.h index 987f5e68907..a92e8ce56ee 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* s/ file for netbsd system. | 1 | /* s/ file for netbsd system. |
| 2 | 2 | ||
| 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
| 4 | 2008, 2009, 2010 Free Software Foundation, Inc. | 4 | 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -33,10 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 33 | 33 | ||
| 34 | #define AMPERSAND_FULL_NAME | 34 | #define AMPERSAND_FULL_NAME |
| 35 | 35 | ||
| 36 | /* LD_SWITCH_X_SITE_AUX_RPATH gives a -rpath option (which is what | ||
| 37 | OSF1 uses) that says where to find X windows at run time. */ | ||
| 38 | #define LD_SWITCH_SYSTEM $(LD_SWITCH_X_SITE_AUX_RPATH) -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib | ||
| 39 | |||
| 40 | /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears | 36 | /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears |
| 41 | the library search parth, i.e. it won't search /usr/lib | 37 | the library search parth, i.e. it won't search /usr/lib |
| 42 | for libc and friends. Using -nostartfiles instead avoids | 38 | for libc and friends. Using -nostartfiles instead avoids |