aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-11-03 14:55:19 -0400
committerChong Yidong2010-11-03 14:55:19 -0400
commit754996bcf8e980648b63afa3e8bbaedcefdc22bc (patch)
tree94572715a2386cbf205f387b4792f4270db9bf7f
parent3649d303b0e78aaeb4894389f5be6375837f88b8 (diff)
downloademacs-754996bcf8e980648b63afa3e8bbaedcefdc22bc.tar.gz
emacs-754996bcf8e980648b63afa3e8bbaedcefdc22bc.zip
Fix for Bug#5655, backported from trunk.
* 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--ChangeLog6
-rw-r--r--configure.in34
-rw-r--r--etc/NEWS5
-rw-r--r--src/ChangeLog6
-rw-r--r--src/Makefile.in3
-rw-r--r--src/m/amdx86-64.h17
-rw-r--r--src/m/ibms390x.h12
7 files changed, 53 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c32435237a..11363c3e592 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12010-11-03 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
12010-10-12 Glenn Morris <rgm@gnu.org> 72010-10-12 Glenn Morris <rgm@gnu.org>
2 8
3 * BUGS, INSTALL.BZR, README: Updates. 9 * BUGS, INSTALL.BZR, README: Updates.
diff --git a/configure.in b/configure.in
index 304f6ab2f91..539b910cd71 100644
--- a/configure.in
+++ b/configure.in
@@ -169,6 +169,12 @@ if test "X${with_pkg_config_prog}" != X; then
169 fi 169 fi
170fi 170fi
171 171
172CRT_DIR=
173AC_ARG_WITH([crt-dir],dnl
174[AS_HELP_STRING([--with-crt-dir=DIR],[directory containing crtn.o etc.
175This option is only used on x86-64 and s390x GNU/Linux architectures.])])
176CRT_DIR="${with_crt_dir}"
177
172AC_ARG_WITH([gnustep-conf],dnl 178AC_ARG_WITH([gnustep-conf],dnl
173[AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) 179[AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])])
174test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ 180test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
@@ -996,18 +1002,28 @@ AC_CONFIG_LIBOBJ_DIR(src)
996dnl Do this early because it can frob feature test macros for Unix-98 &c. 1002dnl Do this early because it can frob feature test macros for Unix-98 &c.
997AC_SYS_LARGEFILE 1003AC_SYS_LARGEFILE
998 1004
999 1005## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x.
1000### The standard library on x86-64 and s390x GNU/Linux distributions can 1006## Other machine types hard-code the location in src/[ms]/*.h.
1001### be located in either /usr/lib64 or /usr/lib.
1002### In some rare cases, /usr/lib64 exists but does not contain the
1003### relevant files (bug#1287). Hence test for crtn.o.
1004case "${canonical}" in 1007case "${canonical}" in
1005 x86_64-*-linux-gnu* | s390x-*-linux-gnu* ) 1008 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
1006 if test -e /usr/lib64/crtn.o; then 1009 ## On x86-64 and s390x GNU/Linux distributions, the standard library
1007 AC_DEFINE(HAVE_LIB64_DIR, 1, 1010 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
1008 [Define to 1 if the directory /usr/lib64 exists.]) 1011 ## For anything else (eg /usr/lib32), it is up the user to specify
1009fi 1012 ## the location (bug#5655).
1013 ## Test for crtn.o, not just the directory, because sometimes the
1014 ## directory exists but does not have the relevant files (bug#1287).
1015 ## If user specified a crt-dir, use that unconditionally.
1016 if test "X$CRT_DIR" = "X"; then
1017 CRT_DIR=/usr/lib
1018 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
1019 fi
1020
1021 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
1022 AC_MSG_ERROR([crt*.o not found. Use --with-crt-dir to specify the location.])
1023 ;;
1010esac 1024esac
1025test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
1026AC_SUBST(CRT_DIR)
1011 1027
1012dnl This function defintion taken from Gnome 2.0 1028dnl This function defintion taken from Gnome 2.0
1013dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) 1029dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
diff --git a/etc/NEWS b/etc/NEWS
index fd6d1b5a954..bde5219cb15 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -17,6 +17,11 @@ with a prefix argument or by typing C-u C-h C-n.
17 17
18* Installation Changes in Emacs 23.3 18* Installation Changes in Emacs 23.3
19 19
20---
21** New configure option --with-crt-dir specifies the location of your
22crt*.o files, if they are in a non-standard location. This is only
23used on x86-64 and s390x GNU/Linux architectures.
24
20* Startup Changes in Emacs 23.3 25* Startup Changes in Emacs 23.3
21 26
22* Changes in Emacs 23.3 27* Changes in Emacs 23.3
diff --git a/src/ChangeLog b/src/ChangeLog
index 33552c0ed57..a44fdbb7e42 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12010-11-03 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
12010-11-01 Jan Djärv <jan.h.d@swipnet.se> 72010-11-01 Jan Djärv <jan.h.d@swipnet.se>
2 8
3 * process.c (kbd_is_on_hold): New variable. 9 * process.c (kbd_is_on_hold): New variable.
diff --git a/src/Makefile.in b/src/Makefile.in
index 9caa01d9066..1b0fbdb8b63 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -67,6 +67,9 @@ bootstrap_exe = ../src/bootstrap-emacs${EXEEXT}
67 67
68OTHER_FILES = @OTHER_FILES@ 68OTHER_FILES = @OTHER_FILES@
69 69
70## Only used by amdx86-64 and ibms390x GNU/Linux.
71CRT_DIR=@CRT_DIR@
72
70# ========================== start of cpp stuff ======================= 73# ========================== start of cpp stuff =======================
71/* From here on, comments must be done in C syntax. */ 74/* From here on, comments must be done in C syntax. */
72 75
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 4bea30d12de..0401b8bf90f 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -80,7 +80,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
80 a native binary of Emacs on FreeBSD/amd64 we can just point to /usr/lib. */ 80 a native binary of Emacs on FreeBSD/amd64 we can just point to /usr/lib. */
81 81
82#undef START_FILES 82#undef START_FILES
83#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o 83#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
84 84
85/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD. 85/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
86 The reason is that some functions in libgcc.a call functions from libc.a, 86 The reason is that some functions in libgcc.a call functions from libc.a,
@@ -88,14 +88,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
88 versions of ld are one-pass linkers, we need to mention -lgcc twice, 88 versions of ld are one-pass linkers, we need to mention -lgcc twice,
89 or else we risk getting unresolved externals. */ 89 or else we risk getting unresolved externals. */
90#undef LIB_STANDARD 90#undef LIB_STANDARD
91#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o 91#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
92 92
93#elif defined(__OpenBSD__) 93#elif defined(__OpenBSD__)
94 94
95#undef START_FILES 95#undef START_FILES
96#define START_FILES pre-crt0.o /usr/lib/crt0.o /usr/lib/crtbegin.o 96#define START_FILES pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o
97#undef LIB_STANDARD 97#undef LIB_STANDARD
98#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o 98#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtend.o
99 99
100#elif defined(__NetBSD__) 100#elif defined(__NetBSD__)
101 101
@@ -119,13 +119,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
119 or else we risk getting unresolved externals. */ 119 or else we risk getting unresolved externals. */
120#undef START_FILES 120#undef START_FILES
121#undef LIB_STANDARD 121#undef LIB_STANDARD
122#ifdef HAVE_LIB64_DIR 122#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
123#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o 123#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
124#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
125#else
126#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
127#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
128#endif
129 124
130#endif /* __FreeBSD__ */ 125#endif /* __FreeBSD__ */
131#endif /* !i386 */ 126#endif /* !i386 */
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) */