summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2015-12-15 07:22:38 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-06-22 07:53:35 +0200
commit334aa735636936f0180070eb390a7350f0614d0c (patch)
tree36bfee87509aa6c14ce0d8ef9db73492e502b9f1
parentedba7b6760906671e76b71beb6ca4be11f34769d (diff)
downloadOSELAS.Toolchain-334aa735636936f0180070eb390a7350f0614d0c.tar.gz
cleanup sysroot/destdir handling
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--Kconfig18
-rw-r--r--rules/cross-binutils.make4
-rw-r--r--rules/cross-elf2flt.make4
-rw-r--r--rules/cross-gcc.make6
-rw-r--r--rules/cross-gdb.make4
-rw-r--r--rules/pre/toolchain.make2
-rw-r--r--rules/toolchain.in2
7 files changed, 35 insertions, 5 deletions
diff --git a/Kconfig b/Kconfig
index b6bc4c3..cc7852a 100644
--- a/Kconfig
+++ b/Kconfig
@@ -89,6 +89,10 @@ source "workspace/rules/toolchain.in"
menu "misc "
+config DESTDIR
+ string
+ default "${PTX_AUTOBUILD_DESTDIR}"
+
config PREFIX
string
prompt "prefix for installation"
@@ -118,14 +122,22 @@ config SYSROOT_HOST
string
default "${PTXDIST_PLATFORMDIR}/sysroot-host"
+config PREFIX_CROSS
+ string
+ default "${PTXCONF_PREFIX}/${PTXCONF_PROJECT}/${PTXCONF_GNU_TARGET}/${PTXCONF_PREFIX_TCID}"
+
config SYSROOT_CROSS
string
- default "${PTX_AUTOBUILD_DESTDIR}${PTXCONF_PREFIX}/${PTXCONF_PROJECT}/${PTXCONF_GNU_TARGET}/${PTXCONF_PREFIX_TCID}"
+ default "${PTXCONF_DESTDIR}${PTXCONF_PREFIX_CROSS}"
+
+config PREFIX_TARGET
+ string
+ default "${PTXCONF_PREFIX_CROSS}/sysroot-${PTXCONF_GNU_TARGET}" if TOOLCHAIN_ENABLE_SYSROOT
+ default "${PTXCONF_PREFIX_CROSS}" if TOOLCHAIN_DISABLE_SYSROOT
config SYSROOT_TARGET
string
- default "${PTXCONF_SYSROOT_CROSS}/sysroot-${PTXCONF_GNU_TARGET}" if TOOLCHAIN_ENABLE_SYSROOT
- default "${PTXCONF_SYSROOT_CROSS}" if TOOLCHAIN_DISABLE_SYSROOT
+ default "${PTXCONF_DESTDIR}${PTXCONF_PREFIX_TARGET}"
config PLATFORM
string
diff --git a/rules/cross-binutils.make b/rules/cross-binutils.make
index bd90dd7..3453592 100644
--- a/rules/cross-binutils.make
+++ b/rules/cross-binutils.make
@@ -57,6 +57,10 @@ CROSS_BINUTILS_CONF_OPT := \
# Install
# ----------------------------------------------------------------------------
+CROSS_BINUTILS_INSTALL_OPT := \
+ DESTDIR=$(PTXCONF_DESTDIR) \
+ install
+
$(STATEDIR)/cross-binutils.install:
@$(call targetinfo)
@$(call world/install, CROSS_BINUTILS)
diff --git a/rules/cross-elf2flt.make b/rules/cross-elf2flt.make
index 600dd95..d876f82 100644
--- a/rules/cross-elf2flt.make
+++ b/rules/cross-elf2flt.make
@@ -44,4 +44,8 @@ CROSS_ELF2FLT_CONF_OPT := \
--with-binutils-build-dir=$(CROSS_BINUTILS_BUILDDIR) \
--with-libbfd="$(CROSS_BINUTILS_BUILDDIR)/bfd/libbfd.a -lz -ldl"
+CROSS_ELF2FLT_INSTALL_OPT := \
+ prefix=$(PTXCONF_SYSROOT_CROSS) \
+ install
+
# vim: syntax=make
diff --git a/rules/cross-gcc.make b/rules/cross-gcc.make
index 682aa16..9cb6b01 100644
--- a/rules/cross-gcc.make
+++ b/rules/cross-gcc.make
@@ -137,6 +137,10 @@ CROSS_GCC_CONF_OPT := \
# Install
# ----------------------------------------------------------------------------
+CROSS_GCC_INSTALL_OPT := \
+ DESTDIR=$(PTXCONF_DESTDIR) \
+ install
+
$(STATEDIR)/cross-gcc.install: $(STATEDIR)/cross-gcc.report
@$(call targetinfo)
@$(call world/install, CROSS_GCC)
@@ -172,6 +176,8 @@ $(STATEDIR)/cross-gcc.install: $(STATEDIR)/cross-gcc.report
done
@find $(PTXCONF_SYSROOT_CROSS) -name "*.la" -print0 | xargs -0 rm -v -f
+ sed -i -e 's;$(call remove_quotes,$(PTXCONF_DESTDIR));;' \
+ $(PTXCONF_SYSROOT_CROSS)/lib/gcc/$(PTXCONF_GNU_TARGET)/$(CROSS_GCC_VERSION)/install-tools/mkheaders.conf
@$(call touch)
diff --git a/rules/cross-gdb.make b/rules/cross-gdb.make
index 7d5c394..d2df734 100644
--- a/rules/cross-gdb.make
+++ b/rules/cross-gdb.make
@@ -52,4 +52,8 @@ ifeq ($(CROSS_GDB_WITHOUT_PYTHON),y)
CROSS_GDB_CONF_OPT += --without-python
endif
+CROSS_GDB_INSTALL_OPT := \
+ DESTDIR=$(PTXCONF_DESTDIR) \
+ install
+
# vim: syntax=make
diff --git a/rules/pre/toolchain.make b/rules/pre/toolchain.make
index de0702d..1b4f3f4 100644
--- a/rules/pre/toolchain.make
+++ b/rules/pre/toolchain.make
@@ -29,7 +29,7 @@ PTX_HOST_CROSS_AUTOCONF_BUILD := --build=$(GNU_HOST)
PTX_HOST_CROSS_AUTOCONF_TARGET := --target=$(PTX_TOUPLE_TARGET)
PTX_HOST_AUTOCONF_PREFIX := --prefix=$(PTXCONF_SYSROOT_HOST)
-PTX_HOST_CROSS_AUTOCONF_PREFIX := --prefix=$(PTXCONF_SYSROOT_CROSS)
+PTX_HOST_CROSS_AUTOCONF_PREFIX := --prefix=$(PTXCONF_PREFIX_CROSS)
PTX_HOST_AUTOCONF := \
$(PTX_HOST_AUTOCONF_HOST) \
diff --git a/rules/toolchain.in b/rules/toolchain.in
index 6d2c68c..c1c4d59 100644
--- a/rules/toolchain.in
+++ b/rules/toolchain.in
@@ -10,7 +10,7 @@ config TOOLCHAIN_DISABLE_SYSROOT
config TOOLCHAIN_CONFIG_SYSROOT
string
- default "--with-sysroot=${SYSROOT}" if TOOLCHAIN_ENABLE_SYSROOT
+ default "--with-build-sysroot=${SYSROOT} --with-sysroot=${PTXCONF_PREFIX_TARGET}" if TOOLCHAIN_ENABLE_SYSROOT
#