1 diff -dup gcc-4.4.0.old/libgcc/configure gcc-4.4.0/libgcc/configure
2 --- gcc-4.4.0.old/libgcc/configure 2008-10-03 17:54:34.000000000 +0200
3 +++ gcc-4.4.0/libgcc/configure 2008-10-06 17:40:05.000000000 +0200
4 @@ -272,7 +272,7 @@ PACKAGE_STRING='GNU C Runtime Library 1.
7 ac_unique_file="static-object.mk"
8 -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir onestep INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS'
9 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir onestep INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls LIBGCC_LIBM tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS'
13 @@ -3540,6 +3540,47 @@ if test "$enable_tls $gcc_cv_have_cc_tls
17 +# On powerpc libgcc_s references copysignl which is a libm function but
18 +# glibc apparently also provides it via libc as opposed to uClibc where
20 +echo "$as_me:$LINENO: checking for library containing copysignl" >&5
21 +echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
22 +if test "${libgcc_cv_copysignl_lib+set}" = set; then
23 + echo $ECHO_N "(cached) $ECHO_C" >&6
27 + echo '#include <features.h>' > conftest.c
28 + case $target_alias in
30 + echo 'int the_libc = __UCLIBC__;' >> conftest.c
33 + echo 'int the_libc; /* dummy */' >> conftest.c
36 + libgcc_cv_copysignl_lib="libc"
37 + if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
38 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
42 + (exit $ac_status); }; }
45 + libgcc_cv_copysignl_lib="libm"
50 +echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
51 +echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
53 +if test "x$lib_copysignl" != "x"; then
54 + LIBGCC_LIBM="$LIBGCC_LIBM $lib_copysignl"
58 # Conditionalize the makefile for this target machine.
60 for f in ${tmake_file}
61 @@ -4261,6 +4302,7 @@ s,@enable_decimal_float@,$enable_decimal
62 s,@fixed_point@,$fixed_point,;t t
63 s,@vis_hide@,$vis_hide,;t t
64 s,@set_have_cc_tls@,$set_have_cc_tls,;t t
65 +s,@LIBGCC_LIBM@,$LIBGCC_LIBM,;t t
66 s,@tmake_file@,$tmake_file,;t t
67 s,@extra_parts@,$extra_parts,;t t
68 s,@asm_hidden_op@,$asm_hidden_op,;t t
69 diff -dup gcc-4.4.0.old/libgcc/configure.ac gcc-4.4.0/libgcc/configure.ac
70 --- gcc-4.4.0.old/libgcc/configure.ac 2008-10-03 17:54:34.000000000 +0200
71 +++ gcc-4.4.0/libgcc/configure.ac 2008-10-06 19:28:30.000000000 +0200
72 @@ -215,6 +215,40 @@ if test "$enable_tls $gcc_cv_have_cc_tls
74 AC_SUBST(set_have_cc_tls)
76 +# On powerpc libgcc_s references copysignl which is a libm function but
77 +# glibc apparently also provides it via libc as opposed to uClibc where
79 +dnl save_LIBS="$LIBS"
81 +dnl AC_SEARCH_LIBS(copysignl, m)
82 +dnl LIBGCC_LIBS="$LIBS"
83 +dnl LIBS="$save_LIBS"
84 +dnl AC_SUBST(LIBGCC_LIBS)
85 +AC_CACHE_CHECK([for library containing copysignl],
86 + libgcc_cv_copysignl_lib, [
87 + echo '#include <features.h>' > conftest.c
88 + case $target_alias in
90 + echo 'int the_libc = __UCLIBC__;' >> conftest.c
93 + echo 'int the_libc; /* dummy */' >> conftest.c
96 + libgcc_cv_copysignl_lib="-lc"
97 + if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
99 + libgcc_cv_copysignl_lib="-lm"
104 +case /${libgcc_cv_copysignl_lib}/ in
105 + /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
108 +AC_SUBST(LIBGCC_LIBM)
110 # Conditionalize the makefile for this target machine.
112 for f in ${tmake_file}
113 diff -dup gcc-4.4.0.old/libgcc/Makefile.in gcc-4.4.0/libgcc/Makefile.in
114 --- gcc-4.4.0.old/libgcc/Makefile.in 2008-10-03 17:54:34.000000000 +0200
115 +++ gcc-4.4.0/libgcc/Makefile.in 2008-10-06 20:17:21.000000000 +0200
116 @@ -40,6 +40,7 @@ enable_shared = @enable_shared@
117 decimal_float = @decimal_float@
118 enable_decimal_float = @enable_decimal_float@
119 fixed_point = @fixed_point@
120 +LIBGCC_LIBM = @LIBGCC_LIBM@
122 host_noncanonical = @host_noncanonical@
124 @@ -878,9 +879,10 @@ libgcc_s$(SHLIB_EXT): $(libgcc-s-objects
125 @multilib_dir@,$(MULTIDIR),$(subst \
126 @shlib_objs@,$(objects),$(subst \
127 @shlib_base_name@,libgcc_s,$(subst \
128 + @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
129 @shlib_map_file@,$(mapfile),$(subst \
130 @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
131 - @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
132 + @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
134 libunwind$(SHLIB_EXT): $(libunwind-s-objects@onestep@) $(extra-parts)
135 # @multilib_flags@ is still needed because this may use
136 --- gcc-4.4.0.old/gcc/config/t-slibgcc-elf-ver 2005-10-31 18:03:08.000000000 +0100
137 +++ gcc-4.4.0/gcc/config/t-slibgcc-elf-ver 2008-10-06 20:16:56.000000000 +0200
138 @@ -9,7 +9,7 @@ SHLIB_MAP = @shlib_map_file@
139 SHLIB_OBJS = @shlib_objs@
140 SHLIB_DIR = @multilib_dir@
141 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
143 +SHLIB_LC = @libgcc_libm@ -lc
145 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
146 -Wl,--soname=$(SHLIB_SONAME) \