diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-09-28 20:10:22 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-09-28 20:10:22 +0000 |
commit | 5f97580e507e9f8d9873f5bc4a40a02dee05cd3d (patch) | |
tree | ae4b659cb92d4c97e67c31da625761b278c92468 | |
parent | 0ba7c9c383afef6413029a884bac02a66e2c7da3 (diff) |
- add FC, remove some duplicate entries, cleanup
- fixup after Ulf: CXX doesn't take CFLAGS but CXXFLAGS
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | package/Makefile.in | 27 | ||||
-rw-r--r-- | toolchain/Makefile.in | 3 |
3 files changed, 29 insertions, 13 deletions
@@ -91,6 +91,9 @@ endif ifndef HOSTCXX HOSTCXX:=g++ endif +ifndef HOSTFC +HOSTFC:=gfortran +endif ifndef HOSTCPP HOSTCPP:=cpp endif @@ -107,6 +110,7 @@ HOSTAR:=$(shell $(CONFIG_SHELL) -c "which $(HOSTAR)" || type -p $(HOSTAR) || ech HOSTAS:=$(shell $(CONFIG_SHELL) -c "which $(HOSTAS)" || type -p $(HOSTAS) || echo as) HOSTCC:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCC)" || type -p $(HOSTCC) || echo gcc) HOSTCXX:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCXX)" || type -p $(HOSTCXX) || echo g++) +HOSTFC:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran) HOSTCPP:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCPP)" || type -p $(HOSTCPP) || echo cpp) HOSTLD:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo ld) HOSTLN:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLN)" || type -p $(HOSTLN) || echo ln) @@ -114,7 +118,13 @@ HOSTNM:=$(shell $(CONFIG_SHELL) -c "which $(HOSTNM)" || type -p $(HOSTNM) || ech ifndef CFLAGS_FOR_BUILD CFLAGS_FOR_BUILD:=-g -O2 endif -export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD +ifndef CXXFLAGS_FOR_BUILD +CXXFLAGS_FOR_BUILD:=-g -O2 +endif +ifndef FCFLAGS_FOR_BUILD +FCFLAGS_FOR_BUILD:=-g -O2 +endif +export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) diff --git a/package/Makefile.in b/package/Makefile.in index 8b16e4867..360685d73 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -10,14 +10,14 @@ MAKE1:=$(HOSTMAKE) MAKE="$(firstword $(HOSTMAKE)) -j1" MAKE:=$(HOSTMAKE) -j$(BR2_JLEVEL) +######################################################################### ifeq ($(BR2_TOOLCHAIN_SOURCE),y) TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib - +TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib ifeq ($(BR2_TOOLCHAIN_SYSROOT),y) TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT) -#TARGET_LDFLAGS=-Wl,$(BR2_SYSROOT) +TARGET_LDFLAGS+= $(BR2_SYSROOT) endif CC_TARGET_TUNE_:=$(strip $(subst ",,$(BR2_GCC_TARGET_TUNE))) @@ -87,10 +87,13 @@ GNU_TARGET_NAME=$(TOOLCHAIN_EXTERNAL_PREFIX) KERNEL_CROSS=$(TOOLCHAIN_EXTERNAL_PATH)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)- TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_PATH)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)- endif +TARGET_AR=$(TARGET_CROSS)ar +TARGET_AS=$(TARGET_CROSS)as TARGET_CC=$(TARGET_CROSS)gcc TARGET_CXX=$(TARGET_CROSS)g++ -TARGET_AR=$(TARGET_CROSS)ar +TARGET_LD=$(TARGET_CROSS)ld TARGET_RANLIB=$(TARGET_CROSS)ranlib +TARGET_OBJCOPY=$(TARGET_CROSS)objcopy TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig INSTALL=/usr/bin/install ifeq ($(BR2_STRIP_strip),y) @@ -134,26 +137,28 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ NM=$(TARGET_CROSS)nm \ CC="$(TARGET_CROSS)gcc $(TARGET_CFLAGS)" \ GCC="$(TARGET_CROSS)gcc $(TARGET_CFLAGS)" \ - CXX="$(TARGET_CROSS)g++ $(TARGET_CFLAGS)" \ CPP="$(TARGET_CROSS)cpp $(TARGET_CFLAGS)" \ + CXX="$(TARGET_CROSS)g++ $(TARGET_CXXFLAGS)" \ + FC="$(TARGET_CROSS)gfortran $(TARGET_FCFLAGS)" \ + RANLIB=$(TARGET_CROSS)ranlib \ + STRIP=$(TARGET_CROSS)strip \ + OBJCOPY=$(TARGET_CROSS)objcopy \ AR_FOR_BUILD="$(HOSTAR)" \ AS_FOR_BUILD="$(HOSTAS)" \ CC_FOR_BUILD="$(HOSTCC)" \ GCC_FOR_BUILD="$(HOSTCC)" \ CXX_FOR_BUILD="$(HOSTCXX)" \ + FC_FOR_BUILD="$(HOSTFC)" \ LD_FOR_BUILD="$(HOSTLD)" \ CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ CXXFLAGS_FOR_BUILD="$(HOST_CXXFLAGS)" \ LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ + FCFLAGS_FOR_BUILD="$(HOST_FCFLAGS)" \ AR_FOR_TARGET=$(TARGET_CROSS)ar \ AS_FOR_TARGET=$(TARGET_CROSS)as \ CC_FOR_TARGET=$(TARGET_CROSS)gcc \ LD_FOR_TARGET=$(TARGET_CROSS)ld \ NM_FOR_TARGET=$(TARGET_CROSS)nm \ - RANLIB=$(TARGET_CROSS)ranlib \ - STRIP=$(TARGET_CROSS)strip \ - OBJCOPY=$(TARGET_CROSS)objcopy \ - OBJDUMP=$(TARGET_CROSS)objdump \ DEFAULT_ASSEMBLER=$(TARGET_CROSS)as \ DEFAULT_LINKER=$(TARGET_CROSS)ld \ PKG_CONFIG_SYSROOT="$(STAGING_DIR)" \ @@ -170,7 +175,7 @@ HOST_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ NM="$(HOSTNM)" \ CC="$(HOSTCC) $(HOST_CFLAGS)" \ GCC="$(HOSTCC) $(HOST_CFLAGS)" \ - CXX="$(HOSTCXX)" \ + CXX="$(HOSTCXX) $(HOST_CXXFLAGS)" \ CPP="$(HOSTCPP) $(HOST_CFLAGS)" \ AR_FOR_BUILD="$(HOSTAR)" \ AS_FOR_BUILD="$(HOSTAS)" \ @@ -178,9 +183,11 @@ HOST_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ GCC_FOR_BUILD="$(HOSTCC)" \ CXX_FOR_BUILD="$(HOSTCXX)" \ LD_FOR_BUILD="$(HOSTLD)" \ + FC_FOR_BUILD="$(HOSTFC)" \ CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ CXXFLAGS_FOR_BUILD="$(HOST_CXXFLAGS)" \ LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ + FCFLAGS_FOR_BUILD="$(HOST_FCFLAGS)" \ AR_FOR_TARGET=$(TARGET_CROSS)ar \ AS_FOR_TARGET=$(TARGET_CROSS)as \ CC_FOR_TARGET=$(TARGET_CROSS)gcc \ diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in index a3dff49d4..d312b5642 100644 --- a/toolchain/Makefile.in +++ b/toolchain/Makefile.in @@ -42,8 +42,7 @@ OPTIMIZE_FOR_CPU=$(ARCH) # late binding check to see if the target cc supports -fwhole-program CFLAGS_WHOLE_PROGRAM = $(call cc-option,-fwhole-program,) -# gcc-3.4 would need -combine, I only support 4.2, which correctly uses '--' -CFLAGS_COMBINE = $(call cc-option,--combine,) +CFLAGS_COMBINE = $(call cc-option,-combine,) # gcc has a bunch of needed stuff.... include toolchain/gcc/Makefile.in |