Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
ac2a6ec8
Commit
ac2a6ec8
authored
26 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1998-06-11 19:26:50 by sof]
-syslib win32: Do the right thing if using a non-installed compiler
parent
ab9db328
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/driver/ghc.lprl
+16
-11
16 additions, 11 deletions
ghc/driver/ghc.lprl
ghc/utils/mkdependHS/mkdependHS.prl
+23
-6
23 additions, 6 deletions
ghc/utils/mkdependHS/mkdependHS.prl
with
39 additions
and
17 deletions
ghc/driver/ghc.lprl
+
16
−
11
View file @
ac2a6ec8
...
...
@@ -2453,18 +2453,23 @@ sub add_Hsc_flags {
sub add_syslib {
local($syslib) = @_;
unshift(@SysImport_dir,
$INSTALLING ? "$InstLibDirGhc/imports/$syslib"
: "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib");
push(@SysLibrary_dir,
$INSTALLING ? ("$InstLibDirGhc")
: ("$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib",
"$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib/cbits"));
# The Win32 lib sources live in hslibs/
if ( $syslib eq 'win32' && ! $INSTALLING ) {
unshift(@SysImport_dir, "$TopPwd/hslibs/$syslib/src");
push(@SysLibrary_dir, "$TopPwd/hslibs/$syslib/src");
} else {
unshift(@SysImport_dir,
$INSTALLING ? "$InstLibDirGhc/imports/$syslib"
: "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib");
push(@SysLibrary_dir,
$INSTALLING ? ("$InstLibDirGhc")
: ("$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib",
"$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib/cbits"));
}
push(@SysLibrary, "-lHS$syslib");
push(@SysLibrary, "-lHS${syslib}_cbits")
unless $syslib =~ /^(contrib|exts|conc|win32)$/; #HACK! have no cbits
unless $syslib =~ /^(contrib|exts|conc
urrent
|win32)$/; #HACK! have no cbits
}
\end{code}
...
...
@@ -2813,7 +2818,7 @@ arg: while($_ = $Args[0]) {
/^-syslib(.*)/ && do { local($syslib) = &grab_arg_arg(*Args,'-syslib',$1);
print STDERR "$Pgm: no such system library (-syslib): $syslib\n",
$Status++ unless $syslib =~ /^(exts|misc|posix|win32)$/;
$Status++ unless $syslib =~ /^(exts|misc|posix|
concurrent|
win32)$/;
#
# The posix library is a `special' in that it relies on
...
...
This diff is collapsed.
Click to expand it.
ghc/utils/mkdependHS/mkdependHS.prl
+
23
−
6
View file @
ac2a6ec8
...
...
@@ -127,9 +127,14 @@ if (!$Include_prelude) {
}
foreach $lib ( @Syslibs ) {
local($dir) =
($INSTALLING) ? "${InstLibDirGhc}/imports/${lib}"
: "${TopPwd}/ghc/lib/${lib}";
local($dir);
if ( $lib eq 'win32' && ! $INSTALLING ) {
$dir = "${TopPwd}/hslibs/${lib}/src";
} else {
$dir = ($INSTALLING) ? "${InstLibDirGhc}/imports/${lib}"
: "${TopPwd}/ghc/lib/${lib}";
}
if (!$Include_prelude) {
push(@Ignore_dirs,$dir);
} else {
...
...
@@ -360,7 +365,8 @@ sub preprocess_import_dirs {
sub slurp_file_for_imports {
local($file_to_read, $orig_src_file) = @_;
local($follow_file);
local($follow_file,$read_from_file);
local($cleanup)=0;
local($last_seen_dir) = $orig_src_file;
$last_seen_dir =~ s/\/[^\/]+$//; # strip to dir name
...
...
@@ -373,13 +379,17 @@ sub slurp_file_for_imports {
local ($open_cmd);
if ($Cpp_flag_set) {
$open_cmd = "${SED} -e '/^# *include/{p;s/^# *include/!include/;};s/'\\''//g;s/\"//g' $file_to_read | $Cpp $Include_dirs -I$last_seen_dir @Defines |";
# $open_cmd = "${SED} -e '/^# *include/{p;s/^# *include/!include/;};s/'\\''//g;s/\"//g' $file_to_read | $Cpp $Include_dirs -I$last_seen_dir @Defines |";
&run_something("${SED} -e '/^# *include/{p;s/^# *include/!include/;};s/'\\''//g;s/\"//g' $file_to_read | $Cpp $Include_dirs -I$last_seen_dir @Defines 2>&1 > ${file_to_read}.i", 'Running cpp');
$read_from_file="${file_to_read}.i";
$cleanup=1;
} else {
$read_from_file="${file_to_read}";
$open_cmd = $file_to_read;
}
print STDERR "$open_cmd\n" if $Verbose;
open(SRCFILE, $
open_cmd
) || die "$Pgm: Can't open $file_to_read: $!\n";
open(SRCFILE, $
read_from_file
) || die "$Pgm: Can't open $file_to_read: $!\n";
while (<SRCFILE>) {
#
...
...
@@ -396,6 +406,13 @@ sub slurp_file_for_imports {
&process_dependency($todo,$source,$modname);
}
close(SRCFILE) || exit(1);
# remove temporary file, if any.
if ($cleanup) {
# truncate() may not be implemented, so we
# play it safe here.
local(*TRUNC);
open(TRUNC,"> $read_from_file") && close(TRUNC);
}
}
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment