diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-09-10 07:35:03 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-09-10 09:05:39 +0000 |
commit | 63cbdb27e349a4dce9d6c51fdcf86df802e9d6c6 (patch) | |
tree | 685d0a9af700c5a541a1e6444f25d2d60e300bba /main | |
parent | 75339e69c19646dedb30dd7f72806b477ead32cf (diff) | |
download | aports-63cbdb27e349a4dce9d6c51fdcf86df802e9d6c6.tar.bz2 aports-63cbdb27e349a4dce9d6c51fdcf86df802e9d6c6.tar.xz |
main/gcc: upgrade to 4.7.1
Disable gcc-go for now. It needs ucontext which we don't have.
Diffstat (limited to 'main')
-rw-r--r-- | main/gcc/08_all_cross-compile.patch | 40 | ||||
-rw-r--r-- | main/gcc/12_all_default-warn-trampolines.patch | 21 | ||||
-rw-r--r-- | main/gcc/16_all_libgo-Werror-pr53679.patch | 16 | ||||
-rw-r--r-- | main/gcc/29_all_arm_armv4t-default.patch | 16 | ||||
-rw-r--r-- | main/gcc/34_all_ia64_note.GNU-stack.patch | 89 | ||||
-rw-r--r-- | main/gcc/49_all_gcc-4.7-x86-libitm-pr52695.patch | 24 | ||||
-rw-r--r-- | main/gcc/67_all_gcc-poison-system-directories.patch | 209 | ||||
-rw-r--r-- | main/gcc/74_all_gcc47_cloog-dl.patch (renamed from main/gcc/74_all_gcc46_cloog-dl.patch) | 134 | ||||
-rw-r--r-- | main/gcc/APKBUILD | 83 | ||||
-rw-r--r-- | main/gcc/gcc-4.7-dynamic-linker.patch (renamed from main/gcc/gcc-4.6-dynamic-linker.patch) | 259 | ||||
-rw-r--r-- | main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch | 38 | ||||
-rw-r--r-- | main/gcc/gcc-pure64.patch | 24 | ||||
-rw-r--r-- | main/gcc/pt_gnu_eh_frame.patch | 4 |
13 files changed, 514 insertions, 443 deletions
diff --git a/main/gcc/08_all_cross-compile.patch b/main/gcc/08_all_cross-compile.patch deleted file mode 100644 index 4203e3a623..0000000000 --- a/main/gcc/08_all_cross-compile.patch +++ /dev/null @@ -1,40 +0,0 @@ -Some notes on the 'bootstrap with or without libc headers' debate: -http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html -http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html - ---- a/gcc/configure -+++ b/gcc/configure -@@ -11354,7 +11354,7 @@ then - *) - ;; - esac --elif test "x$TARGET_SYSTEM_ROOT" != x; then -+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then - SYSTEM_HEADER_DIR=$build_system_header_dir - fi - ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -1759,7 +1759,7 @@ then - *) - ;; - esac --elif test "x$TARGET_SYSTEM_ROOT" != x; then -+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then - SYSTEM_HEADER_DIR=$build_system_header_dir - fi - ---- a/gcc/unwind-dw2.c -+++ b/gcc/unwind-dw2.c -@@ -329,9 +329,11 @@ _Unwind_GetTextRelBase (struct _Unwind_Context *context) - } - #endif - -+#ifndef inhibit_libc - #ifdef MD_UNWIND_SUPPORT - #include MD_UNWIND_SUPPORT - #endif -+#endif - - /* Extract any interesting information from the CIE for the translation - unit F belongs to. Return a pointer to the byte after the augmentation, diff --git a/main/gcc/12_all_default-warn-trampolines.patch b/main/gcc/12_all_default-warn-trampolines.patch index a5606c5ecd..4b26aecd29 100644 --- a/main/gcc/12_all_default-warn-trampolines.patch +++ b/main/gcc/12_all_default-warn-trampolines.patch @@ -1,9 +1,8 @@ Enable -Wtrampolines by default. - --- a/gcc/common.opt +++ b/gcc/common.opt -@@ -611,7 +611,7 @@ Common Var(warn_system_headers) Warning +@@ -639,7 +639,7 @@ Common Var(warn_system_headers) Warning Do not suppress warnings from system headers Wtrampolines @@ -14,12 +13,12 @@ Enable -Wtrampolines by default. Wtype-limits --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -3766,6 +3766,8 @@ headers---for that, @option{-Wunknown-pragmas} must also be used. - @opindex Wno-trampolines - Warn about trampolines generated for pointers to nested functions. - -+ In Gentoo, @option{-Wtrampolines} is enabled by default. -+ - A trampoline is a small piece of data or code that is created at run - time on the stack when the address of a nested function is taken, and - is used to call the nested function indirectly. For some targets, it +@@ -3878,6 +3878,8 @@ headers---for that, @option{-Wunknown-pragmas} must also be used. + for most targets, it is made up of code and thus requires the stack + to be made executable in order for the program to work properly. + ++ This warning is enabled by default in Gentoo. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal diff --git a/main/gcc/16_all_libgo-Werror-pr53679.patch b/main/gcc/16_all_libgo-Werror-pr53679.patch new file mode 100644 index 0000000000..3c1ece3640 --- /dev/null +++ b/main/gcc/16_all_libgo-Werror-pr53679.patch @@ -0,0 +1,16 @@ +libgo does not respect --disable-werror + +https://bugs.gentoo.org/423153 +http://gcc.gnu.org/PR53679 + +--- a/libgo/configure ++++ b/libgo/configure +@@ -13384,7 +13384,7 @@ done + WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual' + + +-WERROR="-Werror" ++WERROR="" + + + glibgo_toolexecdir=no diff --git a/main/gcc/29_all_arm_armv4t-default.patch b/main/gcc/29_all_arm_armv4t-default.patch new file mode 100644 index 0000000000..4616cf9ab8 --- /dev/null +++ b/main/gcc/29_all_arm_armv4t-default.patch @@ -0,0 +1,16 @@ +gcc defaults to armv5t for all targets even armv4t + +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/main/gcc/34_all_ia64_note.GNU-stack.patch b/main/gcc/34_all_ia64_note.GNU-stack.patch deleted file mode 100644 index b156eacb29..0000000000 --- a/main/gcc/34_all_ia64_note.GNU-stack.patch +++ /dev/null @@ -1,89 +0,0 @@ -2004-09-20 Jakub Jelinek <jakub@redhat.com> - - * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also - on ppc64-linux. - - * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on - ia64-linux. - * config/ia64/crtbegin.asm: Likewise. - * config/ia64/crtend.asm: Likewise. - * config/ia64/crti.asm: Likewise. - * config/ia64/crtn.asm: Likewise. - -2004-05-14 Jakub Jelinek <jakub@redhat.com> - - * config/ia64/linux.h (TARGET_ASM_FILE_END): Define. - - ---- a/gcc/config/ia64/crtbegin.asm -+++ b/gcc/config/ia64/crtbegin.asm -@@ -252,3 +252,7 @@ __do_jv_register_classes: - .weak __cxa_finalize - #endif - .weak _Jv_RegisterClasses -+ -+#ifdef __linux__ -+.section .note.GNU-stack; .previous -+#endif ---- a/gcc/config/ia64/crtend.asm -+++ b/gcc/config/ia64/crtend.asm -@@ -119,3 +119,7 @@ __do_global_ctors_aux: - - br.ret.sptk.many rp - .endp __do_global_ctors_aux -+ -+#ifdef __linux__ -+.section .note.GNU-stack; .previous -+#endif ---- a/gcc/config/ia64/crti.asm -+++ b/gcc/config/ia64/crti.asm -@@ -51,3 +51,7 @@ _fini: - .body - - # end of crti.asm -+ -+#ifdef __linux__ -+.section .note.GNU-stack; .previous -+#endif ---- a/gcc/config/ia64/crtn.asm -+++ b/gcc/config/ia64/crtn.asm -@@ -41,3 +41,7 @@ - br.ret.sptk.many b0 - - # end of crtn.asm -+ -+#ifdef __linux__ -+.section .note.GNU-stack; .previous -+#endif ---- a/gcc/config/ia64/lib1funcs.asm -+++ b/gcc/config/ia64/lib1funcs.asm -@@ -793,3 +793,7 @@ __floattitf: - .endp __floattitf - #endif - #endif -+ -+#ifdef __linux__ -+.section .note.GNU-stack; .previous -+#endif ---- a/gcc/config/ia64/linux.h -+++ b/gcc/config/ia64/linux.h -@@ -29,6 +29,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - - #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux"); - -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - /* This is for -profile to use -lc_p instead of -lc. */ - #undef CC1_SPEC - #define CC1_SPEC "%{profile:-p} %{G*}" ---- a/gcc/config/rs6000/ppc-asm.h -+++ b/gcc/config/rs6000/ppc-asm.h -@@ -352,7 +352,7 @@ GLUE(.L,name): \ - #endif - #endif - --#if defined __linux__ && !defined __powerpc64__ -+#if defined __linux__ - .section .note.GNU-stack - .previous - #endif diff --git a/main/gcc/49_all_gcc-4.7-x86-libitm-pr52695.patch b/main/gcc/49_all_gcc-4.7-x86-libitm-pr52695.patch new file mode 100644 index 0000000000..e1eb2e6ab1 --- /dev/null +++ b/main/gcc/49_all_gcc-4.7-x86-libitm-pr52695.patch @@ -0,0 +1,24 @@ +http://gcc.gnu.org/PR52695 +https://bugs.gentoo.org/421305 + +fix building on x86 systems + +--- a/libitm/config/x86/target.h ++++ b/libitm/config/x86/target.h +@@ -69,16 +69,4 @@ + } // namespace GTM + + // We'll be using some of the cpu builtins, and their associated types. +-#ifndef __cplusplus +-/* ??? It's broken for C++. */ + #include <x86intrin.h> +-#else +-# ifdef __SSE2__ +-# include <emmintrin.h> +-# elif defined(__SSE__) +-# include <xmmintrin.h> +-# endif +-# ifdef __AVX__ +-# include <immintrin.h> +-# endif +-#endif diff --git a/main/gcc/67_all_gcc-poison-system-directories.patch b/main/gcc/67_all_gcc-poison-system-directories.patch new file mode 100644 index 0000000000..a9aee2732d --- /dev/null +++ b/main/gcc/67_all_gcc-poison-system-directories.patch @@ -0,0 +1,209 @@ +grabbed from openembedded + +Upstream-Status: Inappropriate [distribution: codesourcery] + + gcc/ + 2008-07-02 Joseph Myers <joseph@codesourcery.com> + * c-incpath.c: Include toplev.h. + (merge_include_chains): Use warning instead of cpp_error for + system directory poisoning diagnostic. + * Makefile.in (c-incpath.o): Depend on toplev.h. + * gcc.c (LINK_COMMAND_SPEC): Pass + --error-poison-system-directories if + -Werror=poison-system-directories. + + 2007-06-13 Joseph Myers <joseph@codesourcery.com> + * common.opt (--Wno-poison-system-directories): New. + * doc/invoke.texi (-Wno-poison-system-directories): Document. + * c-incpath.c: Include flags.h. + (merge_include_chains): Check flag_poison_system_directories. + * gcc.c (LINK_COMMAND_SPEC): Pass --no-poison-system-directories + to linker if -Wno-poison-system-directories. + * Makefile.in (c-incpath.o): Depend on $(FLAGS_H). + + 2007-03-20 Daniel Jacobowitz <dan@codesourcery.com> + Joseph Myers <joseph@codesourcery.com> + * configure.ac (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * c-incpath.c (merge_include_chains): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of + /usr/include, /usr/local/include or /usr/X11R6/include. + +Index: gcc-4_7-branch/gcc/common.opt +=================================================================== +--- gcc-4_7-branch.orig/gcc/common.opt 2012-04-10 10:54:04.000000000 -0700 ++++ gcc-4_7-branch/gcc/common.opt 2012-04-10 10:56:02.259442274 -0700 +@@ -582,6 +582,10 @@ + Common Var(warn_padded) Warning + Warn when padding is required to align structure members + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one local variable shadows another +Index: gcc-4_7-branch/gcc/config.in +=================================================================== +--- gcc-4_7-branch.orig/gcc/config.in 2012-04-10 10:54:04.000000000 -0700 ++++ gcc-4_7-branch/gcc/config.in 2012-04-10 10:56:02.259442274 -0700 +@@ -144,6 +144,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +Index: gcc-4_7-branch/gcc/configure.ac +=================================================================== +--- gcc-4_7-branch.orig/gcc/configure.ac 2012-04-10 10:55:32.000000000 -0700 ++++ gcc-4_7-branch/gcc/configure.ac 2012-04-10 10:56:02.259442274 -0700 +@@ -4959,6 +4959,16 @@ + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +Index: gcc-4_7-branch/gcc/doc/invoke.texi +=================================================================== +--- gcc-4_7-branch.orig/gcc/doc/invoke.texi 2012-04-10 10:54:04.000000000 -0700 ++++ gcc-4_7-branch/gcc/doc/invoke.texi 2012-04-10 10:56:02.263442231 -0700 +@@ -260,6 +260,7 @@ + -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol + -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol + -Wpointer-arith -Wno-pointer-to-int-cast @gol ++-Wno-poison-system-directories @gol + -Wredundant-decls @gol + -Wreturn-type -Wsequence-point -Wshadow @gol + -Wsign-compare -Wsign-conversion -Wstack-protector @gol +@@ -3878,6 +3879,14 @@ + for most targets, it is made up of code and thus requires the stack + to be made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +Index: gcc-4_7-branch/gcc/gcc.c +=================================================================== +--- gcc-4_7-branch.orig/gcc/gcc.c 2012-04-10 10:54:04.000000000 -0700 ++++ gcc-4_7-branch/gcc/gcc.c 2012-04-10 10:56:02.267442207 -0700 +@@ -673,6 +673,8 @@ + %{flto} %{flto=*} %l " LINK_PIE_SPEC \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ ++ %{Wno-poison-system-directories:--no-poison-system-directories}\ ++ %{Werror=poison-system-directories:--error-poison-system-directories}\ + %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ + %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ + %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ +Index: gcc-4_7-branch/gcc/incpath.c +=================================================================== +--- gcc-4_7-branch.orig/gcc/incpath.c 2012-04-10 10:54:04.000000000 -0700 ++++ gcc-4_7-branch/gcc/incpath.c 2012-04-10 10:56:02.267442207 -0700 +@@ -361,6 +361,26 @@ + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18)) ++ || (!strncmp (p->name, "/sw/include", 11)) ++ || (!strncmp (p->name, "/opt/include", 12))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and +Index: gcc-4_7-branch/gcc/Makefile.in +=================================================================== +--- gcc-4_7-branch.orig/gcc/Makefile.in 2012-04-10 10:54:05.000000000 -0700 ++++ gcc-4_7-branch/gcc/Makefile.in 2012-04-10 10:56:02.267442207 -0700 +@@ -2065,7 +2065,7 @@ + + incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \ + intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \ +- $(MACHMODE_H) ++ $(MACHMODE_H) $(FLAGS_H) toplev.h + + CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s) + prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h prefix.h \ +Index: gcc-4_7-branch/gcc/configure +=================================================================== +--- gcc-4_7-branch.orig/gcc/configure 2012-04-10 10:55:32.000000000 -0700 ++++ gcc-4_7-branch/gcc/configure 2012-04-10 10:56:12.183442720 -0700 +@@ -914,6 +914,7 @@ + with_system_zlib + enable_maintainer_mode + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_libquadmath_support + with_linker_hash_style +@@ -1627,6 +1628,8 @@ + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --disable-libquadmath-support + disable libquadmath support for Fortran +@@ -27075,6 +27078,19 @@ + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi ++ + # Substitute configuration variables + + diff --git a/main/gcc/74_all_gcc46_cloog-dl.patch b/main/gcc/74_all_gcc47_cloog-dl.patch index 43c2f96223..ee108e33a9 100644 --- a/main/gcc/74_all_gcc46_cloog-dl.patch +++ b/main/gcc/74_all_gcc47_cloog-dl.patch @@ -1,43 +1,28 @@ -When graphite support is enabled, C++ libraries (libppl, libcloog, libgmpxx, -libstdc++-v3) are linked into cc1. Because of libstdc++ symbol versioning -this has the unfortunate side effect of making it difficult to switch to a -previous version of GCC using gcc-config once these libraries have be built -with the newer version. (http://bugs.gentoo.org/315377#c3) - -Instead, dlopen libcloog as necessary. This patch originated in Fedora and -was modified to work on FreeBSD (http://bugs.gentoo.org/317211). - 2011-01-04 Jakub Jelinek <jakub@redhat.com> - * Makefile.in (BACKENDLIBS): Link against -ldl instead of - -lcloog -lppl. - (graphite.o, graphite%.o): Force -O, remove -fkeep-inline-functions. - (GRAPHITE_CLOOG_UTIL_H, GRAPHITE_POLY_H): New. - (graphite*.o): Adjust dependencies. - * graphite-cloog-compat.h: Include <dlfcn.h>. Reference libcloog and - libppl symbols through pointers in cloog_pointers__ variable. - * graphite.c (init_cloog_pointers): New function. - (graphite_transform_loops): Call init_cloog_pointers. - * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Rename - stmt_for argument to stmt_fora. - * graphite-poly.h: Include graphite-cloog-util.h. + * Makefile.in (BACKENDLIBS): Link against -ldl instead of + -lcloog -lppl. + (graphite.o, graphite%.o): Force -O, remove -fkeep-inline-functions. + (GRAPHITE_CLOOG_UTIL_H, GRAPHITE_POLY_H): New. + (graphite*.o): Adjust dependencies. + * graphite-cloog-compat.h: Include <dlfcn.h>. Reference libcloog and + libppl symbols through pointers in cloog_pointers__ variable. + * graphite.c (init_cloog_pointers): New function. + (graphite_transform_loops): Call init_cloog_pointers. + * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Rename + stmt_for argument to stmt_fora. + * graphite-poly.h: Include graphite-cloog-util.h. -2011-04-02 Ryan Hill <dirtyepic@gentoo.org> +2012-05-19 Ryan Hill <dirtyepic@gentoo.org> - * configure.ac (DL_LIB): Check how to dlopen. - * configure: Regenerate. - * Makefile.in (BACKENDLIBS): Use DL_LIB. - * graphite-cloog-compat.h: Add missing symbols. + * configure.ac (DL_LIB): Check how to dlopen. + * configure: Regenerate. + * Makefile.in (BACKENDLIBS): Use DL_LIB. -2012-03-12 Natanael Copa <ncopa@alpinelinux.org> - * Rebase against gcc 4.6.3 - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 872956d..7d89f08 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in -@@ -984,6 +984,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h $(CONFIG_H) $(SYSTEM_H) \ +@@ -963,6 +963,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h $(CONFIG_H) $(SYSTEM_H) \ PLUGIN_H = plugin.h $(GCC_PLUGIN_H) PLUGIN_VERSION_H = plugin-version.h configargs.h LIBFUNCS_H = libfuncs.h $(HASHTAB_H) @@ -46,16 +31,16 @@ index 872956d..7d89f08 100644 # # Now figure out from those variables how to compile and link. -@@ -1037,7 +1039,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) +@@ -1017,7 +1019,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) # and the system's installed libraries. - LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \ - $(HOST_LIBS) + LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) \ + $(LIBDECNUMBER) $(HOST_LIBS) -BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ +BACKENDLIBS = $(GMPLIBS) $(if $(CLOOGLIBS),@DL_LIB@) $(PLUGINLIBS) $(HOST_LIBS) \ $(ZLIB) # Any system libraries needed just for GNAT. SYSLIBS = @GNAT_LIBEXC@ -@@ -2668,40 +2670,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h tree-pretty-print.h \ +@@ -2603,40 +2605,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h tree-pretty-print.h \ $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) tree-pass.h value-prof.h graphite.o : graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \ $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \ @@ -110,20 +95,22 @@ index 872956d..7d89f08 100644 graphite-sese-to-poly.h tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \ -@@ -3483,6 +3485,11 @@ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \ +@@ -3455,6 +3457,15 @@ $(common_out_object_file): $(common_out_file) $(CONFIG_H) $(SYSTEM_H) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ - $(out_file) $(OUTPUT_OPTION) + $< $(OUTPUT_OPTION) +graphite%.o : \ + ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) +graphite.o : \ + ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) ++graphite%.o : \ ++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) ++graphite.o : \ ++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) + # Build auxiliary files that support ecoff format. - mips-tfile: mips-tfile.o version.o $(LIBDEPS) + mips-tfile: mips-tfile.o $(LIBDEPS) $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \ -diff --git a/gcc/configure b/gcc/configure -index 9b87171..0cf3795 100755 --- a/gcc/configure +++ b/gcc/configure @@ -602,6 +602,7 @@ ac_subst_vars='LTLIBOBJS @@ -134,7 +121,7 @@ index 9b87171..0cf3795 100755 CLOOGINC CLOOGLIBS PPLINC -@@ -26282,6 +26283,7 @@ $as_echo "unable to check" >&6; } +@@ -27236,6 +27237,7 @@ $as_echo "unable to check" >&6; } fi # Check -ldl @@ -142,21 +129,19 @@ index 9b87171..0cf3795 100755 saved_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } -@@ -26341,7 +26343,9 @@ fi +@@ -27295,7 +27297,9 @@ fi if test x"$ac_cv_search_dlopen" = x"-ldl"; then pluginlibs="$pluginlibs -ldl" -+ DL_LIB=$ac_cv_search_dlopen ++ DL_LIB=$ac_cv_search_dlopen fi + LIBS="$saved_LIBS" # Check that we can build shared objects with -fPIC -shared -diff --git a/gcc/configure.ac b/gcc/configure.ac -index c574fb6..228fb9f 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac -@@ -4839,11 +4839,14 @@ if test x"$enable_plugin" = x"yes"; then +@@ -5109,11 +5109,14 @@ if test x"$enable_plugin" = x"yes"; then fi # Check -ldl @@ -165,39 +150,50 @@ index c574fb6..228fb9f 100644 AC_SEARCH_LIBS([dlopen], [dl]) if test x"$ac_cv_search_dlopen" = x"-ldl"; then pluginlibs="$pluginlibs -ldl" -+ DL_LIB=$ac_cv_search_dlopen ++ DL_LIB=$ac_cv_search_dlopen fi + AC_SUBST(DL_LIB) LIBS="$saved_LIBS" # Check that we can build shared objects with -fPIC -shared -diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c -index 41356dc..e93cafe 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c -@@ -738,10 +738,10 @@ clast_get_body_of_loop (struct clast_stmt *stmt) +@@ -836,7 +836,7 @@ clast_get_body_of_loop (struct clast_stmt *stmt) from STMT_FOR. */ static tree --gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_for, int level, -+gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_fora, int level, - tree lb_type, tree ub_type) +-type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip) ++type_for_clast_for (struct clast_for *stmt_fora, ivs_params_p ip) { -- struct clast_stmt *stmt = (struct clast_stmt *) stmt_for; -+ struct clast_stmt *stmt = (struct clast_stmt *) stmt_fora; - struct clast_user_stmt *body = clast_get_body_of_loop (stmt); - CloogStatement *cs = body->statement; - poly_bb_p pbb = (poly_bb_p) cloog_statement_usr (cs); -diff --git a/gcc/graphite-cloog-compat.h b/gcc/graphite-cloog-compat.h -index 011377d..550df7a 100644 + mpz_t bound_one, bound_two; + tree lb_type, ub_type; +@@ -844,8 +844,8 @@ type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip) + mpz_init (bound_one); + mpz_init (bound_two); + +- lb_type = type_for_clast_expr (stmt_for->LB, ip, bound_one, bound_two); +- ub_type = type_for_clast_expr (stmt_for->UB, ip, bound_one, bound_two); ++ lb_type = type_for_clast_expr (stmt_fora->LB, ip, bound_one, bound_two); ++ ub_type = type_for_clast_expr (stmt_fora->UB, ip, bound_one, bound_two); + + mpz_clear (bound_one); + mpz_clear (bound_two); --- a/gcc/graphite-cloog-compat.h +++ b/gcc/graphite-cloog-compat.h -@@ -272,4 +272,269 @@ static inline int cloog_matrix_nrows (CloogMatrix * m) +@@ -272,4 +272,279 @@ static inline int cloog_matrix_nrows (CloogMatrix * m) return m->NbRows; } #endif /* CLOOG_ORG */ + +#include <dlfcn.h> ++#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11 ++#define DYNSYMS_PPL11 ++#else ++#define DYNSYMS_PPL11 \ ++ DYNSYM (ppl_new_PIP_Problem_from_constraints); \ ++ DYNSYM (ppl_PIP_Problem_is_satisfiable); \ ++ DYNSYM (ppl_delete_PIP_Problem); ++#endif +#define DYNSYMS \ + DYNSYM (cloog_block_alloc); \ + DYNSYM (cloog_block_list_free); \ @@ -302,16 +298,15 @@ index 011377d..550df7a 100644 + DYNSYM (stmt_guard); \ + DYNSYM (stmt_root); \ + DYNSYM (stmt_user); \ ++ DYNSYM (stmt_ass); \ + DYNSYM (ppl_delete_Constraint_System); \ + DYNSYM (ppl_initialize); \ + DYNSYM (ppl_new_Constraint_System_from_Constraint); \ + DYNSYM (ppl_new_C_Polyhedron_from_Constraint_System); \ + DYNSYM (ppl_Polyhedron_affine_image); \ + DYNSYM (ppl_io_fprint_Pointset_Powerset_C_Polyhedron); \ -+ DYNSYM (ppl_new_PIP_Problem_from_constraints); \ -+ DYNSYM (ppl_PIP_Problem_is_satisfiable); \ -+ DYNSYM (ppl_delete_PIP_Problem); -+extern struct ++ DYNSYMS_PPL11 ++extern struct cloog_pointers_s__ +{ + bool inited; + void *h; @@ -448,22 +443,23 @@ index 011377d..550df7a 100644 +#define stmt_guard (*cloog_pointers__.p_stmt_guard) +#define stmt_root (*cloog_pointers__.p_stmt_root) +#define stmt_user (*cloog_pointers__.p_stmt_user) ++#define stmt_ass (*cloog_pointers__.p_stmt_ass) +#define ppl_delete_Constraint_System (*cloog_pointers__.p_ppl_delete_Constraint_System) +#define ppl_initialize (*cloog_pointers__.p_ppl_initialize) +#define ppl_new_Constraint_System_from_Constraint (*cloog_pointers__.p_ppl_new_Constraint_System_from_Constraint) +#define ppl_new_C_Polyhedron_from_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_Constraint_System) +#define ppl_Polyhedron_affine_image (*cloog_pointers__.p_ppl_Polyhedron_affine_image) +#define ppl_io_fprint_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_io_fprint_Pointset_Powerset_C_Polyhedron) ++#if !(PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11) +#define ppl_new_PIP_Problem_from_constraints (*cloog_pointers__.p_ppl_new_PIP_Problem_from_constraints) +#define ppl_PIP_Problem_is_satisfiable (*cloog_pointers__.p_ppl_PIP_Problem_is_satisfiable) +#define ppl_delete_PIP_Problem (*cloog_pointers__.p_ppl_delete_PIP_Problem) ++#endif + +#define cloog_finalize (*cloog_pointers__.p_ppl_finalize) + + #endif /* GRAPHITE_CLOOG_COMPAT_H */ -diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h -index 3bf87b0..3ed95b7 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see @@ -475,8 +471,6 @@ index 3bf87b0..3ed95b7 100644 typedef struct poly_dr *poly_dr_p; DEF_VEC_P(poly_dr_p); DEF_VEC_ALLOC_P (poly_dr_p, heap); -diff --git a/gcc/graphite.c b/gcc/graphite.c -index b013447..5637d37 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -56,6 +56,35 @@ along with GCC; see the file COPYING3. If not see diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index da967dbb4c..2b7b747c96 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=gcc -pkgver=4.6.3 -_piepatchver=0.4.5 +pkgver=4.7.1 +_piepatchver=0.5.3 _specs_ver=0.2.0 _specs_gcc_ver=4.4.3 @@ -12,12 +12,15 @@ pkgdesc="The GNU Compiler Collection" url="http://gcc.gnu.org" arch="all" license="GPL LGPL" -depends="binutils libgcc libgomp libobjc" -makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip +depends="binutils libgomp libobjc" +makedepends="bison flex gmp-dev mpfr-dev texinfo mpc1-dev gawk zlib-dev zip cloog-dev" subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp" replaces="libstdc++" +# disable Go til we have getcontex/setcontext +LANG_GO=off + if [ -n "$BOOTSTRAP" ]; then LANG_OBJC=off LANG_JAVA=off @@ -43,33 +46,29 @@ if [ "$LANG_FORTRAN" != "off" ]; then _languages="$_languages,fortran" fi -source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-core-$pkgver.tar.bz2 - ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-g++-$pkgver.tar.bz2 - ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-objc-$pkgver.tar.bz2 - ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-java-$pkgver.tar.bz2 - ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-go-$pkgver.tar.bz2 - ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-fortran-$pkgver.tar.bz2 - http://distfiles.gentoo.org/distfiles/gcc-4.6.1-piepatches-v${_piepatchver}.tar.bz2 +source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2 + http://distfiles.gentoo.org/distfiles/gcc-4.7.1-piepatches-v${_piepatchver}.tar.bz2 http://distfiles.gentoo.org/distfiles/gcc-$_specs_gcc_ver-specs-$_specs_ver.tar.bz2 ftp://sourceware.org/pub/java/ecj-latest.jar - 08_all_cross-compile.patch 11_all_default-warn-format-security.patch 12_all_default-warn-trampolines.patch 15_all_libgomp-Werror.patch - 34_all_ia64_note.GNU-stack.patch + 16_all_libgo-Werror-pr53679.patch + 29_all_arm_armv4t-default.patch + 49_all_gcc-4.7-x86-libitm-pr52695.patch 51_all_libiberty-pic.patch - 74_all_gcc46_cloog-dl.patch + 67_all_gcc-poison-system-directories.patch + 74_all_gcc47_cloog-dl.patch gcc-spec-env.patch pt_gnu_eh_frame.patch uclibc-getipinfo.patch - gcc-4.6-dynamic-linker.patch + gcc-4.7-dynamic-linker.patch gcc-4.6-pr32219.patch boehem-gc-uclibc.patch gcc-pure64.patch gcc-go.patch - gcc-libgcc-x86.get_pc_thunk.bx.patch " # we build out-of-tree @@ -119,10 +118,9 @@ prepare() { # by default for everything else. local _hard_cflags="-DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW" sed -e "/^ALL_CFLAGS/iHARD_CFLAGS = ${_hard_cflags}" \ - -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) -fno-PIE |' \ + -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \ + -e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |' \ -i gcc/Makefile.in || return 1 - sed -e "/stage1_cflags=/s/-fno-stack-protector/-fno-stack-protector -fno-PIE/" \ - -i configure # see http://gcc.gnu.org/ml/java/2008-04/msg00027.html mv "$srcdir"/ecj-latest.jar ecj.jar @@ -173,6 +171,7 @@ build() { --target=${CTARGET} \ --with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \ --disable-altivec \ + --disable-build-with-cxx \ --disable-checking \ --disable-fixed-point \ --disable-libssp \ @@ -192,7 +191,8 @@ build() { $_dynamic_linker \ --with-dynamic-linker-prefix=/lib \ --with-system-zlib \ - --without-system-libunwind + --without-system-libunwind \ + || return 1 make || return 1 } @@ -288,6 +288,7 @@ libgomp() { java() { pkgdesc="Java support for GCC" + depends="zlib-dev" paxctl -c -pm "$pkgdir"/usr/libexec/gcc/*/*/ecj1 || return 1 mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib cd "$pkgdir"/usr/bin @@ -297,8 +298,12 @@ java() { mkdir -p "$subpkgdir"/${i%/*} mv "$pkgdir"/$i "$subpkgdir"/$i || return 1 done + for i in "$pkgdir"/usr/lib/libgcj*.so; do + if [ -L "$i" ]; then + mv "$i" "$subpkgdir"/usr/lib/ + fi + done mv \ - "$pkgdir"/usr/lib/libgcj*.so \ "$pkgdir"/usr/lib/libgij.so \ "$pkgdir"/usr/lib/libgcj.spec \ "$subpkgdir"/usr/lib/ @@ -306,9 +311,11 @@ java() { libgcj() { pkgdesc="Java runtime library for gcc" + # libgcj_bc.so moved from gcc-java to libgcj + replaces="gcc-java" mkdir -p "$subpkgdir"/usr/bin cd "$pkgdir"/usr/bin - paxctl -c -pmE "$pkgdir"/usr/bin/gij || return 1 + paxctl -c -pmsE "$pkgdir"/usr/bin/gij || return 1 mv aot-compile gappletviewer gc-analyze gij gjar gjarsigner gkeytool\ gnative2ascii gorbd grmic grmid grmiregistry gserialver \ gtnameserv i486-alpine-linux-uclibc-gcj jv-convert \ @@ -321,11 +328,13 @@ libgcj() { done mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/gcj-* \ + "$pkgdir"/usr/lib/libgcj_bc.so \ "$pkgdir"/usr/lib/libgcj*.so.* \ "$pkgdir"/usr/lib/libgij.so.* \ "$pkgdir"/usr/lib/logging.properties \ "$pkgdir"/usr/lib/security \ - "$subpkgdir"/usr/lib/ + "$subpkgdir"/usr/lib/ \ + || return 1 mkdir -p "$subpkgdir"/usr/share/ mv "$pkgdir"/usr/share/java "$subpkgdir"/usr/share/ @@ -388,28 +397,24 @@ gfortran() { "$subpkgdir"/$gcclibs } -md5sums="766091220c6a14fcaa2c06dd573e3758 gcc-core-4.6.3.tar.bz2 -37515158a0fb3d0800ec41a08c05e69e gcc-g++-4.6.3.tar.bz2 -48ba23770c34b1cb468f72618b4452c5 gcc-objc-4.6.3.tar.bz2 -ea47e796f9e53118cd6e262fa220085c gcc-java-4.6.3.tar.bz2 -92166ef431c165054467a9524d0819c8 gcc-go-4.6.3.tar.bz2 -26a18d5727f7c8c18581ba924cce1e5f gcc-fortran-4.6.3.tar.bz2 -5dc7efd84b526801b94fed21462aea62 gcc-4.6.1-piepatches-v0.4.5.tar.bz2 +md5sums="933e6f15f51c031060af64a9e14149ff gcc-4.7.1.tar.bz2 +2e1d99664efcdbd86549a40ddf37d405 gcc-4.7.1-piepatches-v0.5.3.tar.bz2 441c76504e1d97170117c294e65c7a72 gcc-4.4.3-specs-0.2.0.tar.bz2 d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar -b1b5987e7c53f2c8a0fa929444bd9129 08_all_cross-compile.patch 34e4a0260e9dbd434ac84b9dda381240 11_all_default-warn-format-security.patch -a78022925c0ecb1f13384238b81adbe7 12_all_default-warn-trampolines.patch +1570f30f65f1c4941d2bd690a7148836 12_all_default-warn-trampolines.patch 6862cb5268fef68a4a1906e0c4ea0d46 15_all_libgomp-Werror.patch -1a8ce6b7a0b9a115e37fdda311704451 34_all_ia64_note.GNU-stack.patch +2a6a0be54c283c311a39bba359cc01f4 16_all_libgo-Werror-pr53679.patch +681499caf97fbdb4d5c97e312cddf47c 29_all_arm_armv4t-default.patch +4e35639c74fe4b6111f74a91bb3d52a8 49_all_gcc-4.7-x86-libitm-pr52695.patch d8692c56f04b92667096f59d843e95c5 51_all_libiberty-pic.patch -a90d4d1ee358b19f2068fe2e4fd5d001 74_all_gcc46_cloog-dl.patch +406fc6f29ab3d746eaef0202c50fd7e9 67_all_gcc-poison-system-directories.patch +f24f07ed008324eaecb0f75417c99116 74_all_gcc47_cloog-dl.patch a695d7648509b4f8e18b389a19e6037c gcc-spec-env.patch -2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch +ab83248e10b2bf4b3d9240de0fefb52b pt_gnu_eh_frame.patch 6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch -3be85df859fa1d5c875bbfcc2dee8288 gcc-4.6-dynamic-linker.patch +3d8131bdfa70e51be4ae186114097173 gcc-4.7-dynamic-linker.patch 32e8e4c0e23ed8f5de95a591cb30f1da gcc-4.6-pr32219.patch 2c6cb49bb9bfd8b6e690222e66ccc901 boehem-gc-uclibc.patch -d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch -c94014ece84407a36d239417a2bad25d gcc-go.patch -978e3fac97ad99902a86bafc6f283727 gcc-libgcc-x86.get_pc_thunk.bx.patch" +94c36cc724f5c5d6c8cb8650195ee83d gcc-pure64.patch +c94014ece84407a36d239417a2bad25d gcc-go.patch" diff --git a/main/gcc/gcc-4.6-dynamic-linker.patch b/main/gcc/gcc-4.7-dynamic-linker.patch index a6b235cd19..3dbc4d7e98 100644 --- a/main/gcc/gcc-4.6-dynamic-linker.patch +++ b/main/gcc/gcc-4.7-dynamic-linker.patch @@ -1,55 +1,8 @@ -commit d929f627aba264e63cf779cd4ca51af97b076445 -Author: Natanael Copa <ncopa@alpinelinux.org> -Date: Tue Sep 28 09:45:17 2010 +0000 - - Submitted By: Kevin Day <thekevinday AT gmail DOT com> - Date: 2008-12-19 - Initial Package Version: 4.3.2 - Upstream Status: Not submitted - Description: Why not just be able to define the prefix of the dynamic linker instead of hardcoding it.. - This includes the --nostdinc patch as well, so think of this as a specs-3 patch - This also allows for specifying the dynamic-linker as well - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index ae2416b..b0b9b2c 100644 ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -971,7 +971,7 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@ - # This is the variable actually used when we compile. If you change this, - # you probably want to update BUILD_CFLAGS in configure.ac - ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ -- $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ -+ $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ @NOSTDINC@ - - # The C++ version. - ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ -@@ -2105,6 +2105,8 @@ DRIVER_DEFINES = \ - -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ - -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ - -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \ -+ -DDYNAMIC_LINKER_PREFIX=\"@DYNAMICLINKERPREFIX@\" \ -+ -DDYNAMIC_LINKER=\"@DYNAMICLINKER@\" \ - -DDEFAULT_TARGET_VERSION=\"$(version)\" \ - -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \ - -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \ -diff --git a/gcc/config/alpha/gnu.h b/gcc/config/alpha/gnu.h -index f98c3e7..bd16dcf 100644 ---- a/gcc/config/alpha/gnu.h -+++ b/gcc/config/alpha/gnu.h -@@ -34,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - } while (0) - - #undef ELF_DYNAMIC_LINKER --#define ELF_DYNAMIC_LINKER "/lib/ld.so" -+#define ELF_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef STARTFILE_SPEC - #define STARTFILE_SPEC \ diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h -index c48fc93..3068717 100644 +index f578ecb..ff4d2ce 100644 --- a/gcc/config/alpha/linux-elf.h +++ b/gcc/config/alpha/linux-elf.h -@@ -27,8 +27,8 @@ along with GCC; see the file COPYING3. If not see +@@ -24,8 +24,8 @@ along with GCC; see the file COPYING3. If not see #define EXTRA_SPECS \ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, @@ -59,12 +12,12 @@ index c48fc93..3068717 100644 +#define UCLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER #if DEFAULT_LIBC == LIBC_UCLIBC #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" - #else + #elif DEFAULT_LIBC == LIBC_GLIBC diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h -index fce1ed1..c3bcd50 100644 +index 80bd825..64b4595 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h -@@ -61,7 +61,7 @@ +@@ -62,7 +62,7 @@ /* Use ld-linux.so.3 so that it will be possible to run "classic" GNU/Linux binaries on an EABI system. */ #undef GLIBC_DYNAMIC_LINKER @@ -74,20 +27,20 @@ index fce1ed1..c3bcd50 100644 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to use the GNU/Linux version, not the generic BPABI version. */ diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h -index 9fdca41..65b0a5a 100644 +index 270e12b..dd613ef 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h -@@ -62,7 +62,7 @@ +@@ -59,7 +59,7 @@ - #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" + #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \ - %{b} \ + #define LINUX_TARGET_LINK_SPEC "%{h*} \ + %{static:-Bstatic} \ diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h -index 5c716cd..b5e464e 100644 +index f91cf17..263351a 100644 --- a/gcc/config/bfin/linux.h +++ b/gcc/config/bfin/linux.h @@ -45,7 +45,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -98,9 +51,9 @@ index 5c716cd..b5e464e 100644 + -dynamic-linker DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER} \ %{static}} -init __init -fini __fini" - #define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h" + #undef TARGET_SUPPORTS_SYNC_CALLS diff --git a/gcc/config/cris/linux.h b/gcc/config/cris/linux.h -index 38f0a7e..6893407 100644 +index df10721..35f6d77 100644 --- a/gcc/config/cris/linux.h +++ b/gcc/config/cris/linux.h @@ -103,7 +103,7 @@ along with GCC; see the file COPYING3. If not see @@ -110,13 +63,13 @@ index 38f0a7e..6893407 100644 -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - /* We need an -rpath-link to ld.so.1, and presumably to each directory - specified with -B. */ + #undef CRIS_LINK_SUBTARGET_SPEC + #define CRIS_LINK_SUBTARGET_SPEC \ diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h -index 84d8127..fb3e79a 100644 +index 770a3d1..bd02fd6 100644 --- a/gcc/config/freebsd-spec.h +++ b/gcc/config/freebsd-spec.h -@@ -144,9 +144,9 @@ is built with the --enable-threads configure-time option.} \ +@@ -129,9 +129,9 @@ is built with the --enable-threads configure-time option.} \ #endif #if FBSD_MAJOR < 6 @@ -127,9 +80,9 @@ index 84d8127..fb3e79a 100644 +#define FBSD_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER #endif - #if defined(HAVE_LD_EH_FRAME_HDR) + /* NOTE: The freebsd-spec.h header is included also for various diff --git a/gcc/config/frv/linux.h b/gcc/config/frv/linux.h -index 71cd094..221d01d 100644 +index 9847712..089afdf 100644 --- a/gcc/config/frv/linux.h +++ b/gcc/config/frv/linux.h @@ -35,7 +35,7 @@ @@ -142,38 +95,34 @@ index 71cd094..221d01d 100644 #undef LINK_SPEC #define LINK_SPEC "\ diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h -index 2a31880..9c08adb 100644 +index 73681fe..8c51d30 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h -@@ -100,7 +100,7 @@ along with GCC; see the file COPYING3. If not see +@@ -21,4 +21,4 @@ along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ - /* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */ - #define LINK_EMULATION "elf_i386" + #define GNU_USER_LINK_EMULATION "elf_i386" -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef ASM_SPEC - #define ASM_SPEC \ diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h -index 867de59..274acca 100644 +index 5b0a212..185c911 100644 --- a/gcc/config/i386/linux64.h +++ b/gcc/config/i386/linux64.h -@@ -58,8 +58,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - When the -shared link option is used a final link is not being - done. */ +@@ -28,6 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define GNU_USER_LINK_EMULATION64 "elf_x86_64" + #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" +#define GLIBC_DYNAMIC_LINKER32 "/" DYNAMIC_LINKER +#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #if TARGET_64BIT_DEFAULT - #define SPEC_32 "m32" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h -index 587a4f4..450fcb5 100644 +index 00b0ddb..de6bb1e 100644 --- a/gcc/config/ia64/linux.h +++ b/gcc/config/ia64/linux.h -@@ -61,7 +61,7 @@ do { \ +@@ -56,7 +56,7 @@ do { \ /* Define this for shared library support because it isn't in the main linux.h file. */ @@ -183,36 +132,38 @@ index 587a4f4..450fcb5 100644 #undef LINK_SPEC #define LINK_SPEC "\ diff --git a/gcc/config/knetbsd-gnu.h b/gcc/config/knetbsd-gnu.h -index 4cc8eb7..bb7a063 100644 +index 30fa99a..5059b85 100644 --- a/gcc/config/knetbsd-gnu.h +++ b/gcc/config/knetbsd-gnu.h -@@ -34,5 +34,5 @@ along with GCC; see the file COPYING3. If not see +@@ -33,4 +33,5 @@ along with GCC; see the file COPYING3. If not see - #ifdef GLIBC_DYNAMIC_LINKER - #undef GLIBC_DYNAMIC_LINKER --#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + + #undef GNU_USER_DYNAMIC_LINKER +-#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #endif ++ diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index e567e9a..c052fd0 100644 +index dbbeea5..0147ece 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h -@@ -117,9 +117,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -74,10 +74,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see GLIBC_DYNAMIC_LINKER must be defined for each target using them, or GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets supporting both 32-bit and 64-bit compilation. */ -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" +#define UCLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER +#define UCLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER +#define UCLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER ++#define UCLIBC_DYNAMIC_LINKERX32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" -@@ -135,3 +135,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - +@@ -104,3 +104,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Whether we have sincos that follows the GNU extension. */ + #undef TARGET_HAS_SINCOS #define TARGET_HAS_SINCOS (OPTION_GLIBC || OPTION_BIONIC) + +#ifdef NOSTDINC @@ -220,12 +171,12 @@ index e567e9a..c052fd0 100644 +#define STANDARD_INCLUDE_DIR 0 +#endif diff --git a/gcc/config/m32r/linux.h b/gcc/config/m32r/linux.h -index 0515e5b..019e850 100644 +index bc7802b..6ff030f 100644 --- a/gcc/config/m32r/linux.h +++ b/gcc/config/m32r/linux.h -@@ -58,7 +58,7 @@ - - /* If ELF is the default format, we should not use /lib/elf. */ +@@ -38,7 +38,7 @@ + When the -shared link option is used a final link is not being + done. */ -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER @@ -233,12 +184,12 @@ index 0515e5b..019e850 100644 #undef LINK_SPEC #if TARGET_LITTLE_ENDIAN diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h -index 1d73ee0..e57cf50 100644 +index 325faf7..01bb765 100644 --- a/gcc/config/m68k/linux.h +++ b/gcc/config/m68k/linux.h -@@ -84,7 +84,7 @@ along with GCC; see the file COPYING3. If not see - - /* If ELF is the default format, we should not use /lib/elf. */ +@@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see + When the -shared link option is used a final link is not being + done. */ -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER @@ -246,25 +197,23 @@ index 1d73ee0..e57cf50 100644 #undef LINK_SPEC #define LINK_SPEC "-m m68kelf %{shared} \ diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h -index 0512ef7..7efe2fd 100644 +index bce9c17..46a2b0f 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h -@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see - #undef MIPS_DEFAULT_GVALUE - #define MIPS_DEFAULT_GVALUE 0 +@@ -18,4 +18,5 @@ You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - /* Borrowed from sparc/linux.h */ - #undef LINK_SPEC ++ diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h -index 2f24dfa..850cb22 100644 +index 6e92719..736aa6d 100644 --- a/gcc/config/mips/linux64.h +++ b/gcc/config/mips/linux64.h -@@ -35,10 +35,10 @@ along with GCC; see the file COPYING3. If not see - %{!shared: \ - %{profile:-lc_p} %{!profile:-lc}}" +@@ -23,11 +23,11 @@ along with GCC; see the file COPYING3. If not see + #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" + #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1" @@ -276,16 +225,16 @@ index 2f24dfa..850cb22 100644 +#define GLIBC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER +#define UCLIBC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER +#define BIONIC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #define LINUX_DYNAMIC_LINKERN32 \ + #define GNU_USER_DYNAMIC_LINKERN32 \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ BIONIC_DYNAMIC_LINKERN32) diff --git a/gcc/config/mn10300/linux.h b/gcc/config/mn10300/linux.h -index ac9f8c5..8ab78b1 100644 +index d63b95a..93c54b1 100644 --- a/gcc/config/mn10300/linux.h +++ b/gcc/config/mn10300/linux.h -@@ -32,7 +32,7 @@ +@@ -33,7 +33,7 @@ #undef ASM_SPEC - #define ASM_SPEC "%{Wa,*:%*}" + #define ASM_SPEC "" -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER @@ -293,10 +242,10 @@ index ac9f8c5..8ab78b1 100644 #undef LINK_SPEC #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \ diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index da7bca3..c36e7d6 100644 +index 7c516eb..687264e 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h -@@ -348,10 +348,10 @@ extern int dot_symbols; +@@ -358,10 +358,10 @@ extern int dot_symbols; #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" @@ -312,10 +261,10 @@ index da7bca3..c36e7d6 100644 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" #elif DEFAULT_LIBC == LIBC_GLIBC diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h -index ddbcfa9..59bfd28 100644 +index e5385ec..72df4ac 100644 --- a/gcc/config/s390/linux.h +++ b/gcc/config/s390/linux.h -@@ -72,8 +72,8 @@ along with GCC; see the file COPYING3. If not see +@@ -61,8 +61,8 @@ along with GCC; see the file COPYING3. If not see #define MULTILIB_DEFAULTS { "m31" } #endif @@ -327,10 +276,10 @@ index ddbcfa9..59bfd28 100644 #undef LINK_SPEC #define LINK_SPEC \ diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h -index d513af8..2ad27a7 100644 +index a5c2734..9eff3c4 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h -@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see +@@ -45,7 +45,7 @@ along with GCC; see the file COPYING3. If not see #define TARGET_ASM_FILE_END file_end_indicate_exec_stack @@ -340,12 +289,12 @@ index d513af8..2ad27a7 100644 #undef SUBTARGET_LINK_EMUL_SUFFIX #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h -index b12c881..83bdd8e 100644 +index 60dc869..9930e21 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h -@@ -83,7 +83,7 @@ along with GCC; see the file COPYING3. If not see - - /* If ELF is the default format, we should not use /lib/elf. */ +@@ -84,7 +84,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + When the -shared link option is used a final link is not being + done. */ -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER @@ -353,12 +302,12 @@ index b12c881..83bdd8e 100644 #undef LINK_SPEC #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h -index c2e78d7..8481a34 100644 +index 14966b9..c134401 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h -@@ -109,8 +109,8 @@ along with GCC; see the file COPYING3. If not see - - /* If ELF is the default format, we should not use /lib/elf. */ +@@ -93,8 +93,8 @@ along with GCC; see the file COPYING3. If not see + When the -shared link option is used a final link is not being + done. */ -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" @@ -368,10 +317,10 @@ index c2e78d7..8481a34 100644 #ifdef SPARC_BI_ARCH diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h -index 69ab626..ebc8e0b 100644 +index f5caeb7..c9274e4 100644 --- a/gcc/config/xtensa/linux.h +++ b/gcc/config/xtensa/linux.h -@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see +@@ -45,7 +45,7 @@ along with GCC; see the file COPYING3. If not see %{mlongcalls:--longcalls} \ %{mno-longcalls:--no-longcalls}" @@ -381,10 +330,10 @@ index 69ab626..ebc8e0b 100644 #undef LINK_SPEC #define LINK_SPEC \ diff --git a/gcc/configure b/gcc/configure -index b623a4a..230719b 100755 +index 3e9152a..4e1fdd3 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -757,6 +757,9 @@ AWK +@@ -755,6 +755,9 @@ AWK SET_MAKE REPORT_BUGS_TEXI REPORT_BUGS_TO @@ -392,24 +341,28 @@ index b623a4a..230719b 100755 +DYNAMICLINKERPREFIX +NOSTDINC PKGVERSION - onestep CONFIGURE_SPECS -@@ -1657,6 +1660,14 @@ Optional Packages: - --with-gc={page,zone} choose the garbage collection mechanism to use - with the compiler + CROSS_SYSTEM_HEADER_DIR +@@ -1669,6 +1672,18 @@ Optional Packages: + --with-gc={page,zone} choose the garbage collection mechanism to use with + the compiler --with-system-zlib use installed libz + --with-dynamic-linker=PATH + specifies path to dynamic linker. -+ example: "/lib/ld-linux.so.2", where this defines "ld-linux.so.2" ++ example: "/lib/ld-linux.so.2", where this defines ++ "ld-linux.so.2" + --with-dynamic-linker-prefix=PATH + specifies path to dynamic linker. -+ example: "/lib/ld-linux.so.2", where this defines "/lib" ++ example: "/lib/ld-linux.so.2", where this defines ++ "/lib" + --with-nostdinc build gcc to ignore standard include directories. -+ You will have to use --with-local-prefix with this option. - --with-slibdir=DIR shared libraries in DIR [LIBDIR] ++ You will have to use --with-local-prefix with this ++ option. ++ + --with-linker-hash-style={sysv,gnu,both} + specify the linker hash style - Some influential environment variables: -@@ -6065,6 +6076,47 @@ fi +@@ -6378,6 +6393,47 @@ fi @@ -457,3 +410,23 @@ index b623a4a..230719b 100755 # --------------------- # Warnings and checking +--- ./gcc/Makefile.in.orig ++++ ./gcc/Makefile.in +@@ -986,7 +986,7 @@ + # This is the variable actually used when we compile. If you change this, + # you probably want to update BUILD_CFLAGS in configure.ac + ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ +- $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ ++ $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ @NOSTDINC@ + + # The C++ version. + ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \ +@@ -2090,6 +2090,8 @@ + -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ + -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ + -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \ ++ -DDYNAMIC_LINKER_PREFIX=\"@DYNAMICLINKERPREFIX@\" \ ++ -DDYNAMIC_LINKER=\"@DYNAMICLINKER@\" \ + -DDEFAULT_TARGET_VERSION=\"$(version)\" \ + -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \ + -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \ diff --git a/main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch b/main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch deleted file mode 100644 index 551e6150ab..0000000000 --- a/main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch +++ /dev/null @@ -1,38 +0,0 @@ -Index: libgcc/config/i386/morestack.S -=================================================================== ---- ./libgcc/config/i386/morestack.S (revision 173993) -+++ ./libgcc/config/i386/morestack.S (revision 173994) -@@ -278,8 +278,7 @@ - movl 4(%esp),%eax # Function argument. - movl %eax,(%esp) - #ifdef __PIC__ --#undef __i686 -- call __i686.get_pc_thunk.bx # %ebx may not be set up for us. -+ call __x86.get_pc_thunk.bx # %ebx may not be set up for us. - addl $_GLOBAL_OFFSET_TABLE_, %ebx - call _Unwind_Resume@PLT # Resume unwinding. - #else -@@ -449,6 +448,23 @@ - .size __morestack, . - __morestack - #endif - -+#if !defined(__x86_64__) && defined(__PIC__) -+# Output the thunk to get PC into bx, since we use it above. -+ .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat -+ .globl __x86.get_pc_thunk.bx -+ .hidden __x86.get_pc_thunk.bx -+#ifdef __ELF__ -+ .type __x86.get_pc_thunk.bx, @function -+#endif -+__x86.get_pc_thunk.bx: -+ .cfi_startproc -+ movl (%esp), %ebx -+ ret -+ .cfi_endproc -+#ifdef __ELF__ -+ .size __x86.get_pc_thunk.bx, . - __x86.get_pc_thunk.bx -+#endif -+#endif - - # The exception table. This tells the personality routine to execute - # the exception handler. diff --git a/main/gcc/gcc-pure64.patch b/main/gcc/gcc-pure64.patch index f9ab69326e..392aa56957 100644 --- a/main/gcc/gcc-pure64.patch +++ b/main/gcc/gcc-pure64.patch @@ -1,12 +1,14 @@ -diff -Naur gcc-4.2.0.orig/gcc/config/i386/t-linux64 gcc-4.2.0/gcc/config/i386/t-linux64 ---- gcc-4.2.0.orig/gcc/config/i386/t-linux64 2007-05-16 19:21:19.000000000 -0400 -+++ gcc-4.2.0/gcc/config/i386/t-linux64 2007-05-18 17:04:36.000000000 -0400 -@@ -6,7 +6,7 @@ - - MULTILIB_OPTIONS = m64/m32 - MULTILIB_DIRNAMES = 64 32 --MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) -+MULTILIB_OSDIRNAMES = ../lib ../lib32 - +diff -Naur gcc-orig/gcc/config/i386/t-linux64 gcc/gcc/config/i386/t-linux64 +--- gcc-orig/gcc/config/i386/t-linux64 2011-07-08 01:38:34.000000000 +1000 ++++ gcc/gcc/config/i386/t-linux64 2011-07-24 19:49:41.000000000 +1000 +@@ -34,8 +34,8 @@ + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64 +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) ++MULTILIB_OSDIRNAMES = m64=../lib ++MULTILIB_OSDIRNAMES+= m32=../lib32 + MULTILIB_OSDIRNAMES+= mx32=../libx32 + LIBGCC = stmp-multilib - INSTALL_LIBGCC = install-multilib diff --git a/main/gcc/pt_gnu_eh_frame.patch b/main/gcc/pt_gnu_eh_frame.patch index 3e029104aa..f093eac43b 100644 --- a/main/gcc/pt_gnu_eh_frame.patch +++ b/main/gcc/pt_gnu_eh_frame.patch @@ -1,5 +1,5 @@ ---- gcc-4.3.2/gcc/crtstuff.c.orig Mon Nov 17 16:02:38 2008 -+++ gcc-4.3.2/gcc/crtstuff.c Mon Nov 17 16:02:52 2008 +--- ./libgcc/crtstuff.c.orig Mon Nov 17 16:02:38 2008 ++++ ./libgcc/crtstuff.c Mon Nov 17 16:02:52 2008 @@ -94,8 +94,7 @@ #include <link.h> /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h. |