Skip to content
Snippets Groups Projects
Commit b7cf40bb authored by Simon Marlow's avatar Simon Marlow
Browse files

[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.
parent 715e4745
No related merge requests found
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
dnl Extra autoconf macros for the Glasgow fptools dnl Extra autoconf macros for the Glasgow fptools
dnl dnl
...@@ -57,6 +57,11 @@ dnl underscore. ...@@ -57,6 +57,11 @@ dnl underscore.
dnl dnl
dnl We assume that they _haven't_ if anything goes wrong. dnl We assume that they _haven't_ if anything goes wrong.
dnl 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_DEFUN(FPTOOLS_UNDERSCORE,
[AC_CHECK_LIB(elf, nlist, LIBS="-lelf $LIBS")dnl [AC_CHECK_LIB(elf, nlist, LIBS="-lelf $LIBS")dnl
AC_CACHE_CHECK([leading underscore in symbol names], fptools_cv_lead_uscore, AC_CACHE_CHECK([leading underscore in symbol names], fptools_cv_lead_uscore,
...@@ -76,7 +81,8 @@ AC_TRY_RUN([#ifdef HAVE_NLIST_H ...@@ -76,7 +81,8 @@ AC_TRY_RUN([#ifdef HAVE_NLIST_H
#include <nlist.h> #include <nlist.h>
changequote(<<, >>)dnl changequote(<<, >>)dnl
<< <<
struct nlist xYzzY[] = {{"_xYzzY", 0},{0}}; struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
#endif #endif
main(argc, argv) main(argc, argv)
...@@ -84,7 +90,9 @@ int argc; ...@@ -84,7 +90,9 @@ int argc;
char **argv; char **argv;
{ {
#ifdef HAVE_NLIST_H #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);>> exit(0);>>
changequote([, ])dnl changequote([, ])dnl
#endif #endif
......
...@@ -113,14 +113,23 @@ i[[3456]]86-*-linux*) ...@@ -113,14 +113,23 @@ i[[3456]]86-*-linux*)
HostVendor_CPP='unknown' HostVendor_CPP='unknown'
HostOS_CPP='linux' HostOS_CPP='linux'
;; ;;
i[[3456]]86-*-freebsd*) i[[3456]]86-*-freebsd3*) # FreeBSD 3.0+ uses ELF
HostPlatform=i386-unknown-freebsd # hack again HostPlatform=i386-unknown-freebsd3 # hack again
TargetPlatform=i386-unknown-freebsd TargetPlatform=i386-unknown-freebsd3
BuildPlatform=i386-unknown-freebsd BuildPlatform=i386-unknown-freebsd3
HostPlatform_CPP='i386_unknown_freebsd' HostPlatform_CPP='i386_unknown_freebsd3'
HostArch_CPP='i386' HostArch_CPP='i386'
HostVendor_CPP='unknown' 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*) i[[3456]]86-*-netbsd*)
HostPlatform=i386-unknown-netbsd # hack again HostPlatform=i386-unknown-netbsd # hack again
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment