From: simonm Date: Mon, 5 Oct 1998 14:15:32 +0000 (+0000) Subject: [project @ 1998-10-05 14:15:31 by simonm] X-Git-Tag: Approx_2487_patches~247 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b7cf40bb1d6750283c703e386d61ef5bd8ae754c;hp=715e47459372ca57a332d4973f906313f8fc6bb1;p=ghc-hetmet.git [project @ 1998-10-05 14:15:31 by simonm] Add support for FreeBSD 3.0 (ELFish). Rename i386-unknown-freebsd to i386-unknown-freebsd2, and add i386-unknown-freebsd3. NOTE: this won't bootstrap an ELF GHC using an a.out GHC, some laying on of hands is required for that. --- diff --git a/aclocal.m4 b/aclocal.m4 index 09f7790..527cd07 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.28 1998/09/29 17:30:09 sof Exp $ +dnl $Id: aclocal.m4,v 1.29 1998/10/05 14:15:32 simonm Exp $ dnl dnl Extra autoconf macros for the Glasgow fptools dnl @@ -57,6 +57,11 @@ dnl underscore. dnl dnl We assume that they _haven't_ if anything goes wrong. dnl +dnl Some nlist implementations seem to try to be compatible by ignoring +dnl a leading underscore sometimes (eg. FreeBSD). We therefore have +dnl to work around this by checking for *no* leading underscore first. +dnl Sigh. --SDM +dnl AC_DEFUN(FPTOOLS_UNDERSCORE, [AC_CHECK_LIB(elf, nlist, LIBS="-lelf $LIBS")dnl AC_CACHE_CHECK([leading underscore in symbol names], fptools_cv_lead_uscore, @@ -76,7 +81,8 @@ AC_TRY_RUN([#ifdef HAVE_NLIST_H #include changequote(<<, >>)dnl << -struct nlist xYzzY[] = {{"_xYzzY", 0},{0}}; +struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}}; +struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}}; #endif main(argc, argv) @@ -84,7 +90,9 @@ int argc; char **argv; { #ifdef HAVE_NLIST_H - if(nlist(argv[0], xYzzY) == 0 && xYzzY[0].n_value != 0) + if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0) + exit(1); + if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0) exit(0);>> changequote([, ])dnl #endif diff --git a/configure.in b/configure.in index dcb5fa0..b12f682 100644 --- a/configure.in +++ b/configure.in @@ -113,14 +113,23 @@ i[[3456]]86-*-linux*) HostVendor_CPP='unknown' HostOS_CPP='linux' ;; -i[[3456]]86-*-freebsd*) - HostPlatform=i386-unknown-freebsd # hack again - TargetPlatform=i386-unknown-freebsd - BuildPlatform=i386-unknown-freebsd - HostPlatform_CPP='i386_unknown_freebsd' +i[[3456]]86-*-freebsd3*) # FreeBSD 3.0+ uses ELF + HostPlatform=i386-unknown-freebsd3 # hack again + TargetPlatform=i386-unknown-freebsd3 + BuildPlatform=i386-unknown-freebsd3 + HostPlatform_CPP='i386_unknown_freebsd3' HostArch_CPP='i386' HostVendor_CPP='unknown' - HostOS_CPP='freebsd' + HostOS_CPP='freebsd3' + ;; +i[[3456]]86-*-freebsd2*) # Older FreeBSDs are a.out + HostPlatform=i386-unknown-freebsd2 # hack again + TargetPlatform=i386-unknown-freebsd2 + BuildPlatform=i386-unknown-freebsd2 + HostPlatform_CPP='i386_unknown_freebsd2' + HostArch_CPP='i386' + HostVendor_CPP='unknown' + HostOS_CPP='freebsd2' ;; i[[3456]]86-*-netbsd*) HostPlatform=i386-unknown-netbsd # hack again