aboutsummaryrefslogtreecommitdiff
path: root/package/Makefile.in
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-06-25 14:28:47 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-07-07 08:14:40 +0200
commitdc67c7f4dc3b3dbd0c71c2917373deab70f75b7a (patch)
tree847b99af08d9dab2e97ee32f00285e94bf6abad8 /package/Makefile.in
parentb07030a708293756e25edd6432ed02cc53ff758e (diff)
downloadbuildroot-dc67c7f4dc3b3dbd0c71c2917373deab70f75b7a.tar.gz
buildroot-dc67c7f4dc3b3dbd0c71c2917373deab70f75b7a.tar.bz2
Rework sysroot option handling
The external toolchain and internal toolchain cases both need to use the --sysroot option, and they have almost identical LDFLAGS/CFLAGS/CXXFLAGS definition, so we can factorize these definitions. Moreover, the --isysroot option is implied by --sysroot so there's no need to specify both. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/Makefile.in')
-rw-r--r--package/Makefile.in16
1 files changed, 3 insertions, 13 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 734af03983..e4aa220886 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -77,23 +77,13 @@ 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)
-TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)
-TARGET_LDFLAGS+= $(BR2_SYSROOT)
+endif
-#########################################################################
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-TARGET_CFLAGS+=--sysroot=$(STAGING_DIR)/
+TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib --sysroot=$(STAGING_DIR)
+TARGET_CFLAGS+=--sysroot=$(STAGING_DIR)
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
-TARGET_LDFLAGS=--sysroot=$(STAGING_DIR)/
-TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
-endif
-#########################################################################
# Compute GNU_TARGET_NAME and REAL_GNU_TARGET_NAME
GNU_TARGET_NAME=$(ARCH)-linux