summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2009-08-22 01:12:02 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-04-17 02:09:38 +0200
commit7b7a4be0e1d59b9218b6145331c700ac8199e24e (patch)
tree7cf701ea6f033050755e230bcf3a6b23e1309976 /package
parent65e209ca07416bc040fe98d16b60b6cb4304987f (diff)
downloadbuildroot-novena-7b7a4be0e1d59b9218b6145331c700ac8199e24e.tar.gz
buildroot-novena-7b7a4be0e1d59b9218b6145331c700ac8199e24e.zip
external toolchains: take into account architecture variant
Until now, many TARGET_CFLAGS where missing when using an external toolchain, due to how package/Makefile.in was written. Now, a lot more definitions are common between the Buildroot toolchain case and the external toolchain case. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rw-r--r--package/Makefile.in22
1 files changed, 11 insertions, 11 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 983caf38e..3dfc712da 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -34,16 +34,7 @@ ifeq ($(BR2_DEBUG_3),y)
TARGET_DEBUGGING=-g3
endif
-
-#########################################################################
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT),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
-ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
-TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)
-TARGET_LDFLAGS+= $(BR2_SYSROOT)
-endif
+TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
@@ -86,11 +77,20 @@ ifeq ($(BR2_LARGEFILE),y)
TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
endif
+
+#########################################################################
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
+TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
+TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
+ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
+TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)
+TARGET_LDFLAGS+= $(BR2_SYSROOT)
+endif
#########################################################################
else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) --sysroot $(STAGING_DIR)/
+TARGET_CFLAGS+=--sysroot $(STAGING_DIR)/
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
TARGET_LDFLAGS=--sysroot $(STAGING_DIR)/
endif