summaryrefslogtreecommitdiff
path: root/cygwin32
diff options
context:
space:
mode:
authorBlair Zajac <blair@orcaware.com>1998-03-06 02:29:29 -0800
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-03-16 13:08:55 +0000
commite9cb6d146cf75820a5771a80b499a65f1217c427 (patch)
tree870daebb6306839514708380c6b367b589470ac6 /cygwin32
parente5c9fcd0420f2862565625a4bd5596204107f54f (diff)
downloadperl-e9cb6d146cf75820a5771a80b499a65f1217c427.tar.gz
PATCH: util.c and util.h function declarations do not match
Date: Fri, 6 Mar 1998 10:29:29 -0800 (PST) Subject: PATCH: cgywin32 patch for perlgcc Date: Fri, 6 Mar 1998 11:15:36 -0800 (PST) Subject: PATCH: perl5.004_62 on cygwin32 Date: Fri, 6 Mar 1998 11:57:35 -0800 (PST) p4raw-id: //depot/perl@813
Diffstat (limited to 'cygwin32')
-rw-r--r--cygwin32/perlgcc32
-rw-r--r--cygwin32/perlld26
2 files changed, 36 insertions, 22 deletions
diff --git a/cygwin32/perlgcc b/cygwin32/perlgcc
index 97d7d1a8a5..dbb9962ccf 100644
--- a/cygwin32/perlgcc
+++ b/cygwin32/perlgcc
@@ -30,21 +30,21 @@ $libflagString = join(" ",@libFlags);
# make exports file
my $command = "echo EXPORTS > perl.def";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
$command ="nm $libstring | grep '^........ [TCD] _'| grep -v _impure_ptr | sed 's/[^_]*_//' >> perl.def";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
# Build the perl.a lib to link to:
$command ="dlltool --as=as --dllname perl.exe --def perl.def --output-lib perl.a";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
# change name of export lib to libperlexp so that is can be understood by ld2/perlld
$command ="mv perl.a libperlexp.a";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
# get the full path name of a few libs:
my $crt0 = `gcc -print-file-name=crt0.o`;
@@ -53,25 +53,39 @@ my $libdir = `gcc -print-file-name=libcygwin.a`;
chomp $libdir;
$libdir =~ s/libcygwin\.a//g;
+# when $crt0 and $libdir get used in the system calls below, the \'s
+# from the gcc -print-file-name get used to create special characters,
+# such as \n, \t. Replace the \'s with /'s so that this does not
+# happen:
+$crt0 =~ s:\\:/:g;
+$libdir =~ s:\\:/:g;
+
+# when $crt0 and $libdir get used in the system calls below, the \'s
+# from the gcc -print-file-name get used to create special characters,
+# such as \n, \t. Replace the \'s with /'s so that this does not
+# happen:
+$crt0 =~ s:\\:/:g;
+$libdir =~ s:\\:/:g;
+
# Link exe:
$command = "ld --base-file perl.base -o perl.exe $crt0 $obsString $libstring -L$libdir $libflagString";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
$command = "dlltool --as=as --dllname perl.exe --def perl.def --base-file perl.base --output-exp perl.exp";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
$command = "ld --base-file perl.base perl.exp -o perl.exe $crt0 $obsString $libstring -L$libdir $libflagString";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
$command = "dlltool --as=as --dllname perl.exe --def perl.def --base-file perl.base --output-exp perl.exp";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
$command = "ld perl.exp -o perl.exe $crt0 $obsString $libstring -L$libdir $libflagString";
print "$command\n";
-system($command);
+system($command) == 0 or die "system() failed.\n";
print "perlgcc: Completed\n";
diff --git a/cygwin32/perlld b/cygwin32/perlld
index 1622f2ffaf..97edfd64dd 100644
--- a/cygwin32/perlld
+++ b/cygwin32/perlld
@@ -47,54 +47,54 @@ if( $args=~/\-o (.+?)\.dll/i){
writeInit();
$command = "gcc -c $fixup.c\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "gcc -c $init.cc\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "echo EXPORTS > $libname.def\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "nm ".join(" ",@objs)." $init.o $fixup.o | grep '^........ [TCD] _' | sed 's/[^_]*_//' >> $libname.def\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "ld --base-file $libname.base --dll -o $libname.dll ".join(" ",@objs)." $init.o $fixup.o ";
$command .= join(" ",@flags)." -e _dll_entry\@12 \n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "dlltool --as=as --dllname $libname.dll --def $libname.def --base-file $libname.base --output-exp $libname.exp\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "ld --base-file $libname.base $libname.exp --dll -o $libname.dll ".join(" ",@objs)." $init.o $fixup.o ";
$command .= join(" ",@flags)." -e _dll_entry\@12 \n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "dlltool --as=as --dllname $libname.dll --def $libname.def --base-file $libname.base --output-exp $libname.exp\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "ld $libname.exp --dll -o $libname.dll ".join(" ",@objs)." $init.o $fixup.o ";
$command .= join(" ",@flags)." -e _dll_entry\@12 \n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
print "Build the import lib\n";
$command = "dlltool --as=as --dllname $libname.dll --def $libname.def --output-lib $libname.a\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
# if there was originally a path, copy the dll and a to that location:
if($path && $path ne "./" && $path."\n" ne "`pwd`"){
$command = "mv $libname.dll $path".$libname.".dll\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
$command = "mv $libname.a $path".$libname.".a\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
}
@@ -102,7 +102,7 @@ if( $args=~/\-o (.+?)\.dll/i){
else{ # no special processing, just call ld
$command = "ld $args\n";
print $command;
- system($command);
+ system($command) == 0 or die "system() failed.\n";
}
#---------------------------------------------------------------------------