# HG changeset patch # User Rob Landley # Date 1250932020 18000 # Node ID 4e1e6aa7f4455852215a281dee8bb7a7462b8441 # Parent aea72ecff86891ac335b25fb85544d237a24729a Convince gcc to build/install libgcc_eh.a even for --disable-shared compilers, and tell the wrapper to expect it. diff -r aea72ecff868 -r 4e1e6aa7f445 sources/patches/gcc-core-libgcceh.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/gcc-core-libgcceh.patch Sat Aug 22 04:07:00 2009 -0500 @@ -0,0 +1,25 @@ +--- gcc-4.2.1/gcc/mklibgcc.in 2006-07-04 15:20:01.000000000 -0500 ++++ gcc-core/gcc/mklibgcc.in 2009-08-21 21:51:35.000000000 -0500 +@@ -223,8 +223,8 @@ + if [ "$LIBUNWIND" ]; then + libunwind_a=$dir/libunwind.a + fi ++ libgcc_eh_a=$dir/libgcc_eh.a + if [ "$SHLIB_LINK" ]; then +- libgcc_eh_a=$dir/libgcc_eh.a + libgcc_s_so=$dir/libgcc_s${SHLIB_EXT} + if [ "$LIBUNWIND" ]; then + libunwind_so=$dir/libunwind${SHLIB_EXT} +@@ -889,11 +889,11 @@ + echo ' chmod 644' ${ldir}/libgcov.a + echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcov.a + +- if [ "$SHLIB_LINK" ]; then + echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/ + echo ' chmod 644' ${ldir}/libgcc_eh.a + echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a + ++ if [ "$SHLIB_LINK" ]; then + shlib_slibdir_qual= + os_multilib_dir=`$GCC_FOR_TARGET $flags --print-multi-os-directory` + if [ "$os_multilib_dir" != . ]; then diff -r aea72ecff868 -r 4e1e6aa7f445 sources/toys/ccwrap.c --- a/sources/toys/ccwrap.c Fri Aug 21 23:21:57 2009 -0500 +++ b/sources/toys/ccwrap.c Sat Aug 22 04:07:00 2009 -0500 @@ -5,6 +5,8 @@ * Copyright (C) 2006-2009 Rob Landley * * Wrapper to use uClibc with gcc, and make gcc relocatable. + * + * Licensed under GPLv2. */ #define _GNU_SOURCE @@ -42,7 +44,7 @@ else gcc_argv[argcnt++] = "-lgcc_eh"; \ } while (0); #else -#define ADD_GCC_S() +#define ADD_GCC_S() gcc_argv[argcnt++] = "-lgcc_eh" #endif // Confirm that a regular file exists, and (optionally) has the executable bit.