1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-12-23 23:50:51 +01:00

Allways build libssp_noshared, even for non hardened toolchains

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-10-20 21:59:14 +02:00
parent e87a8ec43c
commit 544ac03d1f

View file

@ -16,11 +16,11 @@ build() {
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="$cflags -fPIE -fPIC -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
${TARGET}-gcc -c "$SCRIPTDIR/pkg/$PKGNAME/__stack_chk_fail_local.c" -o __stack_chk_fail_local.o
${TARGET}-ar r libssp_nonshared.a __stack_chk_fail_local.o
fi
${TARGET}-gcc -c "$SCRIPTDIR/pkg/$PKGNAME/__stack_chk_fail_local.c" -o __stack_chk_fail_local.o
${TARGET}-ar r libssp_nonshared.a __stack_chk_fail_local.o
CFLAGS="$cflags" LDFLAGS="$ldflags" \
CROSS_COMPILE="${TARGET}-" $1/configure --prefix=/ --target="$TARGET"
CROSS_COMPILE="${TARGET}-" make -j $NUMJOBS
@ -61,9 +61,7 @@ deploy() {
find "$DEPLOY/etc" -exec stat {} --printf="%n m %a 0 0\\n" \; | \
sed "s#^$DEPLOY/##g" | tail -n +2 >> "$DEPLOY/rootfs_files.txt"
if [ "x$TC_HARDENING" = "xyes" ]; then
cp libssp_nonshared.a "$DEPLOY/lib"
fi
cp libssp_nonshared.a "$DEPLOY/lib"
}
check_update() {