From: sof Date: Wed, 25 Feb 1998 13:03:45 +0000 (+0000) Subject: [project @ 1998-02-25 13:03:45 by sof] X-Git-Tag: Approx_2487_patches~918 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d60d750018dff687a89304a9736c6967e121c6dc;p=ghc-hetmet.git [project @ 1998-02-25 13:03:45 by sof] cygwin32: if no -o given, tell linker to create main.exe --- diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index 7eecf6f..d01f71f 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -1380,11 +1380,14 @@ if ($Do_lnkr) { # 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');