From: sof Date: Wed, 4 Feb 1998 22:24:55 +0000 (+0000) Subject: [project @ 1998-02-04 22:24:55 by sof] X-Git-Tag: Approx_2487_patches~992 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=f3386bdb5876d21e7ae876ad7b82f1517c5d643e;p=ghc-hetmet.git [project @ 1998-02-04 22:24:55 by sof] Warn specially if users should supply interface files on the command line. --- diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index 8ed8c07..2e0eaf1 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -1697,10 +1697,15 @@ Finally, decide what to queue up for linker input. #ToDo: local($or_isuf) = ($Isuffix eq '') ? '' : "|$Isuffix"; - if ( $ifile !~ /\.(lhs|hs|hc|c|s)$/ && $ifile !~ /_hc$/ ) { - print STDERR "$Pgm: don't recognise suffix on `$ifile'; passing it through to linker\n" - if $ifile !~ /\.a$/; + if ( $ifile !~ /\.(lhs|hs|hc|c|s|a)$/ && $ifile !~ /_hc$/ ) { + # There's sometimes confusion regarding .hi files; users + # supplying them on the command line. + if ( $ifile =~ /\.hi$/ ) { + print STDERR "$Pgm: warning: found `$ifile' on command line; interface files should not be supplied here - ignoring it.\n"; + } else { + print STDERR "$Pgm: don't recognise suffix on `$ifile'; passing it through to linker\n"; + } # oops; we tentatively pushed the wrong thing; fix & do the right thing pop(@Link_file); push(@Link_file, $ifile); }