2024-05-03 14:13:34 +02:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
# 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
|
|
|
|
declare -a IGNORED_CONFIGS_RE=(
|
2024-11-06 18:28:57 +01:00
|
|
|
'ARCH_USING_PATCHABLE_FUNCTION_ENTRY'
|
2024-05-03 14:13:34 +02:00
|
|
|
'AS_HAS_[A-Z0-9_]*'
|
|
|
|
'AS_VERSION'
|
|
|
|
'AS_WRUSS' # x86_32
|
|
|
|
'BUILTIN_RETURN_ADDRESS_STRIPS_PAC'
|
|
|
|
'CC_CAN_[A-Z_]*'
|
|
|
|
'CC_HAS_[A-Z_]*'
|
|
|
|
'CC_HAVE_[A-Z_]*'
|
|
|
|
'CC_VERSION_TEXT'
|
|
|
|
'DYNAMIC_SIGFRAME'
|
|
|
|
'FTRACE_MCOUNT_USE_[A-Z_]*'
|
2024-09-09 16:37:46 +02:00
|
|
|
'GCC_ASM_GOTO_OUTPUT_BROKEN'
|
2024-05-03 14:13:34 +02:00
|
|
|
'GCC_ASM_GOTO_OUTPUT_WORKAROUND'
|
|
|
|
'GCC_VERSION'
|
|
|
|
'G*CC[0-9]*_NO_[A-Z_]*'
|
|
|
|
'HAVE_[A-Z]*_COMPILER'
|
2024-12-18 15:58:08 +01:00
|
|
|
'HAVE_RUST'
|
2024-05-03 14:13:34 +02:00
|
|
|
'HAVE_SHADOW_CALL_STACK'
|
|
|
|
'LD_VERSION'
|
|
|
|
'OBJTOOL'
|
|
|
|
'PAHOLE_HAS_[A-Z0-9_]*'
|
|
|
|
'PAHOLE_VERSION'
|
|
|
|
'RISCV_ISA_[A-Z_]*'
|
2024-12-18 15:58:08 +01:00
|
|
|
'RUSTC_SUPPORTS_[A-Z0-9_]*'
|
2024-05-03 14:13:34 +02:00
|
|
|
'TOOLCHAIN_HAS_[A-Z_]*'
|
|
|
|
'TOOLCHAIN_NEEDS_[A-Z_]*'
|
|
|
|
'TOOLS_SUPPORT_[A-Z_]*'
|
|
|
|
)
|
|
|
|
|
|
|
|
declare -a SED_ARGS=()
|
|
|
|
|
|
|
|
for CONFIG in "${IGNORED_CONFIGS_RE[@]}"; do
|
|
|
|
SED_ARGS+=(-e "/\\<CONFIG_$CONFIG\\>/ d")
|
|
|
|
done
|
|
|
|
|
|
|
|
SED_ARGS+=(
|
|
|
|
-e '/^# .* is not set$/p'
|
|
|
|
-e '/^$\|^#/d'
|
|
|
|
)
|
|
|
|
|
|
|
|
differences="$(
|
|
|
|
diff -bU0 <(sed "${SED_ARGS[@]}" "$1" | sort) \
|
|
|
|
<(sed "${SED_ARGS[@]}" "$2" | sort) \
|
|
|
|
| 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
|