From: simonmar Date: Wed, 15 Dec 1999 09:43:25 +0000 (+0000) Subject: [project @ 1999-12-15 09:43:23 by simonmar] X-Git-Tag: Approximately_9120_patches~5379 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=4ca466da9af039d6d0d72333f464b687f2fd4a07;p=ghc-hetmet.git [project @ 1999-12-15 09:43:23 by simonmar] Add NetBSD/x86 support. --- diff --git a/ghc/driver/ghc-asm.lprl b/ghc/driver/ghc-asm.lprl index 193e710..590b3a1 100644 --- a/ghc/driver/ghc-asm.lprl +++ b/ghc/driver/ghc-asm.lprl @@ -104,7 +104,7 @@ sub init_TARGET_STUFF { $T_HDR_direct = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n"; #--------------------------------------------------------# - } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd2|nextstep3|cygwin32|mingw32)$/ ) { + } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd2|netbsd|nextstep3|cygwin32|mingw32)$/ ) { # NeXT added but not tested. CaS $T_STABBY = 1; # 1 iff .stab things (usually if a.out format) @@ -135,12 +135,12 @@ sub init_TARGET_STUFF { $T_HDR_direct = "\.text\n\t\.align 2,0x90\n"; #--------------------------------------------------------# - } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|freebsd3)$/ ) { + } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|freebsd3|netbsd_elf)$/ ) { $T_STABBY = 0; # 1 iff .stab things (usually if a.out format) $T_US = ''; # _ if symbols have an underscore on the front $T_PRE_APP = # regexp that says what comes before APP/NO_APP - ($TargetPlatform =~ /-(linux|freebsd3)$/) ? '#' : '/' ; + ($TargetPlatform =~ /-(linux|freebsd3|netbsd_elf)$/) ? '#' : '/' ; $T_CONST_LBL = '^\.LC(\d+):$'; # regexp for what such a lbl looks like $T_POST_LBL = ':'; $T_X86_PRE_LLBL_PAT = '\.L'; @@ -150,7 +150,7 @@ sub init_TARGET_STUFF { $T_MOVE_DIRVS = '^(\s*(\.(p2)?align\s+\d+(,0x90)?|\.globl\s+\S+|\.text|\.data|\.section\s+.*|\.type\s+.*|\.Lfe.*\n\t\.size\s+.*|\.size\s+.*|\.ident.*)\n)'; $T_COPY_DIRVS = '\.(globl)'; - if ( $TargetPlatform =~ /freebsd3/ ) { + if ( $TargetPlatform =~ /freebsd3|netbsd_elf/ ) { $T_hsc_cc_PAT = '\.ascii.*\)(hsc|cc) (.*)\\\\11"\n\t\.ascii\s+"(.*)\\\\0"'; } else { $T_hsc_cc_PAT = '\.string.*\)(hsc|cc) (.*)\\\\t(.*)"'; diff --git a/ghc/rts/MBlock.c b/ghc/rts/MBlock.c index 2626304..eeb3bde 100644 --- a/ghc/rts/MBlock.c +++ b/ghc/rts/MBlock.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: MBlock.c,v 1.12 1999/09/16 08:37:08 sof Exp $ + * $Id: MBlock.c,v 1.13 1999/12/15 09:43:24 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -47,6 +47,10 @@ */ #define ASK_FOR_MEM_AT 0x50000000 +#elif netbsd_TARGET_OS +/* NetBSD i386 shared libs are at 0x40000000 + */ +#define ASK_FOR_MEM_AT 0x50000000 #elif linux_TARGET_OS /* Any ideas? */