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

commit a7ad3c43d738ec69ac9e1d35ecd5dc2f3f26cf24
Author: crazy <cr...@frugalware.org>
Date:   Tue Jan 30 17:05:47 2018 +0100

makepkg: more checks

* check for sort-common and set custom type when not found
* separate -z,relro and -z,now and added new 'nonow' options

diff --git a/scripts/makepkg b/scripts/makepkg
index 2edf7dd..f872221 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -1430,6 +1430,13 @@ if [ "$INCHROOT" == "1" ]; then
export LDFLAGS
fi

+       if ! $ECHO $LDFLAGS | grep -q "\-Wl,--sort-common" ; then
+               warning "Broken LDFLAGS found, -Wl,--sort-common is missing 
from makepkg.conf!!"
+               warning "Setting BUILDTYPE=custom , fix your makepkg.conf"
+               FORCE_BUILDTYPE="1"
+               LDFLAGS+=" -Wl,--sort-common"
+               export LDFLAGS
+       fi

if [ "`check_option ASNEEDED`" ]; then
error "You are using deprecated option 'asneeded'."
@@ -1457,11 +1464,20 @@ if [ "$INCHROOT" == "1" ]; then
fi

if [ "`check_option NORELRO`" ]; then
-               warning "Disabling LDFLAGS: -z,relro and -z,now"
+               warning "Disabling LDFLAGS: -z,relro"
export ORELRO=0
else
-               msg "Enabling LDFLAGS: -z,relro and -z,now.."
-               LDFLAGS+=" -Wl,-z,relro,-z,now"
+               msg "Enabling LDFLAGS: -z,relro"
+               LDFLAGS+=" -Wl,-z,relro"
+               export LDFLAGS
+       fi
+
+       if [ "`check_option NONOW`" ]; then
+               warning "Disabling LDFLAGS: -z,now"
+               export ONOW=0
+       else
+               msg "Enabling LDFLAGS: -z,now"
+               LDFLAGS+=" -Wl,-z,now"
export LDFLAGS
fi
fi
@@ -2116,6 +2132,10 @@ if [ "$ONORELRO" == "0" ]; then
msg2 "RELRO_LDFLAGS:   OFF "
fi

+if [ "$ONONOW" == "0" ]; then
+       msg2 "BINDNOW_LDFLAGS:   OFF "
+fi
+
msg "Finished making: $pkgname  (`date`)"

install_pkg
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to