summaryrefslogtreecommitdiff
path: root/gcc/mklibgcc.in
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-05-03 14:00:49 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-05-03 14:00:49 -0700
commitefdd2c06bbd9911e69372595db5518924bdbb44b (patch)
treefe49a2907d9d4319be8cab5f97fe1d0c6195345d /gcc/mklibgcc.in
parent13393c8ae70d36e71a02f61567445dc22416e3ec (diff)
downloadgcc-efdd2c06bbd9911e69372595db5518924bdbb44b.tar.gz
mklibgcc.in: Restrict OLDCC=GCC test to native.
* mklibgcc.in: Restrict OLDCC=GCC test to native. Equate LIBGCC1 empty with libgcc1.null. From-SVN: r33644
Diffstat (limited to 'gcc/mklibgcc.in')
-rw-r--r--gcc/mklibgcc.in26
1 files changed, 16 insertions, 10 deletions
diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in
index be9e8758576..bcec536ab6f 100644
--- a/gcc/mklibgcc.in
+++ b/gcc/mklibgcc.in
@@ -33,16 +33,18 @@ echo
# is not needed. This is not quite the same as libgcc1.null, even
# on a target not using libgcc1-asm.a.
-tmp="tmp-$$.c"
-cat > $tmp <<EOF
+if [ "@build_canonical@" = "@target@" ]; then
+ tmp="tmp-$$.c"
+ cat > $tmp <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if $OLDCC -E $tmp | grep yes > /dev/null 2>&1; then
- LIB1FUNCS=""
+ if $OLDCC -E $tmp | grep yes > /dev/null 2>&1; then
+ LIB1FUNCS=""
+ fi
+ rm -f $tmp
fi
-rm -f $tmp
#
@@ -112,15 +114,15 @@ fpbit_c_dep='$(srcdir)/config/fp-bit.c config.status tsystem.h'
libgcc1_objs=""
-case "$LIBGCC1" in
- libgcc1.null)
+case X"$LIBGCC1" in
+ Xlibgcc1.null | X)
;;
- libgcc1.cross)
+ Xlibgcc1.cross)
echo "You must find a way to make libgcc1 components yourself" 1>&2
;;
- libgcc1-asm.a)
+ Xlibgcc1-asm.a)
for name in $LIB1ASMFUNCS; do
for ml in $MULTILIBS; do
dir=`echo ${ml} | sed -e 's/;.*$//'`
@@ -135,7 +137,7 @@ case "$LIBGCC1" in
done
;;
- *)
+ Xlibgcc.a)
for name in $LIB1FUNCS; do
out="libgcc/${name}${objext}"
@@ -157,6 +159,10 @@ case "$LIBGCC1" in
libgcc1_objs="$libgcc1_objs ${name}${objext}"
done
;;
+ *)
+ echo "I'm confused about libgcc1." 1>&2
+ exit 1
+ ;;
esac
#