aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-07-14 18:10:59 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-07-16 16:29:16 +0200
commit9f4db0bd1b34cdcc532d0d2a76972100b55cbbec (patch)
tree7a1aecd67fdf8893f791e6936e96d4d41e0c343e
parentbusybox: Honor toolchain (diff)
downloadgenkernel-9f4db0bd1b34cdcc532d0d2a76972100b55cbbec.tar.gz
genkernel-9f4db0bd1b34cdcc532d0d2a76972100b55cbbec.tar.bz2
genkernel-9f4db0bd1b34cdcc532d0d2a76972100b55cbbec.zip
e2fsprogs: Honor toolchain
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--gkbuilds/e2fsprogs.gkbuild10
-rw-r--r--patches/e2fsprogs/1.45.6/e2fsprogs-1.45.6-build.patch83
2 files changed, 92 insertions, 1 deletions
diff --git a/gkbuilds/e2fsprogs.gkbuild b/gkbuilds/e2fsprogs.gkbuild
index 78c7193..7cebcca 100644
--- a/gkbuilds/e2fsprogs.gkbuild
+++ b/gkbuilds/e2fsprogs.gkbuild
@@ -1,6 +1,10 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# e2fsprogs-1.45.6-build.patch would trigger gkautoreconf
+# which we cannot run because of gettext-0.20 incompatibility
+WANT_AUTORECONF=no
+
src_configure() {
append-ldflags -static
@@ -20,6 +24,10 @@ src_configure() {
--disable-defrag
)
+ ac_cv_path_LDCONFIG=: \
+ CC="$(tc-getCC)" \
+ BUILD_CC="$(tc-getBUILD_CC)" \
+ BUILD_LD="$(tc-getBUILD_LD)" \
gkconf "${myconf[@]}"
}
diff --git a/patches/e2fsprogs/1.45.6/e2fsprogs-1.45.6-build.patch b/patches/e2fsprogs/1.45.6/e2fsprogs-1.45.6-build.patch
new file mode 100644
index 0000000..63e37f5
--- /dev/null
+++ b/patches/e2fsprogs/1.45.6/e2fsprogs-1.45.6-build.patch
@@ -0,0 +1,83 @@
+--- a/MCONFIG.in
++++ b/MCONFIG.in
+@@ -86,6 +86,7 @@ SANITIZER_LDFLAGS = @lto_ldflags@ @ubsan_ldflags@ @addrsan_ldflags@ @threadsan_l
+
+ CC = @CC@
+ BUILD_CC = @BUILD_CC@
++BUILD_CFLAGS = @BUILD_CFLAGS@
+ CFLAGS = @CFLAGS@
+ CFLAGS_SHLIB = @CFLAGS_SHLIB@
+ CFLAGS_STLIB = @CFLAGS_STLIB@
+--- a/configure
++++ b/configure
+@@ -12398,14 +12398,12 @@ $as_echo "$as_me: WARNING:
+ esac
+ fi
+
+-
+-# See if we need a separate native compiler.
+-if test $cross_compiling = no; then
+- BUILD_CC="$CC"
+-
+-else
+- for ac_prog in gcc cc
+-do
++if test "${BUILD_CC+set}" != "set"; then
++ if test $cross_compiling = no; then
++ BUILD_CC="$CC"
++ else
++ for ac_prog in gcc cc
++ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+@@ -12446,6 +12444,16 @@ fi
+ test -n "$BUILD_CC" && break
+ done
+
++ fi
++fi
++
++if test "${BUILD_CFLAGS+set}" != "set"; then
++ if test $cross_compiling = no; then
++ BUILD_CFLAGS="$CFLAGS"
++ else
++ BUILD_CFLAGS="-g -O2"
++ fi
++
+ fi
+ for ac_header in dirent.h errno.h execinfo.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h attr/xattr.h linux/falloc.h linux/fd.h linux/fsmap.h linux/major.h linux/loop.h linux/types.h net/if_dl.h netinet/in.h sys/acl.h sys/disklabel.h sys/disk.h sys/file.h sys/ioctl.h sys/key.h sys/mkdev.h sys/mman.h sys/mount.h sys/prctl.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysctl.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h sys/xattr.h
+ do :
+--- a/configure.ac
++++ b/configure.ac
+@@ -910,13 +910,24 @@ else
+ fi
+ AC_SUBST(MAKEINFO)
+ AC_PROG_INSTALL
+-# See if we need a separate native compiler.
+-if test $cross_compiling = no; then
+- BUILD_CC="$CC"
+- AC_SUBST(BUILD_CC)
+-else
+- AC_CHECK_PROGS(BUILD_CC, gcc cc)
++
++AC_ARG_VAR(BUILD_CC, [C compiler for build tools])
++if test "${BUILD_CC+set}" != "set"; then
++ if test $cross_compiling = no; then
++ BUILD_CC="$CC"
++ else
++ AC_CHECK_PROGS(BUILD_CC, gcc cc)
++ fi
++fi
++AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools])
++if test "${BUILD_CFLAGS+set}" != "set"; then
++ if test $cross_compiling = no; then
++ BUILD_CFLAGS="$CFLAGS"
++ else
++ BUILD_CFLAGS="-g -O2"
++ fi
+ fi
++
+ AC_CHECK_HEADERS(m4_flatten([
+ dirent.h
+ errno.h