: "$TopPwd/${CURRENT_DIR}" );
if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
- $Tmp_prefix = ($ENV{'TMPDIR'} . "/ghc$$");
+ # Try to find a $Tmp_prefix which isn't being used...
+ $tmp = $$;
+ do {
+ $Tmp_prefix = ($ENV{'TMPDIR'} . "/ghc$tmp");
+ $tmp++;
+ } while ( -e "$Tmp_prefix.hc" ||
+ -e "$Tmp_Prefix.s" ||
+ -e "$Tmp_Prefix.hi" );
} else {
print STDERR "TMPDIR has not been set to anything useful!\n" if (${TMPDIR} eq '');
$Tmp_prefix ="${TMPDIR}/ghc$$"; # TMPDIR set via Makefile when booting..
# 'java' ==> .java output
# 'none' ==> no code output
$HscLang = 'asm'
- if ($HaveNativeCodeGen ne 'YES') && $TargetPlatform =~ /^(alpha)-/;
+ if ($HaveNativeCodeGen eq 'YES') && $TargetPlatform =~ /^(i386)-/;
-# TEMP: disable x86 & Sparc if $HaveNativeCodeGen && $TargetPlatform =~ /^(i386|alpha|sparc)-/;
$ProduceHi = '-hifile=';
$HiOnStdout = 0;
$HiWith = '';
push (@Include_dir, "$TopPwd/${CURRENT_DIR}/${GHC_INCLUDE_DIR}");
} else {
push (@Include_dir, "$InstLibDirGhc/includes");
- push (@Include_dir, "$InstLibDirGhc/includes");
}
} # end of setupIncPaths
\end{code}
( $HscLang eq 'java' ) ? "java" :
"" ;
- local($hsc_out) = $Tmp_prefix.$hsc_out_suffix ;
- local($hsc_out_c_stub) = ( $HscLang eq 'C' ) ? "${Tmp_prefix}_stb.c" : "";
- local($hsc_out_h_stub) = ( $HscLang eq 'C' ) ? "${Tmp_prefix}_stb.h" : "";
+ local($hsc_out) = "$Tmp_prefix.$hsc_out_suffix" ;
+ local($hsc_out_c_stub) = "${Tmp_prefix}_stb.c";
+ local($hsc_out_h_stub) = "${Tmp_prefix}_stb.h";
if ($Only_preprocess_hc) { # stop after having run $Cc -E
$do_as=0;
, 'lang concurrent posix' # Syslib dependencies
, '' # extra ghc opts
, '' # extra cc opts
- , '' # extra ld opts
+ , "$LibsReadline" # extra ld opts
],
win32,
local($opt_lev) = ( /^-O2$/ ) ? 2 : 1; # max 'em
$OptLevel = ( $opt_lev > $OptLevel ) ? $opt_lev : $OptLevel;
- $HscLang = 'C' if $OptLevel == 2; # force use of C compiler
+ $HscLang = 'C'; # force use of C compiler
next arg; };
/^-Onot$/ && do { $OptLevel = 0; next arg; }; # # set it to <no opt>