aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/gcc
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2010-04-20 16:18:08 +0000
committerFlorian Fainelli <florian@openwrt.org>2010-04-20 16:18:08 +0000
commit919f5d8ee53f430be11637c61f479cf4992ca839 (patch)
treeb31b36336f28314dd72c28852b1dcf5f76f62905 /toolchain/gcc
parent6edd065384aff0d9b7aba8205d5df441d9b21e29 (diff)
downloadmaster-187ad058-919f5d8ee53f430be11637c61f479cf4992ca839.tar.gz
master-187ad058-919f5d8ee53f430be11637c61f479cf4992ca839.tar.bz2
master-187ad058-919f5d8ee53f430be11637c61f479cf4992ca839.zip
[toolchain] fix graphite options with gcc-4.5, add libelf for LTO, fix mbsd_multi patch, patch from Bernhard Loos
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21046 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/Config.in8
-rw-r--r--toolchain/gcc/Makefile13
-rw-r--r--toolchain/gcc/patches/4.5.0/910-mbsd_multi.patch36
3 files changed, 35 insertions, 22 deletions
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index bd7d50995e..abbfe733e8 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -67,7 +67,13 @@ endchoice
config GCC_USE_GRAPHITE
bool
prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS
- depends GCC_VERSION_4_4_1 || GCC_VERSION_4_4_2 || GCC_VERSION_4_4_3
+ depends GCC_VERSION_4_4 || GCC_VERSION_4_5
+
+config GCC_USE_SYSTEM_PPL_CLOOG
+ bool
+ prompt "Use the system versions of PPL and CLooG
+ depends GCC_USE_GRAPHITE
+ default n
config EXTRA_GCC_CONFIG_OPTIONS
string
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index ed9de15b3c..325fe7474e 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -96,6 +96,7 @@ GCC_CONFIGURE:= \
--disable-libmudflap \
--disable-multilib \
--disable-nls \
+ $(GRAPHITE_CONFIGURE) \
$(if $(CONFIG_GCC_USE_GRAPHITE),--with-host-libstdcxx=-lstdc++) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
@@ -103,7 +104,7 @@ GCC_CONFIGURE:= \
$(if $(CONFIG_GCC_VERSION_LLVM),--enable-llvm=$(BUILD_DIR_BASE)/host/llvm) \
$(if $(CONFIG_GCC_VERSION_4_3_3_CS)$(CONFIG_GCC_VERSION_4_4_1_CS)$(CONFIG_GCC_VERSION_4_4_3_CS),--enable-poison-system-directories)
-ifneq ($(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4),)
+ifneq ($(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4)$(CONFIG_GCC_VERSION_4_5),)
GCC_BUILD_TARGET_LIBGCC:=y
GCC_CONFIGURE+= \
--with-gmp=$(TOPDIR)/staging_dir/host \
@@ -164,7 +165,13 @@ GCC_CONFIGURE_STAGE2:= \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--enable-threads \
- --with-slibdir=$(TOOLCHAIN_DIR)/lib \
+ --with-slibdir=$(TOOLCHAIN_DIR)/lib
+
+ifneq ($(CONFIG_GCC_VERSION_4_5),)
+ GCC_CONFIGURE_STAGE2+= \
+ --enable-lto \
+ --with-libelf=$(TOPDIR)/staging_dir/host
+endif
ifneq ($(CONFIG_TLS_SUPPORT),)
GCC_CONFIGURE_STAGE2+= \
@@ -225,7 +232,7 @@ define Stage1/Install
$(GCC_MAKE) -C $(HOST_BUILD_DIR1) \
install-gcc \
$(if $(GCC_BUILD_TARGET_LIBGCC),install-target-libgcc)
-
+
# XXX: glibc insists on linking against libgcc_eh
( cd $(TOOLCHAIN_DIR)/usr/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \
[ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \
diff --git a/toolchain/gcc/patches/4.5.0/910-mbsd_multi.patch b/toolchain/gcc/patches/4.5.0/910-mbsd_multi.patch
index 1cbc5dbcb4..0d5815a546 100644
--- a/toolchain/gcc/patches/4.5.0/910-mbsd_multi.patch
+++ b/toolchain/gcc/patches/4.5.0/910-mbsd_multi.patch
@@ -29,6 +29,16 @@
static void set_Wimplicit (int);
static void handle_OPT_d (const char *);
static void set_std_cxx98 (int);
+@@ -454,6 +457,9 @@
+ enable_warning_as_error ("implicit-function-declaration", value, CL_C | CL_ObjC);
+ break;
+
++ case OPT_Werror_maybe_reset:
++ break;
++
+ case OPT_Wformat:
+ set_Wformat (value);
+ break;
@@ -690,6 +701,12 @@
flag_exceptions = value;
break;
@@ -138,7 +148,7 @@
; On SVR4 targets, it also controls whether or not to emit a
--- a/gcc/opts.c
+++ b/gcc/opts.c
-@@ -891,8 +891,6 @@
+@@ -896,8 +896,6 @@
flag_schedule_insns_after_reload = opt2;
#endif
flag_regmove = opt2;
@@ -147,25 +157,24 @@
flag_reorder_blocks = opt2;
flag_reorder_functions = opt2;
flag_tree_vrp = opt2;
-@@ -912,6 +910,9 @@
+@@ -922,6 +919,8 @@
/* -O3 optimizations. */
opt3 = (optimize >= 3);
+ flag_strict_aliasing = opt3;
+ flag_strict_overflow = opt3;
-+ flag_delete_null_pointer_checks = opt3;
flag_predictive_commoning = opt3;
flag_inline_functions = opt3;
flag_unswitch_loops = opt3;
-@@ -1638,6 +1639,17 @@
+@@ -1601,6 +1601,17 @@
enable_warning_as_error (arg, value, lang_mask);
break;
+ case OPT_Werror_maybe_reset:
+ {
-+ char *ev = getenv ("GCC_NO_WERROR");
-+ if ((ev != NULL) && (*ev != '0'))
-+ warnings_are_errors = 0;
++ char *ev = getenv ("GCC_NO_WERROR");
++ if ((ev != NULL) && (*ev != '0'))
++ warnings_are_errors = 0;
+ }
+ break;
+
@@ -173,8 +182,8 @@
+ break;
+
case OPT_Wlarger_than_:
- /* This form corresponds to -Wlarger-than-.
- Kept for backward compatibility.
+ /* This form corresponds to -Wlarger-than-.
+ Kept for backward compatibility.
--- a/gcc/doc/cppopts.texi
+++ b/gcc/doc/cppopts.texi
@@ -164,6 +164,11 @@
@@ -232,15 +241,6 @@
@item -fsplit-wide-types
@opindex fsplit-wide-types
-@@ -5844,7 +5860,7 @@
- @option{-fno-delete-null-pointer-checks} to disable this optimization
- for programs which depend on that behavior.
-
--Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
-+Enabled at levels @option{-O3}.
-
- @item -fexpensive-optimizations
- @opindex fexpensive-optimizations
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -670,6 +670,7 @@