summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-11-17 14:31:27 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-11-17 19:00:12 +0100
commit0526aadacb1305d48b756ae4674dbd197dd5fa92 (patch)
treeaddd2782b8a18e5e980773d5543d05ed7dcc0f45 /scripts
parentbaf580f0537749cc22072351e426eb5238c7114a (diff)
downloadptxdist-0526aadacb1305d48b756ae4674dbd197dd5fa92.tar.gz
ptxdist-0526aadacb1305d48b756ae4674dbd197dd5fa92.tar.xz
ptxd_init_*_env: use -B instead of -L
It's not quite correct, but it shouldn't hurt and with -B the path is added to 'libraries:' in 'gcc -print-search-dirs'. Libtool uses this for manual seaching. This avoid explicit paths to .la files found in the system when building host packages. Also assume -print-search-dirs means compiling/linking to ensure the options are used. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_00-init.sh4
-rw-r--r--scripts/wrapper/libwrapper.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
index a2a940303..70a8b99b6 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -213,7 +213,7 @@ ptxd_init_cross_env() {
# add "-L<DIR>/lib -Wl,-rpath-link -Wl,<DIR>"
local -a ldflags
ldflags=( "${prefix[@]/%//${lib_dir}}" )
- ldflags=( "${ldflags[@]/#/-L}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" )
+ ldflags=( "${ldflags[@]/#/-B}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" )
export \
PTXDIST_CROSS_CPPFLAGS="${cppflags[*]}" \
@@ -251,7 +251,7 @@ ptxd_init_host_env() {
local -a ldflags
ldflags=( "${prefix[@]/%//${lib_dir}}" )
ldflags=( \
- "${ldflags[@]/#/-L}" \
+ "${ldflags[@]/#/-B}" \
"${ldflags[@]/#/-Wl,-rpath -Wl,}" \
'-Wl,-rpath,$ORIGIN/../lib:/with/some/extra/space'
)
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index f4a9be523..422d2825c 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -76,7 +76,7 @@ cc_check_args() {
add_late_arg "-Wl,-rpath-link${ARG#-Wl,-rpath}"
fi
;;
- -)
+ -|-print-search-dirs)
COMPILING=true
;;
-*)