summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2010-12-28 16:10:27 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2010-12-28 22:38:47 +0100
commit87b81bb56f45f3bb903c085f0745775e140e2154 (patch)
tree17585c55294c58ef9d9d4a8d2b63da2f3bc5ee34 /package
parentf78b344ea82f6f45547788652c4352ba2a623cbb (diff)
downloadbuildroot-novena-87b81bb56f45f3bb903c085f0745775e140e2154.tar.gz
buildroot-novena-87b81bb56f45f3bb903c085f0745775e140e2154.zip
toolchain: move sysroot to host dir
* Drop the BR2_STAGING_DIR option * Hardcode STAGING_DIR to $(HOST_DIR)/usr/TUPLE/sysroot Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
-rw-r--r--package/Makefile.in54
1 files changed, 28 insertions, 26 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 3fa98feba..9765a1a2e 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -9,6 +9,34 @@ HOSTMAKE :=$(shell which $(HOSTMAKE) || type -p $(HOSTMAKE) || echo make)
MAKE1:=$(HOSTMAKE) -j1
MAKE:=$(HOSTMAKE) -j$(BR2_JLEVEL)
+# Compute GNU_TARGET_NAME and REAL_GNU_TARGET_NAME
+GNU_TARGET_NAME=$(ARCH)-linux
+
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
+LIBC=uclibc
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
+LIBC=uclibc
+else
+LIBC=gnu
+endif
+
+# The ABI suffix is a bit special on ARM, as it needs to be
+# -uclibcgnueabi for uClibc EABI, -uclibc for uClibc OABI, -gnueabi
+# for glibc EABI and -gnu for glibc OABI. This means that the LIBC and
+# ABI aren't strictly orthogonal, which explains why we need the test
+# on LIBC below.
+ifeq ($(BR2_ARM_EABI),y)
+ifeq ($(LIBC),uclibc)
+ABI=gnueabi
+else
+ABI=eabi
+endif
+endif
+
+REAL_GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)
+
+STAGING_DIR=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sysroot
+
ifeq ($(BR2_OPTIMIZE_0),y)
TARGET_OPTIMIZATION+=-O0
endif
@@ -85,32 +113,6 @@ TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
TARGET_SYSROOT_OPT=--sysroot=$(STAGING_DIR)
-# Compute GNU_TARGET_NAME and REAL_GNU_TARGET_NAME
-GNU_TARGET_NAME=$(ARCH)-linux
-
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-LIBC=uclibc
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
-LIBC=uclibc
-else
-LIBC=gnu
-endif
-
-# The ABI suffix is a bit special on ARM, as it needs to be
-# -uclibcgnueabi for uClibc EABI, -uclibc for uClibc OABI, -gnueabi
-# for glibc EABI and -gnu for glibc OABI. This means that the LIBC and
-# ABI aren't strictly orthogonal, which explains why we need the test
-# on LIBC below.
-ifeq ($(BR2_ARM_EABI),y)
-ifeq ($(LIBC),uclibc)
-ABI=gnueabi
-else
-ABI=eabi
-endif
-endif
-
-REAL_GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)
-
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
TARGET_CROSS=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-
else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)