Commit 0874f38f authored by Timo Teräs's avatar Timo Teräs

main/linux-grsec: fix -fno-pie location

KCFLAGS is too late for gcc flags detection logic. So embed the
-fno-pie flag directly to CC. This fixes the error:
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
parent 152f7de5
...@@ -7,7 +7,7 @@ case $pkgver in ...@@ -7,7 +7,7 @@ case $pkgver in
*.*.*) _kernver=${pkgver%.*};; *.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=${pkgver};; *.*) _kernver=${pkgver};;
esac esac
pkgrel=1 pkgrel=2
pkgdesc="Linux kernel with grsecurity" pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net url=http://grsecurity.net
depends="mkinitfs" depends="mkinitfs"
...@@ -95,12 +95,10 @@ prepare() { ...@@ -95,12 +95,10 @@ prepare() {
} }
build() { build() {
export GCC_SPECS=hardenednopie.specs
for i in $_flavors; do for i in $_flavors; do
cd "$srcdir"/build-$i cd "$srcdir"/build-$i
make CC="${CC:-gcc}" \ make CC="${CC:-gcc} -fno-pie" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
KCFLAGS="-fno-pie" \
|| return 1 || return 1
done done
} }
...@@ -174,7 +172,6 @@ _dev() { ...@@ -174,7 +172,6 @@ _dev() {
echo "-$pkgrel-$_flavor" > "$dir"/localversion-alpine \ echo "-$pkgrel-$_flavor" > "$dir"/localversion-alpine \
|| return 1 || return 1
make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="${CC:-gcc}" \ make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="${CC:-gcc}" \
KCFLAGS="-fno-pie" \
silentoldconfig prepare modules_prepare scripts silentoldconfig prepare modules_prepare scripts
# remove the stuff that poits to real sources. we want 3rd party # remove the stuff that poits to real sources. we want 3rd party
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment