summaryrefslogtreecommitdiff
path: root/src/m
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-04-26 20:14:14 -0700
committerGlenn Morris <rgm@gnu.org>2010-04-26 20:14:14 -0700
commit76cda504fbe7474fc404611a00764b3db703e650 (patch)
tree41bc0711c1d006e34dffe6f80cebf7c632b9071d /src/m
parent7186fb09de6c3c4789aaa808a4f9af97b1cf14d4 (diff)
downloademacs-76cda504fbe7474fc404611a00764b3db703e650.tar.gz
Use $CRT_DIR in more places.
* configure.in (--with-crt-dir): Doc fix (now valid for all platforms). (CRT_DIR): On (powerpc64|sparc64)-*-linux-gnu*, default to /usr/lib64. On hpux10-20, default to /lib. * src/m/amdx86-64.h (START_FILES, LIB_STANDARD): Change the logic around, since the defaults (set by the system file) are fine in most cases. [GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__]: Remove sections. * src/m/ibms390x.h (START_FILES, LIB_STANDARD): * src/m/macppc.h (START_FILES, LIB_STANDARD) [GNU_LINUX]: * src/m/sparc.h (START_FILES, LIB_STANDARD) [__linux__]: Remove definitions, since they are set correctly in s/gnu-linux.h. * src/s/freebsd.h (START_FILES, LIB_STANDARD): * src/s/gnu-linux.h (START_FILES, LIB_STANDARD): * src/s/hpux10-20.h (START_FILES): * src/s/netbsd.h (START_FILES, LIB_STANDARD, START_FILES_1, END_FILES_1): Use $CRT_DIR in place of fixed /usr/lib, /lib directories. * src/Makefile.in: Comment.
Diffstat (limited to 'src/m')
-rw-r--r--src/m/amdx86-64.h30
-rw-r--r--src/m/ibms390x.h6
-rw-r--r--src/m/macppc.h6
-rw-r--r--src/m/sparc.h11
4 files changed, 7 insertions, 46 deletions
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 6d27c950ce4..f7dfb126e6e 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -67,34 +67,18 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
#undef DATA_SEG_BITS
-#ifdef __OpenBSD__
+/* For GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__, things are set
+ correctly in s/gnu-linux.h, netbsd.h, darwin.h. */
+#ifdef SOLARIS2
#undef START_FILES
-#define START_FILES pre-crt0.o /usr/lib/crt0.o /usr/lib/crtbegin.o
#undef LIB_STANDARD
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o
-
-#elif defined(__NetBSD__)
-
-/* LIB_STANDARD and START_FILES set correctly in s/netbsd.h */
-
-#elif defined(SOLARIS2)
-
-#undef START_FILES
-#undef LIB_STANDARD
-
-#elif defined(__APPLE__)
-
-/* LIB_STANDARD and START_FILES set correctly in s/darwin.h */
-
-#else /* !__OpenBSD__ && !__NetBSD__ && !SOLARIS2 && !__APPLE__ */
-/* CRT_DIR defaults to /usr/lib. On GNU/Linux, it may be /usr/lib64.
- On FreeBSD, the libraries for binaries native to the build host's
+#elif defined (__FreeBSD__) || (defined (DARWIN_OS) && !defined (__APPLE__))
+/* On FreeBSD, the libraries for binaries native to the build host's
architecture are installed under /usr/lib, and the ones that need
special paths are 32-bit compatibility libraries (installed under
/usr/lib32). So to build a native binary of Emacs on FreeBSD/amd64
- we can just point to /usr/lib.
- */
+ we can just point to /usr/lib (the default $CRT_DIR). */
#undef START_FILES
#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.
@@ -105,7 +89,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef LIB_STANDARD
#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
-#endif /* __OpenBSD__ */
+#endif /* SOLARIS2 */
#endif /* !i386 */
/* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h
index 3026266b349..18cd87f0b9a 100644
--- a/src/m/ibms390x.h
+++ b/src/m/ibms390x.h
@@ -85,11 +85,5 @@ NOTE-END */
#define XPNTR(a) XUINT (a)
-#undef START_FILES
-#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
-
-#undef LIB_STANDARD
-#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
-
/* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519
(do not change this comment) */
diff --git a/src/m/macppc.h b/src/m/macppc.h
index 112c15ed8e4..d58592d915a 100644
--- a/src/m/macppc.h
+++ b/src/m/macppc.h
@@ -39,12 +39,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GNU_LINUX
#define LINKER $(CC) -nostdlib
-#ifdef _ARCH_PPC64
-#undef START_FILES
-#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o
-#undef LIB_STANDARD
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
-#endif
#endif
#ifdef _ARCH_PPC64
diff --git a/src/m/sparc.h b/src/m/sparc.h
index b43e56bc3b9..22611636115 100644
--- a/src/m/sparc.h
+++ b/src/m/sparc.h
@@ -52,17 +52,6 @@ NOTE-END */
#ifdef __arch64__ /* GCC, 64-bit ABI. */
#define BITS_PER_LONG 64
-#ifdef __linux__
-#undef START_FILES
-#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/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,
- and some libc.a functions need functions from libgcc.a. Since most
- 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/lib64/crtn.o
#endif
#ifndef _LP64