X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fmklibgcc.in;h=8f9174a0f5d6e052f685a88758102d91be5cdcdd;hb=78587df36f227e25a0b6f6b3fd6aa8577bf9493a;hp=512529d9e9c1a879173526cbe916b401e9ca3a38;hpb=235732442bf07041164e4d6c8183d9a63568c423;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in index 512529d9e9c..8f9174a0f5d 100644 --- a/gcc/mklibgcc.in +++ b/gcc/mklibgcc.in @@ -2,7 +2,7 @@ # Construct makefile for libgcc. # Copyright (C) 2000 Free Software Foundation, Inc. # -# This file is part of GNU CC. +# This file is part of GCC. # Arguments, taken from the environment, since there are a lot # of them, and positional args becomes quite ugly. @@ -17,6 +17,7 @@ # LIB2ADDEHDEP # FPBIT # FPBIT_FUNCS +# LIB2_DIVMOD_FUNCS # DPBIT # DPBIT_FUNCS # LIBGCC @@ -78,11 +79,14 @@ for name in $LIB1ASMFUNCS; do echo " $gcc_compile" $flags -DL$name -xassembler-with-cpp \ -c '$(srcdir)/config/$(LIB1ASMSRC)' -o $out - # Remove any objects from LIB2FUNCS that are defined as optimized - # assembly code in LIB1ASMFUNCS. + # Remove any objects from LIB2FUNCS and LIB2_DIVMOD_FUNCS that are + # defined as optimized assembly code in LIB1ASMFUNCS. LIB2FUNCS=`echo $LIB2FUNCS | sed -e 's/^'$name' //' \ -e 's/ '$name' / /' \ -e 's/ '$name'$//'` + LIB2_DIVMOD_FUNCS=`echo $LIB2_DIVMOD_FUNCS | sed -e 's/^'$name' //' \ + -e 's/ '$name' / /' \ + -e 's/ '$name'$//'` done libgcc1_objs="$libgcc1_objs ${name}${objext}" done @@ -93,6 +97,7 @@ done libgcc2_objs="" libgcc2_st_objs="" +libgcc2_eh_objs="" for name in $LIB2FUNCS; do for ml in $MULTILIBS; do @@ -120,6 +125,19 @@ for name in $LIB2FUNCS_ST; do libgcc2_st_objs="$libgcc2_st_objs ${name}${objext}" done +for name in $LIB2_DIVMOD_FUNCS; do + 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}/${name}${objext}" + + echo $out: $libgcc2_c_dep + echo " $gcc_compile" '$(MAYBE_USE_COLLECT2)' $flags -DL$name \ + -c '$(srcdir)/libgcc2.c' -fexceptions -fnon-call-exceptions -o $out + done + libgcc2_objs="$libgcc2_objs ${name}${objext}" +done + if [ "$FPBIT" ]; then for name in $FPBIT_FUNCS; do for ml in $MULTILIBS; do @@ -183,7 +201,11 @@ for file in $LIB2ADDEH; do echo $out: stmp-dirs $file echo " $gcc_compile" $flags -fexceptions -c $file -o $out done - libgcc2_objs="$libgcc2_objs ${oname}${objext}" + if [ "$SHLIB_LINK" ]; then + libgcc2_eh_objs="$libgcc2_eh_objs ${oname}${objext}" + else + libgcc2_objs="$libgcc2_objs ${oname}${objext}" + fi done for file in $LIB2ADD_ST; do @@ -211,13 +233,18 @@ for ml in $MULTILIBS; do flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; libgcc_objs="" + libgcc_eh_objs="" for o in $libgcc1_objs; do libgcc_objs="$libgcc_objs libgcc/${dir}/$o" done for o in $libgcc2_objs; do libgcc_objs="$libgcc_objs libgcc/${dir}/$o" done - shlib_deps="$libgcc_objs" + for o in $libgcc2_eh_objs; do + libgcc_eh_objs="$libgcc_eh_objs libgcc/${dir}/$o" + done + libgcc_sh_objs="$libgcc_objs $libgcc_eh_objs" + shlib_deps="$libgcc_sh_objs" libgcc_st_objs="" for o in $libgcc2_st_objs; do @@ -227,8 +254,8 @@ for ml in $MULTILIBS; do if [ "$SHLIB_LINK" -a "$SHLIB_MKMAP" -a -z "$mapfile" ]; then mapfile="libgcc.map" echo "" - echo "${mapfile}: $SHLIB_MKMAP $SHLIB_MAPFILES $libgcc_objs" - echo ' { $(NM_FOR_TARGET)'" $SHLIB_NM_FLAGS $libgcc_objs; echo %%; cat $SHLIB_MAPFILES; } | "'$(AWK)'" -f $SHLIB_MKMAP > "'tmp-$@' + echo "${mapfile}: $SHLIB_MKMAP $SHLIB_MAPFILES $libgcc_sh_objs" + echo ' { $(NM_FOR_TARGET)'" $SHLIB_NM_FLAGS $libgcc_sh_objs; echo %%; cat $SHLIB_MAPFILES; } | "'$(AWK)'" -f $SHLIB_MKMAP > "'tmp-$@' echo ' mv tmp-$@ $@' fi shlib_deps="$shlib_deps $mapfile" @@ -248,6 +275,15 @@ for ml in $MULTILIBS; do echo ' else true; fi;' if [ "$SHLIB_LINK" ]; then + + echo "" + echo "${dir}/libgcc_eh.a: $libgcc_eh_objs" + echo " -rm -rf ${dir}/libgcc_eh.a" + echo ' $(AR_CREATE_FOR_TARGET)' ${dir}/libgcc_eh.a $libgcc_eh_objs + echo ' if $(RANLIB_TEST_FOR_TARGET) ; then' \\ + echo ' $(RANLIB_FOR_TARGET)' ${dir}/libgcc_eh.a ';' \\ + echo ' else true; fi;' + if [ -z "$SHLIB_MULTILIB" ]; then if [ "$dir" = "." ]; then shlib_base_name="libgcc_s"; @@ -259,7 +295,7 @@ for ml in $MULTILIBS; do echo " $SHLIB_LINK" \ | sed -e "s%@multilib_flags@%$flags%g" \ -e "s%@multilib_dir@%$dir%g" \ - -e "s%@shlib_objs@%$libgcc_objs%g" \ + -e "s%@shlib_objs@%$libgcc_sh_objs%g" \ -e "s%@shlib_base_name@%$shlib_base_name%g" \ -e "s%@shlib_map_file@%$mapfile%g" elif [ "$SHLIB_MULTILIB" = "$dir" ]; then @@ -269,7 +305,7 @@ for ml in $MULTILIBS; do echo " $SHLIB_LINK" \ | sed -e "s%@multilib_flags@%$flags%g" \ -e "s%@multilib_dir@%$dir%g" \ - -e "s%@shlib_objs@%$libgcc_objs%g" \ + -e "s%@shlib_objs@%$libgcc_sh_objs%g" \ -e "s%@shlib_base_name@%$shlib_base_name%g" \ -e "s%@shlib_map_file@%$mapfile%g" fi @@ -303,6 +339,7 @@ for ml in $MULTILIBS; do fi all="$all ${dir}/libgcc.a" if [ "$SHLIB_LINK" ]; then + all="$all ${dir}/libgcc_eh.a" if [ -z "$SHLIB_MULTILIB" ]; then if [ "$dir" = "." ]; then suff=""; @@ -318,7 +355,7 @@ done echo 'stmp-dirs: force' echo ' for d in '"$dirs"'; do \' -echo ' if [ -d $$d ]; then true; else mkdir $$d; fi \' +echo ' if [ -d $$d ]; then true; else '$mkinstalldirs' $$d; fi; \' echo ' done' echo ' if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi' @@ -362,6 +399,9 @@ for ml in $MULTILIBS; do echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc.a if [ "$SHLIB_LINK" ]; then + echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/ + echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a + if [ -z "$SHLIB_MULTILIB" ]; then if [ "$dir" = "." ]; then shlib_base_name="libgcc_s";