diff options
| author | Glenn Morris | 2010-04-23 19:23:22 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-04-23 19:23:22 -0700 |
| commit | 70eab5c1825a15ead8010be9aafc1d72486fd07d (patch) | |
| tree | b367b1618a94b8fbaa78ddd337452119becf580d | |
| parent | fea1add44802d318b71d0aa2f35740f1d8640d26 (diff) | |
| download | emacs-70eab5c1825a15ead8010be9aafc1d72486fd07d.tar.gz emacs-70eab5c1825a15ead8010be9aafc1d72486fd07d.zip | |
Close bug#5655.
* configure.in (CRT_DIR): New output variable.
(--with-crt-dir): New option. (Bug#5655)
(HAVE_LIB64_DIR): Remove.
* src/Makefile.in (CRT_DIR): New variable, set by configure.
* src/m/amdx86-64.h, m/ibms390x.h (START_FILES, LIB_STANDARD):
Use $CRT_DIR rather than HAVE_LIB64_DIR. (Bug#5655)
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | configure.in | 36 | ||||
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/Makefile.in | 3 | ||||
| -rw-r--r-- | src/m/ibms390x.h | 12 |
5 files changed, 45 insertions, 18 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-04-24 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.in (CRT_DIR): New output variable. | ||
| 4 | (--with-crt-dir): New option. (Bug#5655) | ||
| 5 | (HAVE_LIB64_DIR): Remove. | ||
| 6 | |||
| 1 | 2010-04-22 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2010-04-22 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * configure.in (REAL_CFLAGS, CFLAGS): Restore -g for gcc. | 9 | * configure.in (REAL_CFLAGS, CFLAGS): Restore -g for gcc. |
diff --git a/configure.in b/configure.in index 8e624abbe97..0357fa8e886 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -186,6 +186,12 @@ if test "X${with_pkg_config_prog}" != X; then | |||
| 186 | fi | 186 | fi |
| 187 | fi | 187 | fi |
| 188 | 188 | ||
| 189 | CRT_DIR= | ||
| 190 | AC_ARG_WITH([crt-dir],dnl | ||
| 191 | [AS_HELP_STRING([--with-crt-dir=DIR],[directory containing crtn.o etc. | ||
| 192 | This option is only used on x86-64 and s390x GNU/Linux architectures.])]) | ||
| 193 | CRT_DIR="${with_crt_dir}" | ||
| 194 | |||
| 189 | AC_ARG_WITH([gnustep-conf],dnl | 195 | AC_ARG_WITH([gnustep-conf],dnl |
| 190 | [AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) | 196 | [AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) |
| 191 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ | 197 | test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ |
| @@ -966,17 +972,31 @@ dnl Do this early because it can frob feature test macros for Unix-98 &c. | |||
| 966 | AC_SYS_LARGEFILE | 972 | AC_SYS_LARGEFILE |
| 967 | 973 | ||
| 968 | 974 | ||
| 969 | ### The standard library on x86-64 and s390x GNU/Linux distributions can | 975 | ## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x. |
| 970 | ### be located in either /usr/lib64 or /usr/lib. | 976 | ## Other machine types hard-code the location in src/[ms]/*.h. |
| 971 | ### In some rare cases, /usr/lib64 exists but does not contain the | ||
| 972 | ### relevant files (bug#1287). Hence test for crtn.o. | ||
| 973 | case "${canonical}" in | 977 | case "${canonical}" in |
| 974 | x86_64-*-linux-gnu* | s390x-*-linux-gnu* ) | 978 | x86_64-*-linux-gnu* | s390x-*-linux-gnu* ) |
| 975 | if test -e /usr/lib64/crtn.o; then | 979 | |
| 976 | AC_DEFINE(HAVE_LIB64_DIR, 1, | 980 | ## On x86-64 and s390x GNU/Linux distributions, the standard library |
| 977 | [Define to 1 if the directory /usr/lib64 exists.]) | 981 | ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. |
| 978 | fi | 982 | ## For anything else (eg /usr/lib32), it is up the user to specify |
| 983 | ## the location (bug#5655). | ||
| 984 | ## Test for crtn.o, not just the directory, because sometimes the | ||
| 985 | ## directory exists but does not have the relevant files (bug#1287). | ||
| 986 | ## If user specified a crt-dir, use that unconditionally. | ||
| 987 | if test "X$CRT_DIR" = "X"; then | ||
| 988 | CRT_DIR=/usr/lib | ||
| 989 | test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 | ||
| 990 | fi | ||
| 991 | |||
| 992 | test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ | ||
| 993 | AC_MSG_ERROR([crt*.o not found. Use --with-crt-dir to specify the location.]) | ||
| 994 | ;; | ||
| 995 | |||
| 979 | esac | 996 | esac |
| 997 | test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib | ||
| 998 | AC_SUBST(CRT_DIR) | ||
| 999 | |||
| 980 | 1000 | ||
| 981 | dnl This function defintion taken from Gnome 2.0 | 1001 | dnl This function defintion taken from Gnome 2.0 |
| 982 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) | 1002 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
diff --git a/src/ChangeLog b/src/ChangeLog index 9913605316d..e1b07d50a3b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-04-24 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (CRT_DIR): New variable, set by configure. | ||
| 4 | * m/amdx86-64.h, m/ibms390x.h (START_FILES, LIB_STANDARD): | ||
| 5 | Use $CRT_DIR rather than HAVE_LIB64_DIR. (Bug#5655) | ||
| 6 | |||
| 1 | 2010-04-23 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2010-04-23 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * Makefile.in: Remove C_SWITCH_X_MACHINE, unused. | 9 | * Makefile.in: Remove C_SWITCH_X_MACHINE, unused. |
diff --git a/src/Makefile.in b/src/Makefile.in index 35f7c049165..c458c46b619 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -68,6 +68,9 @@ bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT} | |||
| 68 | 68 | ||
| 69 | OTHER_FILES = @OTHER_FILES@ | 69 | OTHER_FILES = @OTHER_FILES@ |
| 70 | 70 | ||
| 71 | ## Only used by amdx86-64 and ibms390x GNU/Linux. | ||
| 72 | CRT_DIR=@CRT_DIR@ | ||
| 73 | |||
| 71 | LIBTIFF=@LIBTIFF@ | 74 | LIBTIFF=@LIBTIFF@ |
| 72 | LIBJPEG=@LIBJPEG@ | 75 | LIBJPEG=@LIBJPEG@ |
| 73 | LIBPNG=@LIBPNG@ | 76 | LIBPNG=@LIBPNG@ |
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index 9429e4282bf..ea0fa11ec3f 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h | |||
| @@ -91,18 +91,10 @@ NOTE-END */ | |||
| 91 | #define XPNTR(a) XUINT (a) | 91 | #define XPNTR(a) XUINT (a) |
| 92 | 92 | ||
| 93 | #undef START_FILES | 93 | #undef START_FILES |
| 94 | #ifdef HAVE_LIB64_DIR | 94 | #define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o |
| 95 | #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o | ||
| 96 | #else | ||
| 97 | #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o | ||
| 98 | #endif | ||
| 99 | 95 | ||
| 100 | #undef LIB_STANDARD | 96 | #undef LIB_STANDARD |
| 101 | #ifdef HAVE_LIB64_DIR | 97 | #define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o |
| 102 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o | ||
| 103 | #else | ||
| 104 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o | ||
| 105 | #endif | ||
| 106 | 98 | ||
| 107 | /* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519 | 99 | /* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519 |
| 108 | (do not change this comment) */ | 100 | (do not change this comment) */ |