summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-12 02:53:04 +0000
committerSam James <sam@gentoo.org>2022-01-22 22:21:15 +0000
commit553191db3544b3c9960c47283329cb315649dfa3 (patch)
tree8088cf0d96f3619a7a94879757f98699b8d6abdc /eclass/autotools.eclass
parentflag-o-matic.eclass: allow -frecord-command-line (diff)
downloadgentoo-553191db3544b3c9960c47283329cb315649dfa3.tar.gz
gentoo-553191db3544b3c9960c47283329cb315649dfa3.tar.bz2
gentoo-553191db3544b3c9960c47283329cb315649dfa3.zip
autotools.eclass: don't inject -I${SYSROOT} to aclocal
When -I${SYSROOT} is injected, it'll override the default of -Im4, which results in trying to install macros to ${SYSROOT} (a sandbox violation) when they can't be found. From aclocal(1): ``` -I DIR add directory to search list for .m4 files --install copy third-party files to the first -I directory ``` The first directory is normally -Im4 if anything, whereas when injected (when ${SYSROOT} is defined), it ends up being ${SYSROOT}, not m4 (so we try to copy macros to somewhere outside of the build directory). [We could drop this just for > EAPI 7, but I'm not sure there's much point there either. As Chewi observed in bug 677002, you can't assume they'll be present in ${SYSROOT} anyway, and frankly, the cross-compilation (and --root, --sysroot, and so on) situation is rather bleak for earlier EAPIs, which is why we did all that work for 7.] Bug: https://bugs.gentoo.org/710792 Closes: https://bugs.gentoo.org/677002 Closes: https://bugs.gentoo.org/738918 Thanks-to: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/autotools.eclass')
-rw-r--r--eclass/autotools.eclass8
1 files changed, 1 insertions, 7 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 95c92cc6df8c..e2572290f0cb 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: autotools.eclass
@@ -666,12 +666,6 @@ autotools_m4sysdir_include() {
# First try to use the paths the system integrator has set up.
local paths=( $(eval echo ${AT_SYS_M4DIR}) )
- if [[ ${#paths[@]} -eq 0 && -n ${SYSROOT} ]] ; then
- # If they didn't give us anything, then default to the SYSROOT.
- # This helps when cross-compiling.
- local path="${SYSROOT}/usr/share/aclocal"
- [[ -d ${path} ]] && paths+=( "${path}" )
- fi
_autotools_m4dir_include "${paths[@]}"
}