fix graphite options with gcc-4.5, add libelf for LTO, fix mbsd_multi patch, patch from Bernhard Loos
SVN-Revision: 21046
This commit is contained in:
parent
d2af27b13d
commit
8ca51dc6f1
6 changed files with 92 additions and 34 deletions
|
@ -49,12 +49,9 @@ BINUTILS_CONFIGURE:= \
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
--disable-werror \
|
--disable-werror \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
$(if $(CONFIG_GCC_VERSION_4_4), \
|
$(GRAPHITE_CONFIGURE) \
|
||||||
--with-ppl=$(REAL_STAGING_DIR_HOST) \
|
|
||||||
--with-cloog=$(REAL_STAGING_DIR_HOST) \
|
|
||||||
) \
|
|
||||||
$(SOFT_FLOAT_CONFIG_OPTION) \
|
$(SOFT_FLOAT_CONFIG_OPTION) \
|
||||||
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) \
|
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS))
|
||||||
|
|
||||||
ifneq ($(CONFIG_SSP_SUPPORT),)
|
ifneq ($(CONFIG_SSP_SUPPORT),)
|
||||||
BINUTILS_CONFIGURE+= \
|
BINUTILS_CONFIGURE+= \
|
||||||
|
|
|
@ -67,7 +67,13 @@ endchoice
|
||||||
config GCC_USE_GRAPHITE
|
config GCC_USE_GRAPHITE
|
||||||
bool
|
bool
|
||||||
prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS
|
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
|
config EXTRA_GCC_CONFIG_OPTIONS
|
||||||
string
|
string
|
||||||
|
|
|
@ -96,6 +96,7 @@ GCC_CONFIGURE:= \
|
||||||
--disable-libmudflap \
|
--disable-libmudflap \
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
|
$(GRAPHITE_CONFIGURE) \
|
||||||
$(if $(CONFIG_GCC_USE_GRAPHITE),--with-host-libstdcxx=-lstdc++) \
|
$(if $(CONFIG_GCC_USE_GRAPHITE),--with-host-libstdcxx=-lstdc++) \
|
||||||
$(SOFT_FLOAT_CONFIG_OPTION) \
|
$(SOFT_FLOAT_CONFIG_OPTION) \
|
||||||
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
|
$(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_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)
|
$(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_BUILD_TARGET_LIBGCC:=y
|
||||||
GCC_CONFIGURE+= \
|
GCC_CONFIGURE+= \
|
||||||
--with-gmp=$(TOPDIR)/staging_dir/host \
|
--with-gmp=$(TOPDIR)/staging_dir/host \
|
||||||
|
@ -164,7 +165,13 @@ GCC_CONFIGURE_STAGE2:= \
|
||||||
--enable-languages=$(TARGET_LANGUAGES) \
|
--enable-languages=$(TARGET_LANGUAGES) \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--enable-threads \
|
--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),)
|
ifneq ($(CONFIG_TLS_SUPPORT),)
|
||||||
GCC_CONFIGURE_STAGE2+= \
|
GCC_CONFIGURE_STAGE2+= \
|
||||||
|
@ -225,7 +232,7 @@ define Stage1/Install
|
||||||
$(GCC_MAKE) -C $(HOST_BUILD_DIR1) \
|
$(GCC_MAKE) -C $(HOST_BUILD_DIR1) \
|
||||||
install-gcc \
|
install-gcc \
|
||||||
$(if $(GCC_BUILD_TARGET_LIBGCC),install-target-libgcc)
|
$(if $(GCC_BUILD_TARGET_LIBGCC),install-target-libgcc)
|
||||||
|
|
||||||
# XXX: glibc insists on linking against libgcc_eh
|
# XXX: glibc insists on linking against libgcc_eh
|
||||||
( cd $(TOOLCHAIN_DIR)/usr/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \
|
( cd $(TOOLCHAIN_DIR)/usr/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \
|
||||||
[ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \
|
[ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \
|
||||||
|
|
|
@ -29,6 +29,16 @@
|
||||||
static void set_Wimplicit (int);
|
static void set_Wimplicit (int);
|
||||||
static void handle_OPT_d (const char *);
|
static void handle_OPT_d (const char *);
|
||||||
static void set_std_cxx98 (int);
|
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 @@
|
@@ -690,6 +701,12 @@
|
||||||
flag_exceptions = value;
|
flag_exceptions = value;
|
||||||
break;
|
break;
|
||||||
|
@ -138,7 +148,7 @@
|
||||||
; On SVR4 targets, it also controls whether or not to emit a
|
; On SVR4 targets, it also controls whether or not to emit a
|
||||||
--- a/gcc/opts.c
|
--- a/gcc/opts.c
|
||||||
+++ b/gcc/opts.c
|
+++ b/gcc/opts.c
|
||||||
@@ -891,8 +891,6 @@
|
@@ -896,8 +896,6 @@
|
||||||
flag_schedule_insns_after_reload = opt2;
|
flag_schedule_insns_after_reload = opt2;
|
||||||
#endif
|
#endif
|
||||||
flag_regmove = opt2;
|
flag_regmove = opt2;
|
||||||
|
@ -147,25 +157,24 @@
|
||||||
flag_reorder_blocks = opt2;
|
flag_reorder_blocks = opt2;
|
||||||
flag_reorder_functions = opt2;
|
flag_reorder_functions = opt2;
|
||||||
flag_tree_vrp = opt2;
|
flag_tree_vrp = opt2;
|
||||||
@@ -912,6 +910,9 @@
|
@@ -922,6 +919,8 @@
|
||||||
|
|
||||||
/* -O3 optimizations. */
|
/* -O3 optimizations. */
|
||||||
opt3 = (optimize >= 3);
|
opt3 = (optimize >= 3);
|
||||||
+ flag_strict_aliasing = opt3;
|
+ flag_strict_aliasing = opt3;
|
||||||
+ flag_strict_overflow = opt3;
|
+ flag_strict_overflow = opt3;
|
||||||
+ flag_delete_null_pointer_checks = opt3;
|
|
||||||
flag_predictive_commoning = opt3;
|
flag_predictive_commoning = opt3;
|
||||||
flag_inline_functions = opt3;
|
flag_inline_functions = opt3;
|
||||||
flag_unswitch_loops = opt3;
|
flag_unswitch_loops = opt3;
|
||||||
@@ -1638,6 +1639,17 @@
|
@@ -1601,6 +1601,17 @@
|
||||||
enable_warning_as_error (arg, value, lang_mask);
|
enable_warning_as_error (arg, value, lang_mask);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
+ case OPT_Werror_maybe_reset:
|
+ case OPT_Werror_maybe_reset:
|
||||||
+ {
|
+ {
|
||||||
+ char *ev = getenv ("GCC_NO_WERROR");
|
+ char *ev = getenv ("GCC_NO_WERROR");
|
||||||
+ if ((ev != NULL) && (*ev != '0'))
|
+ if ((ev != NULL) && (*ev != '0'))
|
||||||
+ warnings_are_errors = 0;
|
+ warnings_are_errors = 0;
|
||||||
+ }
|
+ }
|
||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
|
@ -173,8 +182,8 @@
|
||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
case OPT_Wlarger_than_:
|
case OPT_Wlarger_than_:
|
||||||
/* This form corresponds to -Wlarger-than-.
|
/* This form corresponds to -Wlarger-than-.
|
||||||
Kept for backward compatibility.
|
Kept for backward compatibility.
|
||||||
--- a/gcc/doc/cppopts.texi
|
--- a/gcc/doc/cppopts.texi
|
||||||
+++ b/gcc/doc/cppopts.texi
|
+++ b/gcc/doc/cppopts.texi
|
||||||
@@ -164,6 +164,11 @@
|
@@ -164,6 +164,11 @@
|
||||||
|
@ -232,15 +241,6 @@
|
||||||
|
|
||||||
@item -fsplit-wide-types
|
@item -fsplit-wide-types
|
||||||
@opindex 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
|
--- a/gcc/java/jvspec.c
|
||||||
+++ b/gcc/java/jvspec.c
|
+++ b/gcc/java/jvspec.c
|
||||||
@@ -670,6 +670,7 @@
|
@@ -670,6 +670,7 @@
|
||||||
|
|
|
@ -11,11 +11,8 @@ curdir:=tools
|
||||||
# subdirectories to descend into
|
# subdirectories to descend into
|
||||||
tools-y :=
|
tools-y :=
|
||||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||||
ifeq ($(CONFIG_GCC_VERSION_4_5),y)
|
tools-$(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4)$(CONFIG_GCC_VERSION_4_5) += gmp mpfr
|
||||||
tools-$(CONFIG_GCC_VERSION_4_5) += gmp mpfr mpc
|
tools-$(CONFIG_GCC_VERSION_4_5) += mpc libelf
|
||||||
else
|
|
||||||
tools-$(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4) += gmp mpfr
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
tools-y += m4 autoconf automake bison pkg-config sed mklibs
|
tools-y += m4 autoconf automake bison pkg-config sed mklibs
|
||||||
tools-y += sstrip ipkg-utils genext2fs libuuid mtd-utils mkimage
|
tools-y += sstrip ipkg-utils genext2fs libuuid mtd-utils mkimage
|
||||||
|
@ -32,8 +29,10 @@ endif
|
||||||
tools-$(CONFIG_CCACHE) += ccache
|
tools-$(CONFIG_CCACHE) += ccache
|
||||||
|
|
||||||
ifdef CONFIG_GCC_USE_GRAPHITE
|
ifdef CONFIG_GCC_USE_GRAPHITE
|
||||||
tools-y += ppl cloog
|
ifeq ($(CONFIG_GCC_USE_SYSTEM_PPL_CLOOG),)
|
||||||
$(curdir)/cloog/compile := $(curdir)/ppl/install
|
tools-y += ppl cloog
|
||||||
|
$(curdir)/cloog/compile := $(curdir)/ppl/install
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# builddir dependencies
|
# builddir dependencies
|
||||||
|
|
49
tools/libelf/Makefile
Normal file
49
tools/libelf/Makefile
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2010 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=libelf
|
||||||
|
PKG_VERSION:=0.8.13
|
||||||
|
PKG_MD5SUM:=4136d7b4c04df68b686570afa26988ac
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://www.mr511.de/software/
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
|
|
||||||
|
HOST_CONFIGURE_ARGS += \
|
||||||
|
--disable-shared \
|
||||||
|
--enable-elf64
|
||||||
|
|
||||||
|
define Host/Configure
|
||||||
|
(cd $(HOST_BUILD_DIR)/$(3); \
|
||||||
|
$(HOST_CONFIGURE_CMD) \
|
||||||
|
$(HOST_CONFIGURE_ARGS); \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Host/Compile
|
||||||
|
$(MAKE) -C $(HOST_BUILD_DIR)/lib/ libelf.a
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Host/Install
|
||||||
|
$(INSTALL_DIR) $(STAGING_DIR_HOST)/{lib,include/libelf}
|
||||||
|
$(CP) $(HOST_BUILD_DIR)/lib/{elf_repl.h,gelf.h,libelf.h,nlist.h,sys_elf.h} \
|
||||||
|
$(STAGING_DIR_HOST)/include/libelf/
|
||||||
|
$(CP) $(HOST_BUILD_DIR)/lib/libelf.a $(STAGING_DIR_HOST)/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Host/Clean
|
||||||
|
rm -rf $(STAGING_DIR_HOST)/include/libelf
|
||||||
|
rm -f $(STAGING_DIR_HOST)/lib/libelf.a
|
||||||
|
$(call Host/Clean/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call HostBuild))
|
Loading…
Reference in a new issue