Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=c3b8f70d979f05779b59e12d6240998ed68412d6
commit c3b8f70d979f05779b59e12d6240998ed68412d6 Author: crazy <[email protected]> Date: Tue Jan 30 18:49:40 2018 +0100 makepkg: check for stack-protector * error out eary when -fstack-protector-strong is missing from C/CXX FLAGS. * aded a noprotector option which allows you to do something like : options+=('noprotector') ... CFLAGS=${CFLAGS/-fstack-protector-strong/} with that option set we warn only , without we error out. ( makepkg is not the place to babysit devels .. :D ) diff --git a/scripts/makepkg b/scripts/makepkg index e948700..8facadc 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -1422,6 +1422,30 @@ if [ "$INCHROOT" == "1" ]; then exit 1 fi + if ! $ECHO $CFLAGS | grep -q "\-fstack-protector-strong" ; then + if [ "`check_option NOPROTECTOR`" ]; then + warning "You disabled stack-protector.. Do that *ONLY*" + warning "when you have a very GOOD reason.." + else + error "Your build/makepkg.conf is broken" + error "-fstack-protector-strong missing in CFLAGS and" + error "options+=('noprotector') is not set.." + exit 1 + fi + fi + + if ! $ECHO $CXXFLAGS | grep -q "\-fstack-protector-strong" ; then + if [ "`check_option NOPROTECTOR`" ]; then + warning "You disabled stack-protector.. Do that *ONLY*" + warning "when you have a very GOOD reason.." + else + error "Your build/makepkg.conf is broken" + error "-fstack-protector-strong missing in CFLAGS and" + error "options+=('noprotector') is not set.." + ext 1 + fi + fi + if ! $ECHO $LDFLAGS | grep -q "\-Wl,--hash-style=gnu" ; then warning "Broken LDFLAGS found, -Wl,--hash-style=gnu is missing from makepkg.conf!!" warning "Setting BUILDTYPE=custom , fix your makepkg.conf" _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
