summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-11-03 14:55:19 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-11-03 14:55:19 -0400
commit754996bcf8e980648b63afa3e8bbaedcefdc22bc (patch)
tree94572715a2386cbf205f387b4792f4270db9bf7f /src
parent3649d303b0e78aaeb4894389f5be6375837f88b8 (diff)
downloademacs-754996bcf8e980648b63afa3e8bbaedcefdc22bc.tar.gz
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)
Diffstat (limited to 'src')
-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
4 files changed, 17 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 33552c0ed57..a44fdbb7e42 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-03 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (CRT_DIR): New variable, set by configure.
+ * m/amdx86-64.h, m/ibms390x.h (START_FILES, LIB_STANDARD):
+ Use $CRT_DIR rather than HAVE_LIB64_DIR. (Bug#5655)
+
2010-11-01 Jan Djärv <jan.h.d@swipnet.se>
* 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}
OTHER_FILES = @OTHER_FILES@
+## Only used by amdx86-64 and ibms390x GNU/Linux.
+CRT_DIR=@CRT_DIR@
+
# ========================== start of cpp stuff =======================
/* From here on, comments must be done in C syntax. */
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/>. */
a native binary of Emacs on FreeBSD/amd64 we can just point to /usr/lib. */
#undef START_FILES
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
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/>. */
versions of ld are one-pass linkers, we need to mention -lgcc twice,
or else we risk getting unresolved externals. */
#undef LIB_STANDARD
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
+#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
#elif defined(__OpenBSD__)
#undef START_FILES
-#define START_FILES pre-crt0.o /usr/lib/crt0.o /usr/lib/crtbegin.o
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o
#undef LIB_STANDARD
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o
+#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtend.o
#elif defined(__NetBSD__)
@@ -119,13 +119,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
or else we risk getting unresolved externals. */
#undef START_FILES
#undef LIB_STANDARD
-#ifdef HAVE_LIB64_DIR
-#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
-#else
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
-#endif
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
+#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
#endif /* __FreeBSD__ */
#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 */
#define XPNTR(a) XUINT (a)
#undef START_FILES
-#ifdef HAVE_LIB64_DIR
-#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o
-#else
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
-#endif
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
#undef LIB_STANDARD
-#ifdef HAVE_LIB64_DIR
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
-#else
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
-#endif
+#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
/* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519
(do not change this comment) */