Commit 93ab6d30 authored by Bernhard Reutner-Fischer's avatar Bernhard Reutner-Fischer
Browse files

- add an experimental BR2_PREFER_IMA.

  Currently disfunctional for gcc-4.2 due to PR30620 and possibly others
parent f27735d6
Loading
Loading
Loading
Loading
+57 −32
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ choice
	prompt "Target Architecture"
	default BR2_i386
	help
	  Stuff
	  Select the target architecture family to build for.

config BR2_alpha
	bool "alpha"
@@ -52,6 +52,9 @@ choice
	prompt "Target Architecture Variant"
	depends BR2_arm || BR2_armeb
	default BR2_generic_arm
	help
	  Specific CPU variant to use

config BR2_generic_arm
	bool "generic_arm"
config BR2_arm610
@@ -97,6 +100,9 @@ choice
	prompt "Target ABI"
	depends BR2_arm || BR2_armeb
	default BR2_ARM_OABI
	help
	  Application Binary Interface to use

config BR2_ARM_OABI
	bool "OABI"
config BR2_ARM_EABI
@@ -107,6 +113,9 @@ choice
	prompt "Target Architecture Variant"
	depends BR2_sh
	default BR2_sh4
	help
	  Specific CPU variant to use

config BR2_sh2a_nofpueb
	bool "sh2a_nofpueb"
config BR2_sh2eb
@@ -129,6 +138,9 @@ choice
	prompt "Target Architecture Variant"
	depends BR2_i386
	default BR2_x86_i686
	help
	  Specific CPU variant to use

config BR2_x86_i386
	bool "i386"
config BR2_x86_i486
@@ -296,6 +308,19 @@ config BR2_JLEVEL
	help
	  Number of jobs to run simultaneously

config BR2_PREFER_IMA
	bool "prefer IMA compiles"
	default n
	help
	  Where possible, compile package with Inter Module Analysis.
	  This potentially uses alot of system resources on your compile
	  host with the benefit of creating smaller binaries for the target.

	  If unsure, say No.

	  WARNING: This is highly experimental at the moment.


endmenu

source "toolchain/Config.in"
+8 −0
Original line number Diff line number Diff line
@@ -96,6 +96,14 @@ $(BUSYBOX_DIR)/busybox: $(BUSYBOX_DIR)/.configured
		CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \
		ARCH=$(KERNEL_ARCH) \
		EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(BUSYBOX_DIR)
ifeq ($(BR2_PREFER_IMA)$(BR2_PACKAGE_BUSYBOX_SNAPSHOT),yy)
	rm -f $@
	$(MAKE) CC=$(TARGET_CC) CROSS_COMPILE="$(TARGET_CROSS)" \
		CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \
		ARCH=$(KERNEL_ARCH) STRIP="$(STRIP)" \
		EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(BUSYBOX_DIR) \
		-f scripts/Makefile.IMA
endif

$(TARGET_DIR)/bin/busybox: $(BUSYBOX_DIR)/busybox
ifeq ($(BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS),y)
+8 −0
Original line number Diff line number Diff line
@@ -5,3 +5,11 @@ config BR2_PACKAGE_GCC_TARGET
	help
	  If you want the target system to be able to run 
	  binutils/gcc and compile native code, say Y here.

config BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS
	string "Additional target gcc options"
	default ""
	help
	  Any additional target gcc options you may want to include....
	  Including, but not limited to --disable-checking etc.
	  Refer to */configure in your gcc sources.
+14 −0
Original line number Diff line number Diff line
@@ -55,5 +55,19 @@ TARGET_GCC_FLAGS= CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
	BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)"

ifeq ($(strip $(BR2_PACKAGE_GCC_TARGET)),y)
# pull in config opts from the user
EXTRA_TARGET_GCC_CONFIG_OPTIONS:=$(strip $(subst ",, $(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS)))
#"))

ifeq ($(BR2_PREFER_IMA),y)
# >= 4.2
ifeq ($(findstring 4.2,$(GCC_VERSION)),4.2)
EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--enable-intermodule
endif
ifeq ($(findstring 4.3,$(GCC_VERSION)),4.3)
EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--enable-intermodule
endif
endif # BR2_PREFER_IMA=y

TARGETS+=gcc_target
endif