summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-06-19 00:37:36 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-06-19 00:37:39 +0200
commit7eb59956fdfb344b4ad613bbcbee0e49a5c4f0b1 (patch)
tree00766676a936d0db625c37cedb98957ac991f790 /scripts
parenta1e929d4cdd7e1ff42cd3593cc7b6da9c1b63cc3 (diff)
downloadptxdist-7eb59956fdfb344b4ad613bbcbee0e49a5c4f0b1.tar.gz
ptxdist-7eb59956fdfb344b4ad613bbcbee0e49a5c4f0b1.tar.xz
wapper: improve icecc handling
always set ICECC_CC/ICECC_CXX. Otherwise icecc may use the wrong compiler, e.g. /usr/bin/gcc instead of $PTXCONF_SETUP_HOST_CC. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/wrapper/g++-wrapper3
-rwxr-xr-xscripts/wrapper/gcc-wrapper3
-rwxr-xr-xscripts/wrapper/host-g++-wrapper1
-rwxr-xr-xscripts/wrapper/host-gcc-wrapper2
-rw-r--r--scripts/wrapper/libwrapper.sh20
5 files changed, 24 insertions, 5 deletions
diff --git a/scripts/wrapper/g++-wrapper b/scripts/wrapper/g++-wrapper
index 4f7153c17..fcf83db7e 100755
--- a/scripts/wrapper/g++-wrapper
+++ b/scripts/wrapper/g++-wrapper
@@ -2,8 +2,6 @@
. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit
-export ICECC_VERSION="${ICECC_VERSION_TARGET}"
-
cc_check_args "${@}"
cc_add_target_ld_args
@@ -11,5 +9,6 @@ cc_add_fortify
cc_add_stack
cc_add_pie
cxx_add_target_extra
+cxx_add_target_icecc "${@}"
wrapper_exec "$@"
diff --git a/scripts/wrapper/gcc-wrapper b/scripts/wrapper/gcc-wrapper
index 4bbc75a80..930e504e9 100755
--- a/scripts/wrapper/gcc-wrapper
+++ b/scripts/wrapper/gcc-wrapper
@@ -2,8 +2,6 @@
. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit
-export ICECC_VERSION="${ICECC_VERSION_TARGET}"
-
cc_check_args "${@}"
cc_add_target_ld_args
@@ -11,5 +9,6 @@ cc_add_fortify
cc_add_stack
cc_add_pie
cc_add_target_extra
+cc_add_target_icecc "${@}"
wrapper_exec "$@"
diff --git a/scripts/wrapper/host-g++-wrapper b/scripts/wrapper/host-g++-wrapper
index c5d187cc1..6cb28eec9 100755
--- a/scripts/wrapper/host-g++-wrapper
+++ b/scripts/wrapper/host-g++-wrapper
@@ -9,5 +9,6 @@ cc_check_args "${@}"
cc_add_host_ld_args
cxx_add_host_extra
+cxx_add_host_icecc "${@}"
wrapper_exec "$@"
diff --git a/scripts/wrapper/host-gcc-wrapper b/scripts/wrapper/host-gcc-wrapper
index 6ec29e934..9b2979858 100755
--- a/scripts/wrapper/host-gcc-wrapper
+++ b/scripts/wrapper/host-gcc-wrapper
@@ -2,12 +2,12 @@
. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit
-export ICECC_VERSION="${ICECC_VERSION_HOST}"
HOST=true
cc_check_args "${@}"
cc_add_host_ld_args
cc_add_host_extra
+cc_add_host_icecc "${@}"
wrapper_exec "$@"
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index d501c8ed1..4313b70f2 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -228,3 +228,23 @@ cxx_add_host_extra() {
cpp_add_host_extra
add_host_arg ${pkg_cxxflags}
}
+
+cc_add_target_icecc() {
+ export ICECC_VERSION="${ICECC_VERSION_TARGET}"
+ export ICECC_CC="${0%/*}/real/${0##*/}"
+}
+
+cxx_add_target_icecc() {
+ export ICECC_VERSION="${ICECC_VERSION_TARGET}"
+ export ICECC_CXX="${0%/*}/real/${0##*/}"
+}
+
+cc_add_host_icecc() {
+ export ICECC_VERSION="${ICECC_VERSION_HOST}"
+ export ICECC_CC="${0%/*}/real/${0##*/}"
+}
+
+cxx_add_host_icecc() {
+ export ICECC_VERSION="${ICECC_VERSION_HOST}"
+ export ICECC_CXX="${0%/*}/real/${0##*/}"
+}