summaryrefslogtreecommitdiffhomepage
path: root/sofort/ccenv/ccenv.sh
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-17 15:42:28 +0000
committermidipix <writeonce@midipix.org>2021-04-17 15:42:28 +0000
commitb0cc9e73cc56d6cacac4b9b709b8c508b798dc01 (patch)
tree8ff5091937efd0f3633b65bb278dbe208c952ac0 /sofort/ccenv/ccenv.sh
parentb5b3266b2a87b21293da1726b7146987e3b16ee0 (diff)
downloadslibtool-b0cc9e73cc56d6cacac4b9b709b8c508b798dc01.tar.bz2
slibtool-b0cc9e73cc56d6cacac4b9b709b8c508b798dc01.tar.xz
build system: ccenv: ccenv_set_cxx(): enhanced and corrected logic.
Diffstat (limited to 'sofort/ccenv/ccenv.sh')
-rw-r--r--sofort/ccenv/ccenv.sh23
1 files changed, 16 insertions, 7 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index 67b5720..8a7c4f2 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -604,16 +604,25 @@ ccenv_set_cxx()
ccenv_candidates="clang++" ;;
*-gcc )
- ccenv_cpp_prefix=${ccenv_cc_cmd%-gcc*}-
- ccenv_candidates="${ccenv_cpp_prefix}g++" ;;
+ ccenv_cxx_prefix=${ccenv_cc_cmd%-gcc*}-
+ ccenv_candidates="${ccenv_cxx_prefix}g++" ;;
*-clang )
- ccenv_cpp_prefix=${ccenv_cc_cmd%-clang*}-
- ccenv_candidates="${ccenv_cpp_prefix}clang++" ;;
+ ccenv_cxx_prefix=${ccenv_cc_cmd%-clang*}-
+ ccenv_candidates="${ccenv_cxx_prefix}clang++" ;;
+
+ /*cc | /*c99 | /*c11 )
+ ccenv_cxx_prefix=${ccenv_cc_cmd%/*}
+ ccenv_candidates="${ccenv_cxx_prefix}/cxx"
+ ccenv_candidates="${ccenv_candidates} ${ccenv_cxx_prefix}/c++" ;;
+
+ /*gcc )
+ ccenv_cxx_prefix=${ccenv_cc_cmd%/*}
+ ccenv_candidates="${ccenv_cxx_prefix}/g++" ;;
- *cc )
- ccenv_cxx_prefix=${ccenv_cc_cmd%cc*}
- ccenv_candidates="${ccenv_cpp_prefix}++" ;;
+ /*clang )
+ ccenv_cxx_prefix=${ccenv_cc_cmd%/*}
+ ccenv_candidates="${ccenv_cxx_prefix}/clang++" ;;
* )
ccenv_cxx="$ccenv_cc -xc++"