X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fs%2Flinux.h;h=2de582aa670d4e331ed11d57d9564c6b7413f13f;hb=6d96ab26aa9c2c14c5562a27aa5a5538d7f7d98f;hp=906bab41507ce8489c0b37f2bb69f6903390e2d0;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git.1 diff --git a/src/s/linux.h b/src/s/linux.h index 906bab4..2de582a 100644 --- a/src/s/linux.h +++ b/src/s/linux.h @@ -26,6 +26,12 @@ Boston, MA 02111-1307, USA. */ #define USG #define LINUX +/* powerpc gcc 2.8.0 doesn't define __ELF__, but it is */ + +#if defined(__ELF__) || defined(powerpc) +#define LINUX_ELF +#endif + /* SYSTEM_TYPE should indicate the kind of system you are using. It sets the Lisp variable system-type. */ @@ -81,7 +87,7 @@ Boston, MA 02111-1307, USA. */ /* Ask GCC where to find libgcc.a. */ #define LIB_GCC "`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`" -#ifndef __ELF__ +#ifndef LINUX_ELF /* Linux has crt0.o in a non-standard place */ #define START_FILES "pre-crt0.o /usr/lib/crt0.o" #else @@ -89,8 +95,11 @@ Boston, MA 02111-1307, USA. */ #if defined(__linux__) && defined(powerpc) /*Added by Fukui*/ #define START_FILES /*Added by Fukui*/ #else /*Added by Fukui*/ - +#if defined __s390x__ || defined __x86_64__ +#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 #endif /*Added by Fukui*/ #endif @@ -106,12 +115,16 @@ Boston, MA 02111-1307, USA. */ /* Best not to include -lg, unless it is last on the command line */ #define LIBS_DEBUG #define LIBS_TERMCAP "-ltermcap -lcurses" /* save some space with shared libs*/ -#ifndef __ELF__ +#ifndef LINUX_ELF #define LIB_STANDARD "-lc" /* avoid -lPW */ #else /*#undef LIB_GCC #define LIB_GCC*/ +#if defined __s390x__ || defined __x86_64__ +#define LIB_STANDARD "-lgcc -lc -lgcc /usr/lib64/crtn.o" +#else #define LIB_STANDARD "-lgcc -lc -lgcc /usr/lib/crtn.o" +#endif #define LINKER "$(CC) -nostdlib" #endif @@ -124,14 +137,12 @@ Boston, MA 02111-1307, USA. */ #define LIBS_SYSTEM #endif -#ifdef __ELF__ +#ifdef LINUX_ELF #define UNEXEC "unexelf.o" #define UNEXEC_USE_MAP_PRIVATE -#if 0 -/* mrb - Ordinary link is simple and effective */ -/* slb - Not any more ... :-( */ +/* Although slb thinks ORDINARY_LINK does not work on linux, ORDINARY_LINK + has been enabled in 21.5 for some time with no ill effects. */ #define ORDINARY_LINK -#endif /* 0 */ /* I still think ORDINARY_LINK should be the default, but since slb insists, ORDINARY_LINK will stay on until we expunge the dump code. @@ -142,7 +153,7 @@ Boston, MA 02111-1307, USA. */ #undef START_FILES #undef LIB_GCC #endif -#endif /* __ELF__ */ +#endif /* LINUX_ELF */ #ifdef LINUX_QMAGIC @@ -201,3 +212,4 @@ Boston, MA 02111-1307, USA. */ /* XEmacs: removed setpgrp() definition because we use setpgid() when it's available, and autodetect it. */ +