summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-06-09 21:41:43 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-06-09 21:52:17 +0200
commitd7879f2732fa1ea03e99fdeaa7f7a0c43add186e (patch)
treee4c3f1baf680cf88ca27598f8824fe95d0f1f60c /scripts
parentb20b84bfdd9e89b0b3173840179be47d5989f886 (diff)
downloadptxdist-d7879f2732fa1ea03e99fdeaa7f7a0c43add186e.tar.gz
ptxdist-d7879f2732fa1ea03e99fdeaa7f7a0c43add186e.tar.xz
wrapper: don't use target flags for the host compiler
When building target packages, the host compiler may be used to build something. Don't add the packages specific flags here. They may be architecture specific. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wrapper/libwrapper.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index ec0672801..bed465348 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -117,6 +117,12 @@ add_late_opt_arg() {
add_late_arg "${@}"
}
+add_host_arg() {
+ case "${pkg_stamp}" in
+ host-*|cross-*) add_arg "${@}";;
+ esac
+}
+
add_ld_args() {
add_opt_arg TARGET_HARDEN_RELRO "${1}-z,relro"
add_opt_arg TARGET_HARDEN_BINDNOW "${1}-z,now"
@@ -210,15 +216,15 @@ cxx_add_target_extra() {
cpp_add_host_extra() {
add_arg ${PTXDIST_HOST_CPPFLAGS}
- add_arg ${pkg_cppflags}
+ add_host_arg ${pkg_cppflags}
}
cc_add_host_extra() {
cpp_add_host_extra
- add_arg ${pkg_cflags}
+ add_host_arg ${pkg_cflags}
}
cxx_add_host_extra() {
cpp_add_host_extra
- add_arg ${pkg_cxxflags}
+ add_host_arg ${pkg_cxxflags}
}