From a279d5ac5490599065e138b497cac6c3794f7a6d Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 27 Oct 1999 09:45:50 +0000 Subject: [PATCH] [project @ 1999-10-27 09:45:49 by simonmar] Add way 's', for SMP/PThreads --- ghc/driver/ghc.lprl | 10 ++++++++-- mk/config.mk.in | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index 965a8d6..2541fe1 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -304,6 +304,7 @@ $BuildTag = ''; # default is sequential build w/ Appel-style GC '_p', "Profiling", '_t', "Ticky-ticky Profiling", '_u', "Unregisterised", + '_s', "SMP", '_mp', "Parallel", '_mg', "Gransim", # system ways end @@ -351,8 +352,9 @@ $BuildTag = ''; # default is sequential build w/ Appel-style GC '_p', "-fscc-profiling -DPROFILING -optc-DPROFILING", '_t', "-fticky-ticky -DTICKY_TICKY -optc-DTICKY_TICKY", '_u', "-optc-DNO_REGS -optc-DUSE_MINIINTERPRETER -fno-asm-mangling -funregisterised", - '_mp', "-fstack-check -fparallel -D__PARALLEL_HASKELL__ -optc-DPAR", - '_mg', "-fstack-check -fconcurrent -fgransim -D__GRANSIM__ -D__CONCURRENT_HASKELL__ -optc-DCONCURRENT -optc-DGRAN"); + '_s', "-fparallel -optc-pthread -optl-pthread -optc-DSMP", + '_mp', "-fparallel -D__PARALLEL_HASKELL__ -optc-DPAR", + '_mg', "-fgransim -D__GRANSIM__ -optc-DGRAN"); # where to look for interface files (system hi's, i.e., prelude and syslibs) @SysImport_dir = ( $INSTALLING ) @@ -901,6 +903,9 @@ sub setupBuildFlags { exit(1); } + } elsif ( $SMPing eq 's') { + $BuildTag = '_s'; + } elsif ( $GRANing eq 'g' ) { if ($TICKYing eq 't') { print STDERR "$Pgm: Can't mix -gransim with -ticky.\n"; exit 1; } $BuildTag = '_mg'; @@ -2943,6 +2948,7 @@ arg: while($_ = $Args[0]) { /^-gransim$/ && do { $GRANing = 'g'; &add_syslib('concurrent'); next arg; }; # GranSim /^-ticky$/ && do { $TICKYing = 't'; next arg; }; # ticky-ticky /^-parallel$/ && do { $PARing = 'p'; &add_syslib('concurrent'); next arg; }; # parallel Haskell + /^-smp$/ && do { $SMPing = 's'; &add_syslib('concurrent'); next arg; }; # parallel Haskell #-------------- "user ways" -------------------------------------------- diff --git a/mk/config.mk.in b/mk/config.mk.in index 64bbc65..7ce15a8 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -676,7 +676,7 @@ HSTAGS = $(HSTAGS_PREFIX)hstags # # The ways currently defined. # -ALL_WAYS=p t u mp mg a b c d e f g h i j k l m n o A B +ALL_WAYS=p t u s mp mg a b c d e f g h i j k l m n o A B # # The following ways currently have treated specially, p u t mg, @@ -698,6 +698,10 @@ WAY_t_HC_OPTS= -ticky WAY_u_NAME=unregisterized (using portable C only) WAY_u_HC_OPTS=-unreg +# Way `s': +WAY_s_NAME=threads (for SMP) +WAY_s_HC_OPTS=-smp + # Way `mp': WAY_mp_NAME=parallel WAY_mp_HC_OPTS=-parallel -- 1.7.10.4