tUpdate gcc port to work in chroot - mkports - recipes for building multiple softwares with mk(1)
(HTM) git clone git://z3bra.org/mkports
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 21d9c4f3f40dade65f56bde71c96bb29db199a66
(DIR) parent bb996c6324172d28b2286054ef524ccfc2227c5a
(HTM) Author: root <root@doom.z3bra.org>
Date: Tue, 23 May 2017 06:19:19 +0000
Update gcc port to work in chroot
sbase tar cannot extract gcc sources (missing @LongLink) so we need bsdtar here.
We also need a patch to replace "tar" with "bsdtar" in gcc Makefile.
Diffstat:
M gcc/mkfile | 4 +++-
A gcc/patches/0015-posix_tar.diff | 24 ++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/gcc/mkfile b/gcc/mkfile
t@@ -5,6 +5,7 @@ url = ftp://ftp.gnu.org/pub/gnu/gcc/$pkg-$ver/$pkg-$ver.tar.gz
<../default.mk
LD =
+TAR = bsdtar
CONFIGURE = ${CONFIGURE} \
--disable-bootstrap \
t@@ -16,7 +17,8 @@ CONFIGURE = ${CONFIGURE} \
--disable-decimal-float \
--enable-__cxa_atexit \
--enable-threads=posix \
- --enable-languages=c \
+ --enable-languages=c,c++ \
+ --with-native-system-header-dir=/include \
--with-system-zlib \
--with-cpp-install-dir=${PREFIX}/lib
--with-pkgversion="DISTRO-x86_64-static"
(DIR) diff --git a/gcc/patches/0015-posix_tar.diff b/gcc/patches/0015-posix_tar.diff
t@@ -0,0 +1,24 @@
+diff -urN a/gcc/Makefile.in b/gcc/Makefile.in
+--- a/gcc/Makefile.in 2016-04-15 11:49:39.000000000 +0000
++++ b/gcc/Makefile.in 2017-05-22 18:31:49.770190991 +0000
+@@ -3558,9 +3558,9 @@
+ # found in CDPATH, corrupting the output. We could just redirect the
+ # output of `cd', but some shells lose on redirection within `()'s
+ (cd `${PWD_COMMAND}`/include ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
++ bsdtar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; bsdtar xpf - )
+ (cd `${PWD_COMMAND}`/include-fixed ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
++ bsdtar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; bsdtar xpf - )
+ # /bin/sh on some systems returns the status of the first tar,
+ # and that can lose with GNU tar which always writes a full block.
+ # So use `exit 0' to ignore its exit status.
+@@ -3581,7 +3581,7 @@
+ # Targets without dependencies, for use in prev-gcc during bootstrap.
+ real-install-headers-tar:
+ (cd `${PWD_COMMAND}`/include-fixed ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
++ bsdtar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; bsdtar xpf - )
+
+ real-install-headers-cpio:
+ cd `${PWD_COMMAND}`/include-fixed ; \