From d60d750018dff687a89304a9736c6967e121c6dc Mon Sep 17 00:00:00 2001 From: sof Date: Wed, 25 Feb 1998 13:03:45 +0000 Subject: [PATCH] [project @ 1998-02-25 13:03:45 by sof] cygwin32: if no -o given, tell linker to create main.exe --- ghc/driver/ghc.lprl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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'); -- 1.7.10.4