summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2021-02-20 21:57:22 +0000
committerBertrand Jacquin <bertrand@jacquin.bzh>2021-02-20 21:58:30 +0000
commit10afc14b52dcf30f7cddeed8f2388f9202835b28 (patch)
treec475bab880cad155b31dd8351fdb8a001efea215 /eclass
parenteclass/linux-build: drop RDEPEND (diff)
downloadportage-10afc14b52dcf30f7cddeed8f2388f9202835b28.tar.xz
eclass/linux-build: ignore non matching lines in diff output
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-build.eclass26
1 files changed, 18 insertions, 8 deletions
diff --git a/eclass/linux-build.eclass b/eclass/linux-build.eclass
index fb19a8b1..b6dff6fc 100644
--- a/eclass/linux-build.eclass
+++ b/eclass/linux-build.eclass
@@ -448,16 +448,26 @@ _linux-build_src_prepare_build() {
emake olddefconfig "${myopt[@]}"
fi
- if ! diff -q \
- --ignore-matching-lines '^$' \
- --ignore-matching-lines '^#' \
- --ignore-matching-lines '^CONFIG_PLUGIN_HOSTCC=' \
- --ignore-matching-lines '^CONFIG_GCC_VERSION=' \
- --ignore-matching-lines '^CONFIG_CLANG_VERSION=' \
- "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" ; then
+ local -a _diff_opts=(
+ # Empty lines and comments
+ --ignore-matching-lines '^$'
+ --ignore-matching-lines '^#'
+
+ # GCC vs Clang
+ --ignore-matching-lines '^CONFIG_CC_IS_GCC='
+ --ignore-matching-lines '^CONFIG_CC_IS_CLANG='
+ --ignore-matching-lines '^CONFIG_GCC_VERSION='
+ --ignore-matching-lines '^CONFIG_CLANG_VERSION='
+ --ignore-matching-lines '^CONFIG_PLUGIN_HOSTCC='
+ --ignore-matching-lines '^CONFIG_CC_HAS_'
+
+ # GCC only
+ --ignore-matching-lines '^CONFIG_KASAN_STACK='
+ )
+ if ! diff -q "${_diff_opts[@]}" "${BUILDDIR}/.config.old" "${BUILDDIR}/.config" ; then
eerror "You configuration is not up to date"
- diff -Nu "${BUILDDIR}/.config.old" "${BUILDDIR}/.config"
+ diff -Nu "${_diff_opts[@]}" "${BUILDDIR}/.config.old" "${BUILDDIR}/.config"
die "Bad configuration"
fi