From c111e1f9d381774b3255e6d8ad5ca2cd7f85d70f Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Tue, 3 Sep 2019 10:28:59 +0200 Subject: remove special DESTDIR handling Use the regular /sysroot-cross instead. The toolchain is relocatable. Building it in /opt is not necessary and it is currently broken anyways. Signed-off-by: Michael Olbrich --- .gitignore | 1 - build_all_v2.mk | 3 --- config/Kconfig | 8 ++------ debian/.gitignore | 1 + debian/rules | 15 ++++++++------- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 50a55b2..fdc28bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ logfile p -inst dist selected_ptxconfig diff --git a/build_all_v2.mk b/build_all_v2.mk index dc294b0..756a392 100755 --- a/build_all_v2.mk +++ b/build_all_v2.mk @@ -11,9 +11,6 @@ SHELL := /bin/bash # # config # -PTX_AUTOBUILD_DESTDIR := ${PWD}/inst -export PTX_AUTOBUILD_DESTDIR - BENICE := true PTXDIST := ./p --force diff --git a/config/Kconfig b/config/Kconfig index fa1b460..4e111dd 100644 --- a/config/Kconfig +++ b/config/Kconfig @@ -80,10 +80,6 @@ source "workspace/rules/toolchain.in" menu "misc " -config DESTDIR - string - default "${PTX_AUTOBUILD_DESTDIR}" - config PREFIX string prompt "prefix for installation" @@ -119,7 +115,7 @@ config PREFIX_CROSS config SYSROOT_CROSS string - default "${PTXCONF_DESTDIR}" + default "${PTXDIST_PLATFORMDIR}/sysroot-cross" config PREFIX_TARGET string @@ -128,7 +124,7 @@ config PREFIX_TARGET config SYSROOT_TARGET string - default "${PTXCONF_DESTDIR}${PTXCONF_PREFIX_TARGET}" + default "${PTXCONF_SYSROOT_CROSS}${PTXCONF_PREFIX_TARGET}" config PLATFORM string diff --git a/debian/.gitignore b/debian/.gitignore index 37cdd01..8d72c14 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -8,3 +8,4 @@ /oselas.toolchain-20*-*.substvars /oselas.toolchain-20*/ /ptxdistrc +/excludes diff --git a/debian/rules b/debian/rules index b792bb1..d08735b 100755 --- a/debian/rules +++ b/debian/rules @@ -28,18 +28,19 @@ override_dh_auto_build: debian/ptxdistrc $(PTXDIST_ENV) make -f build_all_v2.mk ARG="-j -q go" PTXDIST="$(PTXDIST)" $(TOOLCHAINS) override_dh_auto_install-arch: - mkdir -p $(CURDIR)/debian/tmp rm -rf $(CURDIR)/debian/tmp/opt - cp -a inst/opt $(CURDIR)/debian/tmp/ + mkdir -p $(CURDIR)/debian/tmp/opt + cp -a platform-*/sysroot-cross/opt/* $(CURDIR)/debian/tmp/opt/ + echo -Xsysroot- > $(CURDIR)/debian/excludes + ls -d $(CURDIR)/debian/tmp/opt/OSELAS.Toolchain-*/*/*/*/lib \ + $(CURDIR)/debian/tmp/opt/OSELAS.Toolchain-*/*/*/lib/gcc/*/* \ + | sed 's;$(CURDIR)/debian/tmp;-X;' >> $(CURDIR)/debian/excludes override_dh_auto_clean: dh_auto_clean - rm -rf gstate platform-* inst/ + rm -rf gstate platform-* -EXCLUDES = \ - -Xsysroot- \ - $(foreach d,$(wildcard inst/opt/OSELAS.Toolchain-*/*/*/*/lib),-X$(subst inst,,$(d))) \ - $(foreach d,$(wildcard inst/opt/OSELAS.Toolchain-*/*/*/lib/gcc/*/*),-X$(subst inst,,$(d))) +EXCLUDES = $(shell cat $(CURDIR)/debian/excludes) # don't change the permissions of target files # the dynamic linker and glibc must remain executable -- cgit v1.2.3