2008-07-18 12:15:21 +02:00
|
|
|
#! /bin/bash
|
|
|
|
|
2021-03-11 20:22:33 +01:00
|
|
|
# This is a list of toolchain-dependent configs. That is: only those which
|
|
|
|
# change .config when gcc, ld, or similar changes.
|
|
|
|
#
|
|
|
|
# please keep them sorted alphabetically
|
2021-03-10 09:06:35 +01:00
|
|
|
declare -a IGNORED_CONFIGS_RE=(
|
2022-10-19 10:17:50 +02:00
|
|
|
'AS_HAS_[A-Z0-9_]*'
|
2021-04-14 09:27:17 +02:00
|
|
|
'AS_VERSION'
|
2023-11-03 08:08:27 +01:00
|
|
|
'AS_WRUSS' # x86_32
|
2023-08-23 10:09:01 +02:00
|
|
|
'BUILTIN_RETURN_ADDRESS_STRIPS_PAC'
|
2021-03-11 20:22:33 +01:00
|
|
|
'CC_CAN_[A-Z_]*'
|
|
|
|
'CC_HAS_[A-Z_]*'
|
|
|
|
'CC_HAVE_[A-Z_]*'
|
|
|
|
'CC_VERSION_TEXT'
|
2023-07-26 10:10:35 +02:00
|
|
|
'DYNAMIC_SIGFRAME'
|
2023-01-09 12:38:41 +01:00
|
|
|
'FTRACE_MCOUNT_USE_[A-Z_]*'
|
2024-02-22 08:06:11 +01:00
|
|
|
'GCC_ASM_GOTO_OUTPUT_WORKAROUND'
|
2021-03-11 20:22:33 +01:00
|
|
|
'GCC_VERSION'
|
2022-06-23 08:25:06 +02:00
|
|
|
'G*CC[0-9]*_NO_[A-Z_]*'
|
2021-03-11 20:22:33 +01:00
|
|
|
'HAVE_[A-Z]*_COMPILER'
|
2023-11-15 08:09:12 +01:00
|
|
|
'HAVE_SHADOW_CALL_STACK'
|
2021-03-11 20:22:33 +01:00
|
|
|
'LD_VERSION'
|
2023-11-03 08:08:27 +01:00
|
|
|
'OBJTOOL'
|
2023-07-03 11:04:23 +02:00
|
|
|
'PAHOLE_HAS_[A-Z0-9_]*'
|
2022-03-07 08:03:33 +01:00
|
|
|
'PAHOLE_VERSION'
|
2023-07-26 10:10:35 +02:00
|
|
|
'RISCV_ISA_[A-Z_]*'
|
2022-12-02 09:18:13 +01:00
|
|
|
'TOOLCHAIN_HAS_[A-Z_]*'
|
2023-05-15 18:04:25 +02:00
|
|
|
'TOOLCHAIN_NEEDS_[A-Z_]*'
|
2021-03-11 20:22:33 +01:00
|
|
|
'TOOLS_SUPPORT_[A-Z_]*'
|
2021-03-10 09:06:35 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
declare -a SED_ARGS=()
|
|
|
|
|
|
|
|
for CONFIG in "${IGNORED_CONFIGS_RE[@]}"; do
|
2021-03-11 20:22:33 +01:00
|
|
|
SED_ARGS+=(-e "/\\<CONFIG_$CONFIG\\>/ d")
|
2021-03-10 09:06:35 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
SED_ARGS+=(
|
|
|
|
-e '/^# .* is not set$/p'
|
|
|
|
-e '/^$\|^#/d'
|
|
|
|
)
|
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
differences="$(
|
2021-03-10 09:06:35 +01:00
|
|
|
diff -bU0 <(sed "${SED_ARGS[@]}" "$1" | sort) \
|
|
|
|
<(sed "${SED_ARGS[@]}" "$2" | sort) \
|
2008-07-18 12:15:21 +02:00
|
|
|
| grep '^[-+][^-+]'
|
|
|
|
)" || true
|
|
|
|
if [ -n "$differences" ]; then
|
|
|
|
echo
|
|
|
|
echo "Changes after running \`make oldconfig':"
|
|
|
|
echo "$differences"
|
|
|
|
echo
|
|
|
|
if echo "$differences" | grep -q '^+' ; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|