From 4ccd2d548a77647971ae761d8674b4f92a97019f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 14 Aug 2004 11:55:08 +0000 Subject: [PATCH] clifford & fake: gcc: add a null-archive as placeholder for libgcc_s.a in stage 0. glibc needs it in stage 1. [2004080814541716186] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3863 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/gcc/gcc.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/base/gcc/gcc.conf b/package/base/gcc/gcc.conf index 9cd35c086..d80cad159 100644 --- a/package/base/gcc/gcc.conf +++ b/package/base/gcc/gcc.conf @@ -472,6 +472,21 @@ gcc_cross() { for x in ld-linux{,-$arch_machine}.so.2 ld.so.1 libc.so.{6,6.1} do ln -fvs $root/../../lib/$x $x ; done + # glibc uses -lgcc_s with --as-needed, which fails if libgcc_s.{so,a} + # is not even there. -- clifford & fake + # + # the shared object is not really needed. + #if [ ! -e $root/$prefix/lib/${gcc_lib_dir}/libgcc_s.so ]; then + # ${pkg_gcc_target}-gcc -shared -nostdlib \ + # -o $root/$prefix/lib/${gcc_lib_dir}/libgcc_s.so -x c /dev/null + #fi + if [ ! -e $root/$prefix/lib/${gcc_lib_dir}/libgcc_s.a ]; then + ${pkg_gcc_target}-gcc -x c /dev/null -c -o null.o + ${pkg_gcc_target}-ar q null.a null.o; rm -f null.o + ${pkg_gcc_target}-ranlib null.a + mv null.a $root/$prefix/lib/${gcc_lib_dir}/libgcc_s.a + fi + rm -f $root/$prefix/.lastupdate fi