mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-09 05:01:02 -08:00
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.
This commit is contained in:
parent
7186fb09de
commit
76cda504fb
12 changed files with 65 additions and 77 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2010-04-27 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* 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.
|
||||
|
||||
* configure.in (LUCID_LIBW, LIBXP, WIDGET_OBJ): New output variables.
|
||||
|
||||
2010-04-26 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
|
|
|||
53
configure.in
53
configure.in
|
|
@ -189,7 +189,7 @@ fi
|
|||
CRT_DIR=
|
||||
AC_ARG_WITH([crt-dir],dnl
|
||||
[AS_HELP_STRING([--with-crt-dir=DIR],[directory containing crtn.o etc.
|
||||
This option is only used on x86-64 and s390x GNU/Linux architectures.])])
|
||||
The default is /usr/lib, or /usr/lib64 on some platforms.])])
|
||||
CRT_DIR="${with_crt_dir}"
|
||||
|
||||
AC_ARG_WITH([gnustep-conf],dnl
|
||||
|
|
@ -983,29 +983,40 @@ dnl Do this early because it can frob feature test macros for Unix-98 &c.
|
|||
AC_SYS_LARGEFILE
|
||||
|
||||
|
||||
## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x.
|
||||
## Other machine types hard-code the location in src/[ms]/*.h.
|
||||
case "${canonical}" in
|
||||
x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
|
||||
## If user specified a crt-dir, use that unconditionally.
|
||||
if test "X$CRT_DIR" = "X"; then
|
||||
|
||||
## On x86-64 and s390x GNU/Linux distributions, the standard library
|
||||
## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
|
||||
## For anything else (eg /usr/lib32), it is up the user to specify
|
||||
## the location (bug#5655).
|
||||
## Test for crtn.o, not just the directory, because sometimes the
|
||||
## directory exists but does not have the relevant files (bug#1287).
|
||||
## If user specified a crt-dir, use that unconditionally.
|
||||
if test "X$CRT_DIR" = "X"; then
|
||||
CRT_DIR=/usr/lib
|
||||
test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
|
||||
fi
|
||||
case "$canonical" in
|
||||
x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
|
||||
## On x86-64 and s390x GNU/Linux distributions, the standard library
|
||||
## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
|
||||
## For anything else (eg /usr/lib32), it is up the user to specify
|
||||
## the location (bug#5655).
|
||||
## Test for crtn.o, not just the directory, because sometimes the
|
||||
## directory exists but does not have the relevant files (bug#1287).
|
||||
## FIXME better to test for binary compatibility somehow.
|
||||
test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
|
||||
;;
|
||||
|
||||
test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
|
||||
AC_MSG_ERROR([crt*.o not found. Use --with-crt-dir to specify the location.])
|
||||
;;
|
||||
powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
|
||||
esac
|
||||
|
||||
case "$opsys" in
|
||||
hpux10-20) CRT_DIR=/lib ;;
|
||||
esac
|
||||
|
||||
## Default is /usr/lib.
|
||||
test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
|
||||
|
||||
else
|
||||
|
||||
## Some platforms don't use any of these files, so it is not
|
||||
## appropriate to put this test outside the if block.
|
||||
test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
|
||||
AC_MSG_ERROR([crt*.o not found in specified location.])
|
||||
|
||||
fi
|
||||
|
||||
esac
|
||||
test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
|
||||
AC_SUBST(CRT_DIR)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,18 @@
|
|||
2010-04-27 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* 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.
|
||||
* m/ibms390x.h (START_FILES, LIB_STANDARD):
|
||||
* m/macppc.h (START_FILES, LIB_STANDARD) [GNU_LINUX]:
|
||||
* m/sparc.h (START_FILES, LIB_STANDARD) [__linux__]:
|
||||
Remove definitions, since they are set correctly in s/gnu-linux.h.
|
||||
* s/freebsd.h (START_FILES, LIB_STANDARD):
|
||||
* s/gnu-linux.h (START_FILES, LIB_STANDARD):
|
||||
* s/hpux10-20.h (START_FILES):
|
||||
* s/netbsd.h (START_FILES, LIB_STANDARD, START_FILES_1, END_FILES_1):
|
||||
Use $CRT_DIR in place of fixed /usr/lib, /lib directories.
|
||||
|
||||
* Makefile.in (LIBXP, LUCID_LIBW, WIDGET_OBJ): Set via configure.
|
||||
(MOTIF_LIBW): Use $LIBXP.
|
||||
(otherobj): Use $WIDGET_OBJ.
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT}
|
|||
|
||||
OTHER_FILES = @OTHER_FILES@
|
||||
|
||||
## Only used by amdx86-64 and ibms390x GNU/Linux.
|
||||
CRT_DIR=@CRT_DIR@
|
||||
|
||||
LIBTIFF=@LIBTIFF@
|
||||
|
|
|
|||
|
|
@ -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__
|
||||
|
||||
#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)
|
||||
|
||||
/* For GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__, things are set
|
||||
correctly in s/gnu-linux.h, netbsd.h, darwin.h. */
|
||||
#ifdef 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
|
||||
|
|
|
|||
|
|
@ -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) */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
there, contrary to what a stock GCC would do. */
|
||||
|
||||
#define LD_SWITCH_SYSTEM -L/usr/local/lib
|
||||
#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o
|
||||
#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
|
||||
#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o
|
||||
#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o
|
||||
#undef LIB_GCC
|
||||
#define LIB_GCC
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
/* Ask GCC where to find libgcc.a. */
|
||||
#define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
|
||||
|
||||
#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
|
||||
|
||||
/* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option
|
||||
says where to find X windows at run time. */
|
||||
|
|
@ -190,7 +190,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#undef LIB_GCC
|
||||
#define LIB_GCC
|
||||
#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
|
||||
#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
|
||||
|
||||
/* _BSD_SOURCE is redundant, at least in glibc2, since we define
|
||||
_GNU_SOURCE. Left in in case it's relevant to libc5 systems and
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#define NO_REMAP
|
||||
|
||||
#define START_FILES pre-crt0.o /lib/crt0.o
|
||||
#define START_FILES pre-crt0.o $(CRT_DIR)/crt0.o
|
||||
|
||||
/* Define VIRT_ADDR_VARIES if the virtual addresses of
|
||||
pure and impure space as loaded can vary, and even their
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#define LIBS_TERMCAP -ltermcap
|
||||
|
||||
#define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o
|
||||
#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1
|
||||
#define START_FILES pre-crt0.o $(CRT_DIR)/crt0.o START_FILES_1 $(CRT_DIR)/crtbegin.o
|
||||
#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtend.o END_FILES_1
|
||||
#undef LIB_GCC
|
||||
#define LIB_GCC
|
||||
|
||||
#ifdef HAVE_CRTIN
|
||||
#define START_FILES_1 /usr/lib/crti.o
|
||||
#define END_FILES_1 /usr/lib/crtn.o
|
||||
#define START_FILES_1 $(CRT_DIR)/crti.o
|
||||
#define END_FILES_1 $(CRT_DIR)/crtn.o
|
||||
#else
|
||||
#define START_FILES_1
|
||||
#define END_FILES_1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue