Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=1417418ca5155fe0a2427f026a2ad1929c3f85a9

commit 1417418ca5155fe0a2427f026a2ad1929c3f85a9
Author: crazy <cr...@frugalware.org>
Date:   Sun Feb 4 19:21:11 2018 +0100

handle PLT with a option too

* since right now some thing seems to not work with -fno-plt
handle -fno-plt from makepkg too . Is added by default and can
be disabled with options+=('plt')

diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index 24e0a14..3b5fd1d 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -14,11 +14,13 @@ case $(uname -m) in
x86_64)
CARCH="x86_64"
CHOST="x86_64-frugalware-linux"
-               CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong -fno-plt"
-               CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong -fno-plt"
+               CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong"
+               CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector-strong"
;;
esac

+## FLAGS added from makepkg:
+## -fno-plt : can be disbled with options+=('plt')
## options+=('noprotector') allows to manipulate -fstack-protector-strong
## from FrugalBuild. Eg, to use ..=${CFLAGS/-fstack-protector-strong/}
export CARCH CHOST CFLAGS CXXFLAGS
diff --git a/scripts/makepkg b/scripts/makepkg
index 5031670..1673057 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -1500,6 +1500,14 @@ if [ "$INCHROOT" == "1" ]; then
export CFLAGS CXXFLAGS
fi

+       if [ "`check_option PLT`" ]; then
+                warning "Disabling -fno-plt FLAGS"
+       else
+               msg "Enabling -fno-plt in C/CXX FLAGS"
+               CFLAGS+=" -fno-plt"
+               CXXFLAGS+=" -fno-plt"
+       fi
+
if [ "`check_option NORELRO`" ]; then
warning "Disabling LDFLAGS: -z,relro"
export ORELRO=0
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to