mirror of https://github.com/dynup/kpatch
Merge pull request #1013 from steils/dwarf-gz
kpatch-build: check if gcc supports -gz=none
This commit is contained in:
commit
d60579e8d4
|
@ -50,6 +50,7 @@ DEBUG=0
|
||||||
SKIPCLEANUP=0
|
SKIPCLEANUP=0
|
||||||
SKIPGCCCHECK=0
|
SKIPGCCCHECK=0
|
||||||
ARCH_KCFLAGS=""
|
ARCH_KCFLAGS=""
|
||||||
|
DEBUG_KCFLAGS=""
|
||||||
declare -a PATCH_LIST
|
declare -a PATCH_LIST
|
||||||
APPLIED_PATCHES=0
|
APPLIED_PATCHES=0
|
||||||
OOT_MODULE=
|
OOT_MODULE=
|
||||||
|
@ -205,7 +206,6 @@ gcc_version_check() {
|
||||||
else
|
else
|
||||||
kgccver="$(gcc_version_from_file "$VMLINUX")"
|
kgccver="$(gcc_version_from_file "$VMLINUX")"
|
||||||
fi
|
fi
|
||||||
rm -f "$c" "$o"
|
|
||||||
|
|
||||||
if [[ -n "$out" ]]; then
|
if [[ -n "$out" ]]; then
|
||||||
warn "gcc >= 4.8 required for -pg -ffunction-settings"
|
warn "gcc >= 4.8 required for -pg -ffunction-settings"
|
||||||
|
@ -213,6 +213,12 @@ gcc_version_check() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
out="$(gcc -c -gz=none -o "$o" "$c" 2>&1)"
|
||||||
|
if [[ -z "$out" ]]; then
|
||||||
|
DEBUG_KCFLAGS="-gz=none"
|
||||||
|
fi
|
||||||
|
rm -f "$c" "$o"
|
||||||
|
|
||||||
# ensure gcc version matches that used to build the kernel
|
# ensure gcc version matches that used to build the kernel
|
||||||
if [[ "$gccver" != "$kgccver" ]]; then
|
if [[ "$gccver" != "$kgccver" ]]; then
|
||||||
warn "gcc/kernel version mismatch"
|
warn "gcc/kernel version mismatch"
|
||||||
|
@ -748,7 +754,8 @@ if [[ "$ARCH" = "ppc64le" ]]; then
|
||||||
ARCH_KCFLAGS="-mcmodel=large -fplugin=$PLUGINDIR/ppc64le-plugin.so"
|
ARCH_KCFLAGS="-mcmodel=large -fplugin=$PLUGINDIR/ppc64le-plugin.so"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export KCFLAGS="-I$DATADIR/patch -ffunction-sections -fdata-sections -gz=none $ARCH_KCFLAGS"
|
export KCFLAGS="-I$DATADIR/patch -ffunction-sections -fdata-sections \
|
||||||
|
$ARCH_KCFLAGS $DEBUG_KCFLAGS"
|
||||||
|
|
||||||
echo "Reading special section data"
|
echo "Reading special section data"
|
||||||
find_special_section_data
|
find_special_section_data
|
||||||
|
|
Loading…
Reference in New Issue