aboutsummaryrefslogtreecommitdiff
path: root/gcc/mklibgcc.in
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2005-02-19 18:18:31 +0000
committerZack Weinberg <zack@gcc.gnu.org>2005-02-19 18:18:31 +0000
commit2cdc207340d10fdbf643ae6b83cb289af1ba32d6 (patch)
tree22e07c5a6de6c9d4e9a3151d3560e09aaff6fe15 /gcc/mklibgcc.in
parentd3f9c1b9bc8e9a0f7d565070ad524a2aefa50f38 (diff)
downloadgcc-2cdc207340d10fdbf643ae6b83cb289af1ba32d6.zip
gcc-2cdc207340d10fdbf643ae6b83cb289af1ba32d6.tar.gz
gcc-2cdc207340d10fdbf643ae6b83cb289af1ba32d6.tar.bz2
mklibgcc.in: If libgcc_eh.a would be empty, put a dummy object inside.
* mklibgcc.in: If libgcc_eh.a would be empty, put a dummy object inside. * config/ia64/hpux.h: Don't define LIBGCC_SPEC. From-SVN: r95286
Diffstat (limited to 'gcc/mklibgcc.in')
-rw-r--r--gcc/mklibgcc.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in
index 91e5640..f444ff2 100644
--- a/gcc/mklibgcc.in
+++ b/gcc/mklibgcc.in
@@ -94,6 +94,9 @@ libgcov_c_dep='stmp-dirs $(srcdir)/libgcov.c $(srcdir)/gcov-io.h $(srcdir)/gcov-
# Dependencies for fp-bit.c
fpbit_c_dep='stmp-dirs config.status tsystem.h'
+# Flag whether we need eh_dummy.c
+need_eh_dummy=
+
if [ "$SHLIB_LINK" ]; then
# Test -fvisibility=hidden. We need both a -fvisibility=hidden on
# the command line, and a #define to prevent libgcc2.h etc from
@@ -540,6 +543,19 @@ for ml in $MULTILIBS; do
fi
done
+ # If nothing went into libgcc_eh.a, create a dummy object -
+ # some linkers don't like totally empty archives.
+ if [ -z "$LIB2ADDEHSTATIC" ]; then
+ file=eh_dummy.c
+ out="libgcc/${dir}/eh_dummy${objext}"
+ need_eh_dummy=1
+
+ echo $out: stmp-dirs $file
+ echo " $gcc_compile" $flags '$(vis_hide)' -fexceptions -c $file -o $out
+ echo $libgcc_eh_a: $out
+ fi
+
+
else # no libgcc_eh.a
for file in $LIB2ADDEH; do
case $file in
@@ -760,6 +776,11 @@ echo " if [ -d \$\$d ]; then true; else $mkinstalldirs \$\$d; fi; \\"
echo " done"
echo " if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi"
+if [ "$need_eh_dummy" ]; then
+ echo "eh_dummy.c:"
+ echo " echo 'struct eh_dummy;' > \$@"
+fi
+
echo ""
echo "install: all"
for ml in $MULTILIBS; do