# 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 = $ProjectVersionInt
+$GhcVersionInfo = $ProjectVersionInt;
$Haskell1Version = 4; # i.e., Haskell 1.4
@Cpp_define = ();
# 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');
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"));
/^-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; };