From 6eb0e3b9f92ef4439a11151b2bac641fc40aec8e Mon Sep 17 00:00:00 2001 From: John Polstra Date: Thu, 28 Aug 1997 01:38:56 +0000 Subject: [PATCH] Add the necessary defines to the freebsd-elf configuration so that it can be built via BINFORMAT=elf in the environment. Most likely some of the directory defines such as STANDARD_EXEC_PREFIX will change again soon, as we settle on the proper locations for the various components. Note, the build still fails when it tries to compile libgcc2.c using the ELF compiler, unless arrangements have been made for the compiler to find the ELF assembler instead of the a.out assembler. --- contrib/gcc/config/i386/freebsd-elf.h | 40 ++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/contrib/gcc/config/i386/freebsd-elf.h b/contrib/gcc/config/i386/freebsd-elf.h index bdd4025d9ac..f69d57f424b 100644 --- a/contrib/gcc/config/i386/freebsd-elf.h +++ b/contrib/gcc/config/i386/freebsd-elf.h @@ -145,7 +145,45 @@ Boston, MA 02111-1307, USA. */ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD - + +/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD + source tree so it can be configured appropriately without using + the GNU configure/build mechanism. */ + +#ifdef FREEBSD_NATIVE + +/* Look for the include files in the system-defined places. */ + +#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++" + +#define GCC_INCLUDE_DIR "/usr/include" + +/* FreeBSD has GCC_INCLUDE_DIR first. */ +#define INCLUDE_DEFAULTS \ + { \ + { GCC_INCLUDE_DIR, 0, 0 }, \ + { GPLUSPLUS_INCLUDE_DIR, 1, 1 }, \ + { 0, 0, 0 } \ + } + +/* Under FreeBSD, the normal location of the compiler back ends is the + /usr/libexec directory. */ + +#define STANDARD_EXEC_PREFIX "/usr/libexec/" + +/* Under FreeBSD, the normal location of the various *crt*.o files is the + /usr/lib directory. */ + +#define STANDARD_STARTFILE_PREFIX "/usr/lib/" + +/* On FreeBSD, gcc is called 'cc' */ +#define GCC_NAME "cc" + +/* FreeBSD is 4.4BSD derived */ +#define bsd4_4 + +#endif /* FREEBSD_NATIVE */ + #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dunix -Di386 -D__ELF__ -D__FreeBSD__=3 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"