summaryrefslogtreecommitdiff
path: root/klibc/klcc.in
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-03-07 07:04:46 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:51:00 -0700
commit4272779706c53c635a3fa5431a4e8791402183b4 (patch)
tree0ed0964a2772f2fc17c3162137d594275e5036d5 /klibc/klcc.in
parent472419869c387bb0963d8cfecca997b8154f4d44 (diff)
[PATCH] klibc: version 0.214
Diffstat (limited to 'klibc/klcc.in')
-rw-r--r--klibc/klcc.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/klibc/klcc.in b/klibc/klcc.in
index bdd03e73b3..d8721c9a6b 100644
--- a/klibc/klcc.in
+++ b/klibc/klcc.in
@@ -78,6 +78,11 @@ sub mysystem(@) {
}
#
+# Initialization
+#
+open(NULL, '+<', '/dev/null') or die "$0: cannot open /dev/null\n";
+
+#
# Begin parsing options.
#
@@ -191,10 +196,17 @@ if ( $operation ne '' ) {
}
}
+ # Get the libgcc pathname for the *current* gcc
+ open(LIBGCC, '-|', $CC, @ccopt, '-print-libgcc-file-name')
+ or die "$0: cannot get libgcc filename\n";
+ $libgcc = <LIBGCC>;
+ chomp $libgcc;
+ close(LIBGCC);
+
if ( $shared ) {
- $rv = mysystem($LD, @LDFLAGS, @sharedopt, @ldopt, @outopt, @objs, @sharedlib);
+ $rv = mysystem($LD, @LDFLAGS, @sharedopt, @ldopt, @outopt, @objs, @sharedlib, $libgcc);
} else {
- $rv = mysystem($LD, @LDFLAGS, @staticopt, @ldopt, @outopt, @objs, @staticlib);
+ $rv = mysystem($LD, @LDFLAGS, @staticopt, @ldopt, @outopt, @objs, @staticlib, $libgcc);
}
unlink(@rmobjs);