HOSTPLATFORM TARGETPLATFORM
-PROJECTNAME PROJECTVERSION PROJECTPATCHLEVEL
+ProjectName ProjectVersion ProjectVersionInt ProjectPatchLevel
TOP_PWD
$Oopt_FinalStgProfilingMassage = '';
$Oopt_StgStats = '';
$Oopt_SpecialiseUnboxed = '';
- $Oopt_DoSpecialise = ''; # ToDo:LATER: '-fspecialise';
+ $Oopt_DoSpecialise = '-fspecialise';
$Oopt_FoldrBuild = 0; # *Off* by default!
$Oopt_FB_Support = ''; # was '-fdo-arity-expand';
# $Oopt_FoldrBuildWW = 0; # Off by default
# We need to look in ghc/ and glaExts/ when searching for implicitly needed .hi files, but
# we should really *not* look there for explicitly imported modules.
-$GhcVersionInfo = int($PROJECTVERSION * 100 + .5); # i.e., round (X.Y * 100)
+$GhcVersionInfo = $ProjectVersionInt;
$Haskell1Version = 4; # i.e., Haskell 1.4
@Cpp_define = ();
# TEMP: disable x86 if $HaveNativeCodeGen && $TargetPlatform =~ /^(i386|alpha|sparc)-/;
$ProduceHi = '-hifile=';
$HiOnStdout = 0;
+$HiWith = '';
$HiDiff_flag = '';
$Keep_HiDiffs = 0;
$Oopt_UnfoldingUseThreshold,
$Oopt_MaxSimplifierIterations,
$Oopt_ShowSimplifierProgress,
+ #
+ # The presence of -fclone-binds is *crucial* here as
+ # -ffull-laziness (which we're about to do next) floats
+ # bindings outwards, so we better make sure that this
+ # doesn't result in the floating out of bindings
+ # with identical uniques, i.e., -ffull-laziness needs
+ # to be preceeded by a simplifier pass with -fclone-binds
+ # set.
+ '-fclone-binds',
']',
#LATER: '-fcalc-inlinings1', -- pointless for 2.01
Tell the world who we are, if they asked.
\begin{code}
-print STDERR "${PROJECTNAME}, version ${PROJECTVERSION}, patchlevel ${PROJECTPATCHLEVEL}\n"
+print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n"
if $Verbose;
\end{code}
# for a linker, use an explicitly given one, or the going C compiler ...
local($lnkr) = ( $Lnkr ) ? $Lnkr : $CcRegd;
+ if ( ($Specific_output_file eq '') &&
+ ($TargetPlatform eq 'i386-unknown-cygwin32') ) {
+ $Specific_output_file = 'main.exe';
+ print STDERR "Output file not specified, defaulting to \"main.exe\"\n";
+ }
+
local($output) = ($Specific_output_file ne '') ? "-o $Specific_output_file" : '';
- @Files_to_tidy = ($Specific_output_file ne '') ?
- $Specific_output_file :
- ( ($TargetPlatform eq 'i386-unknown-cygwin32') ? 'main.exe' : 'a.out');
- print STDERR "Output file not specified, defaulting to \"main.exe\"\n" if ($Specific_output_file eq '' && $TargetPlatform eq 'i386-unknown-cygwin32');
+ @Files_to_tidy = ($Specific_output_file ne '') ? $Specific_output_file : 'a.out';
local($to_do) = "$lnkr $Verbose @Ld_flags $output @Link_file $TopClosureFile $libdirs @UserLibrary @SysLibrary";
&run_something($to_do, 'Linker');
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} ${ProjectPatchLevel}
#
\$pvm_executable = '$pvm_executable';
\$pvm_executable_base = '$pvm_executable_base';
local($syslib) = @_;
unshift(@SysImport_dir,
- ${INSTALLING} ? "$InstLibDir/imports/$syslib"
+ $INSTALLING ? "$InstLibDirGhc/imports/$syslib"
: "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib");
push(@SysLibrary_dir,
- ${INSTALLING} ? ("$InstLibDir")
+ $INSTALLING ? ("$InstLibDirGhc")
: ("$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib",
"$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib/cbits"));
push(@SysLibrary, "-lHS$syslib");
push(@SysLibrary, "-lHS${syslib}_cbits")
- unless $syslib eq 'contrib' || $syslib eq 'exts' || $syslib eg 'conc';
+ unless $syslib eq 'contrib' || $syslib eq 'exts' || $syslib eq 'concurrent';
#HACK! they have no cbits
}
\end{code}
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}, patchlevel ${ProjectPatchLevel}\n"; exit $Status; };
#---------- verbosity and such -----------------------------------------
/^-v$/ && do { $Verbose = '-v'; $Time = 'time'; next arg; };
next arg; };
# leave out actual C generation (debugging) [also turns off interface gen]
- /^-hi$/ && do { $HiOnStdout = 1; $ProduceHi = '-hifile='; next arg; };
+
+ /^-hi$/ && do { $HiOnStdout = 1; $ProduceHi = '-hifile='; next arg; };
# _do_ generate an interface; usually used as: -noC -hi
+ /^-hi-with-(.*)$/ && do { $HiOnStdout = 1; $HiWith .= " $1" ; $ProduceHi = '-hifile='; next arg; };
+ # limit ourselves to outputting a particular section.
/^-nohi$/ && do { $ProduceHi = '-nohifile='; next arg; };
# don't generate an interface (even if generating C)
#--------- ticky/concurrent/parallel -----------------------------------
# we sort out the details a bit later on
- /^-concurrent$/ && do { $CONCURing = 'c'; &add_syslib('conc'); next arg; };
+ /^-concurrent$/ && do { $CONCURing = 'c'; &add_syslib('concurrent'); next arg; };
# concurrent Haskell; implies -syslib conc
/^-gransim$/ && do { $GRANing = 'g'; next arg; }; # GranSim
/^-ticky$/ && do { $TICKYing = 't'; next arg; }; # ticky-ticky
#
&add_syslib($syslib);
if ( $syslib eq 'posix' ) {
- &add_syslib('ghc');
- } elsif ( $syslib eq 'ghc' &&
+ &add_syslib('misc');
+ } elsif ( $syslib eq 'misc' &&
$TargetName =~ /-solaris2$/ ) {
# needed for Berkeley socket/nwork stuff.
push(@SysLibrary, '-lnsl');
/^-optP(.*)$/ && do { push(@HsCpp_flags, $1); next arg; };
/^-optCrts(.*)$/&& do { push(@HsC_rts_flags, $1); next arg; };
/^-optC(.*)$/ && do { push(@HsC_flags, $1); next arg; };
+ /^-optp(.*)$/ && do { push(@HsP_flags, $1); next arg; };
/^-optcpp(.*)$/ && do { push(@Cpp_define, $1); $Only_preprocess_hc = ($1 eq "-E"); next arg; };
/^-optc(.*)$/ && do { push(@CcBoth_flags, $1); next arg; };
/^-opta(.*)$/ && do { push(@As_flags, $1); next arg; };