summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-12-14 09:17:33 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-12-14 09:17:36 +0100
commit18b263f004f833b101918f82c4068d98e38ac35a (patch)
treec20b9f1d76551395cf114e385aac7298c421f397
parent996243ab7abdd3ede25b7d11b23b3846ff05e512 (diff)
downloadptxdist-18b263f004f833b101918f82c4068d98e38ac35a.tar.gz
ptxdist-18b263f004f833b101918f82c4068d98e38ac35a.tar.xz
wrapper: add library search paths at the end
This way they are searched after any paths specified in the original command line. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/wrapper/libwrapper.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index 3eec11602..e45ad35cb 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -8,14 +8,15 @@ FPIE=true
PIE=true
OPTIMIZE=false
ARG_LIST=""
+LATE_ARG_LIST=""
. ${PTXDIST_PLATFORMCONFIG}
wrapper_exec() {
if [ "${PTXDIST_VERBOSE}" = 1 -a -n "${PTXDIST_FD_LOGFILE}" ]; then
- echo "wrapper: ${PTXDIST_CCACHE} ${0##*/} ${ARG_LIST} $*" >&${PTXDIST_FD_LOGFILE}
+ echo "wrapper: ${PTXDIST_CCACHE} ${0##*/} ${ARG_LIST} $* ${LATE_ARG_LIST}" >&${PTXDIST_FD_LOGFILE}
fi
- exec ${PTXDIST_CCACHE} $0.real ${ARG_LIST} "$@"
+ exec ${PTXDIST_CCACHE} $0.real ${ARG_LIST} "$@" ${LATE_ARG_LIST}
}
cc_check_args() {
@@ -70,9 +71,11 @@ cc_check_args() {
}
add_arg() {
- for arg in "${@}"; do
- ARG_LIST="${ARG_LIST} ${arg}"
- done
+ ARG_LIST="${ARG_LIST} ${*}"
+}
+
+add_late_arg() {
+ LATE_ARG_LIST="${ARG_LIST} ${*}"
}
add_opt_arg() {
@@ -111,7 +114,7 @@ ld_add_ld_args() {
cc_add_ld_args() {
if ${LINKING}; then
add_ld_args "-Wl,"
- add_arg ${PTXDIST_CROSS_LDFLAGS}
+ add_late_arg ${PTXDIST_CROSS_LDFLAGS}
add_opt_arg TARGET_EXTRA_LDFLAGS ${PTXCONF_TARGET_EXTRA_LDFLAGS}
fi
}