X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdriver%2Fghc.lprl;h=2541fe1814affa4a5b787df05f3e714b8e982fb6;hb=a279d5ac5490599065e138b497cac6c3794f7a6d;hp=b9d4ef2f1f62dffbf4af16f5903412cb8ee999c4;hpb=74a70c1b2b710d0a4e03e9b675e5fff0dde9aa2b;p=ghc-hetmet.git diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index b9d4ef2..2541fe1 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -98,7 +98,7 @@ INSTALLING HOSTPLATFORM TARGETPLATFORM -ProjectName ProjectVersion ProjectVersionInt ProjectPatchLevel +ProjectName ProjectVersion ProjectVersionInt HscMajorVersion HscMinorVersion CcMajorVersion CcMinorVersion @@ -108,11 +108,11 @@ bindir libdir libexecdir datadir CURRENT_DIR TMPDIR -GHC_LIB_DIR GHC_RUNTIME_DIR GHC_UTILS_DIR GHC_INCLUDE_DIR +GHC_LIB_DIR GHC_RUNTIME_DIR GHC_INCLUDE_DIR GHC_OPT_HILEV_ASM GhcWithNativeCodeGen -GHC_UNLIT GHC_HSCPP GHC_HSC GHC_SYSMAN +GHC_UNLIT GHC_HSCPP GHC_MKDEPENDHS GHC_HSC GHC_SYSMAN CP RM CONTEXT_DIFF @@ -279,6 +279,7 @@ these are turned off by -Wnot. \begin{code} @StandardWarnings = ('-fwarn-overlapping-patterns', '-fwarn-missing-methods', + '-fwarn-missing-fields', '-fwarn-duplicate-exports'); @MinusWOpts = (@StandardWarnings, '-fwarn-unused-binds', @@ -303,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 @@ -350,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 ) @@ -367,7 +370,8 @@ $Haskell1Version = 5; # i.e., Haskell 1.4 # Cpp symbols defined when we're processing Haskell source. @HsSourceCppOpts = - ( "-D__HASKELL1__=$Haskell1Version" + ( "-D__HASKELL__=98" + , "-D__HASKELL1__=$Haskell1Version" , "-D__GLASGOW_HASKELL__=$ProjectVersionInt" , "-D__HASKELL98__" , "-D__CONCURRENT_HASKELL__" @@ -383,15 +387,10 @@ $Haskell1Version = 5; # i.e., Haskell 1.4 ) ); -$TopClosureFile # defaults to 1.2 one; will be mangled later - = ''; -# ( $INSTALLING) ? "$InstLibDirGhc/TopClosureXXXX.o" -# : "$TopPwd/$CURRENT_DIR/$GHC_RUNTIME_DIR/main/TopClosureXXXX.o"; - # make depend for Haskell $MkDependHS = ( $INSTALLING ) ? "$InstLibExecDirGhc/mkdependHS" - : "$TopPwd/$CURRENT_DIR/$GHC_UTILS_DIR/mkdependHS/mkdependHS"; + : "$TopPwd/$CURRENT_DIR/$GHC_MKDEPENDHS"; # Fill in later @MkDependHS_flags = (); @@ -904,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'; @@ -1139,7 +1141,7 @@ sub setupSyslibs { # to implement the itimers, since cygwin.dll does not # support it. Only reqd. for `ways' that use itimers. # - push(@SysLibrary, '-lwinmm') if $TargetPlatform eq 'i386-unknown-cygwin32'; + push(@SysLibrary, '-lwinmm') if ($TargetPlatform =~ /-(mingw32|cygwin32)$/); # Note: currently only tested with mingw, may cause conflicts when linking # with libcygwin.a push(@SysLibrary, '-lwsock32') if ($TargetPlatform =~ /-(mingw32|cygwin32)$/); @@ -1226,8 +1228,7 @@ if ($#Input_file < 0 && $#Link_file < 0) { Tell the world who we are, if they asked. \begin{code} -print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n" - if $Verbose; +print STDERR "${ProjectName}, version ${ProjectVersion}\n" if $Verbose; \end{code} %************************************************************************ @@ -1470,8 +1471,10 @@ Now the Haskell compiler, C compiler, and assembler local ($hsc_out_o_stub); ($ofile_s_stub_target = $ofile_c_stub_target) =~ s/\.(.*)$/\.s/; ($ofile_o_stub_target = $ofile_c_stub_target) =~ s/\.(.*)$/\.o/; - &runGcc (0, $ofile_c_stub_target, $ofile_s_stub_target); - &runAs ($ofile_o_stub_target, $ofile_s_stub_target); + if ($do_cc) { + &runGcc (0, $ofile_c_stub_target, $ofile_s_stub_target); + &runAs ($ofile_o_stub_target, $ofile_s_stub_target); + } # # Bring the C stub protos into scope when compiling the .hc file. # @@ -1817,7 +1820,7 @@ Invoke the 'linker' - either the standard linker or the one used to build a (Win32) DLL. \begin{code} -sub runLinker() +sub runLinker { local($libdirs) = ''; @@ -1845,7 +1848,7 @@ sub runLinker() &prepareWin32DllLink(1); - local($to_do) = "$lnkr $Verbose @Ld_flags $output @Link_file $TopClosureFile $libdirs @UserLibrary @SysLibrary"; + local($to_do) = "$lnkr $Verbose @Ld_flags $output @Link_file $libdirs @UserLibrary @SysLibrary"; &run_something($to_do, 'Linker'); # finally, check the consistency info in the binary @@ -1890,7 +1893,7 @@ eval 'exec perl -S \$0 \${1+"\$@"}' if \$running_under_some_shell; # =!=!=!=!=!=!=!=!=!=!=! # This script is automatically generated: DO NOT EDIT!!! -# Generated by Glasgow Haskell, version ${ProjectVersion} ${ProjectPatchLevel} +# Generated by Glasgow Haskell, version ${ProjectVersion} # \$pvm_executable = '$pvm_executable'; \$pvm_executable_base = '$pvm_executable_base'; @@ -1940,7 +1943,7 @@ EOSCRIPT2 } } -sub createWin32DLL() +sub createWin32DLL { local ($libdirs); @@ -1984,7 +1987,7 @@ sub createWin32DLL() &run_something($to_do, 'DLL creator'); } -sub prepareWin32DllLink () +sub prepareWin32DllLink { local($linking_main) = @_; @@ -2004,10 +2007,10 @@ sub prepareWin32DllLink () foreach $a ( @UserLibrary ) { $a = "${a}_imp" if ($a =~ /^-lHS/); } - push(@Link_file, ( $INSTALLING ) ? "$InstLibDirGhc/Main.o" - : "$TopPwd/$CURRENT_DIR/$GHC_RUNTIME_DIR/Main.o") if $linking_main; - push(@Link_file, ( $INSTALLING ) ? "$InstLibDirGhc/PrelMain.o" - : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/PrelMain.o") if $linking_main; + push(@Link_file, ( $INSTALLING ) ? "$InstLibDirGhc/Main.dll_o" + : "$TopPwd/$CURRENT_DIR/$GHC_RUNTIME_DIR/Main.dll_o") if $linking_main; + push(@Link_file, ( $INSTALLING ) ? "$InstLibDirGhc/PrelMain.dll_o" + : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/std/PrelMain.dll_o") if $linking_main; } push(@Ld_flags, "-mno-cygwin"); } @@ -2496,7 +2499,7 @@ sub add_syslib { ? "$InstLibDirGhc" : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/misc/cbits" ) - , 'exts' # Syslib dependencies + , 'exts concurrent' # Syslib dependencies , '' # extra ghc opts , '' # extra cc opts , ( $TargetPlatform =~ /-solaris2$/ ? '-lnsl -lsocket' : '') @@ -2665,7 +2668,7 @@ sub check_for_source_options { open(FILE,$file) || return(1); # No big loss while () { - if ( /^${comment_start} OPTIONS (.*)${comment_end}$/ ) { + if ( /^${comment_start} OPTIONS (.*)${comment_end}/ ) { # add the options found at the back of the command line. local(@entries) = split(/\s+/,$1); print STDERR "Found OPTIONS " . join(' ',@entries) . " in $file\n" if $Verbose; @@ -2771,7 +2774,7 @@ arg: while($_ = $Args[0]) { if (/^-\?$/ || /^--?help$/) { print $LongUsage; exit $Status; } #-----------version ---------------------------------------------------- - /^--version$/ && do { print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n"; exit $Status; }; + /^--version$/ && do { print STDERR "${ProjectName}, version ${ProjectVersion}\n"; exit $Status; }; #---------- verbosity and such ----------------------------------------- /^-v$/ && do { $Verbose = '-v'; $Time = 'time'; next arg; }; @@ -2945,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" --------------------------------------------