+2001-04-29 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * Makefile.in (LIB2FUNCS_STATIC_EXTRA): New macro.
+ (LIB2ADD_ST): New macro, pass it to mklibgcc.
+ * mklibgcc.in (libgcc2_st_objs): New variable, set it from LIB2ADD_ST.
+ (libgcc_st_objs): New, set from libgcc2_st_objs. Use it for libgcc.a.
+ * config/rs6000/t-ppccomm (LIB2FUNCS_STATIC_EXTRA): New macro.
+
2001-04-09 Bo Thorsen <bo@suse.co.uk>
* config/i386/i386.md: "TARGET_64BIT && TARGET_64BIT": Removed one.
# Assembler files should have names ending in `.asm'.
LIB1FUNCS_EXTRA =
-# List of extra C and assembler files to add to libgcc2.a.
+# List of extra C and assembler files to add to static and shared libgcc2.
# Assembler files should have names ending in `.asm'.
LIB2FUNCS_EXTRA =
+# List of extra C and assembler files to add to static libgcc2.
+# Assembler files should have names ending in `.asm'.
+LIB2FUNCS_STATIC_EXTRA =
+
# Handle cpp installation.
INSTALL_CPP=
UNINSTALL_CPP=
# Build libgcc.a.
LIB2ADD = $(LIB2FUNCS_EXTRA)
+LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
-libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) xgcc$(exeext)
+libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext)
objext='$(objext)' \
OLDCC='$(OLDCC)' \
LIBGCC1='$(LIBGCC1)' \
LIB1FUNCS_EXTRA='$(LIB1FUNCS_EXTRA)' \
LIB2FUNCS='$(LIB2FUNCS)' \
LIB2ADD='$(LIB2ADD)' \
+ LIB2ADD_ST='$(LIB2ADD_ST)' \
LIB2ADDEH='$(LIB2ADDEH)' \
LIB2ADDEHDEP='$(LIB2ADDEHDEP)' \
FPBIT='$(FPBIT)' \
LIBGCC_DEPS = $(GCC_PASSES) $(LANGUAGES) stmp-int-hdrs $(STMP_FIXPROTO) \
libgcc.mk $(srcdir)/libgcc1.c $(srcdir)/libgcc2.c $(TCONFIG_H) \
$(MACHMODE_H) longlong.h gbl-ctors.h config.status stmp-int-hdrs \
- tsystem.h $(FPBIT) $(DPBIT) $(LIB2ADD) $(LIB2ADDEH) $(LIB2ADDEHDEP) \
- $(EXTRA_PARTS)
+ tsystem.h $(FPBIT) $(DPBIT) $(LIB2ADD) $(LIB2ADD_ST) $(LIB2ADDEH) \
+ $(LIB2ADDEHDEP) $(EXTRA_PARTS)
libgcc.a: $(LIBGCC_DEPS)
$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
# These are really part of libgcc1, but this will cause them to be
# built correctly, so... [taken from t-sparclite]
-LIB2FUNCS_EXTRA = eabi.S tramp.S
+LIB2FUNCS_EXTRA = tramp.S
+
+# This one can't end up in shared libgcc
+LIB2FUNCS_STATIC_EXTRA = eabi.S
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
# LIB1FUNCS_EXTRA
# LIB2FUNCS
# LIB2ADD
+# LIB2ADD_ST
# LIB2ADDEH
# LIB2ADDEHDEP
# FPBIT
libgcc2_objs="$libgcc2_objs ${oname}${objext}"
done
+libgcc2_st_objs=""
+
+for file in $LIB2ADD_ST; do
+ name=`echo $file | sed -e 's/[.][cSo]$//' -e 's/[.]asm$//' -e 's/[.]txt$//'`
+ oname=`echo $name | sed -e 's,.*/,,'`
+
+ for ml in $MULTILIBS; do
+ dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
+ flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
+ out="libgcc/${dir}/${oname}${objext}"
+ if [ ${name}.asm = ${file} ]; then
+ flags="$flags -xassembler-with-cpp"
+ fi
+
+ echo $out: stmp-dirs $file
+ echo " $gcc_compile" $flags -c $file -o $out
+ done
+ libgcc2_st_objs="$libgcc2_st_objs ${oname}${objext}"
+done
+
# SHLIB_MKMAP
# SHLIB_MAPFILES
for ml in $MULTILIBS; do
done
shlib_deps="$libgcc_objs"
+ libgcc_st_objs=""
+ for o in $libgcc2_st_objs; do
+ libgcc_st_objs="$libgcc_st_objs libgcc/${dir}/$o"
+ done
+
if [ "$SHLIB_LINK" -a "$SHLIB_MKMAP" -a -z "$mapfile" ]; then
mapfile="libgcc.map"
echo ""
done
echo ""
- echo "${dir}/libgcc.a: $libgcc_objs"
+ echo "${dir}/libgcc.a: $libgcc_objs $libgcc_st_objs"
echo " -rm -rf ${dir}/libgcc.a"
- echo ' $(AR_CREATE_FOR_TARGET)' ${dir}/libgcc.a $libgcc_objs
+ echo ' $(AR_CREATE_FOR_TARGET)' ${dir}/libgcc.a $libgcc_objs $libgcc_st_objs
echo ' if $(RANLIB_TEST_FOR_TARGET) ; then' \\
echo ' $(RANLIB_FOR_TARGET)' ${dir}/libgcc.a ';' \\
echo ' else true; fi;'