summaryrefslogtreecommitdiffstats
path: root/scripts/wrapper
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2013-09-10 08:56:25 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-09-10 08:56:25 +0200
commitb12577c4040de18bf7228c5f447032d10fb08c54 (patch)
tree0c4afd5d0756f4fe24f164f427af76759fca342c /scripts/wrapper
parent5d5e3b0b11d0cf9488b4690ce526060644d87b10 (diff)
downloadptxdist-b12577c4040de18bf7228c5f447032d10fb08c54.tar.gz
ptxdist-b12577c4040de18bf7228c5f447032d10fb08c54.tar.xz
wrapper: define add_late_opt_arg()
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/wrapper')
-rw-r--r--scripts/wrapper/libwrapper.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index 2909cade1..02b945a87 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -89,23 +89,34 @@ add_late_arg() {
LATE_ARG_LIST="${LATE_ARG_LIST} ${*}"
}
-add_opt_arg() {
+test_opt() {
local opt="${1}"
- shift
for item in ${pkg_wrapper_blacklist}; do
if [ "${item}" = "${opt}" ]; then
- return
+ return 1
fi
done
opt="PTXCONF_${opt}"
eval "opt=\$${opt}"
if [ -z "${opt}" ]; then
- return
+ return 1
fi
+ return 0
+}
+
+add_opt_arg() {
+ test_opt "${1}" || return 0
+ shift
add_arg "${@}"
}
+add_late_opt_arg() {
+ test_opt "${1}" || return 0
+ shift
+ add_late_arg "${@}"
+}
+
add_ld_args() {
add_opt_arg TARGET_HARDEN_RELRO "${1}-z,relro"
add_opt_arg TARGET_HARDEN_BINDNOW "${1}-z,now"