[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 601f829a 2/8: Find '*-config' scripts in gcc
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 601f829a 2/8: Find '*-config' scripts in gcc directories for clang |
Date: |
Fri, 24 Jun 2022 19:56:24 -0400 (EDT) |
branch: master
commit 601f829aa75519ddc5a5e0b7d6f505e7754971e5
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Find '*-config' scripts in gcc directories for clang
There's no need at present to build libxml or wx with clang, which can
simply link the libraries already built with gcc, as long as their
'-config' scripts are on $PATH.
---
set_toolchain.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/set_toolchain.sh b/set_toolchain.sh
index db544501..5d93fd5b 100755
--- a/set_toolchain.sh
+++ b/set_toolchain.sh
@@ -96,6 +96,15 @@ local bindir="$prefix/bin"
local localbindir="$prefix/local/${LMI_COMPILER}_${LMI_TRIPLET}/bin"
local locallibdir="$prefix/local/${LMI_COMPILER}_${LMI_TRIPLET}/lib"
+# Directory where clang can find gcc-built '*-config' scripts.
+local clanggccdir
+case "$LMI_COMPILER" in
+ (clang)
+ clanggccdir="$prefix/local/gcc_${LMI_TRIPLET}/bin"
+ ;;
+ (*) ;;
+esac
+
# Running a command like this many times:
# export PATH="$localbindir":"$locallibdir":"$PATH"
# would cause $PATH to grow without bound.
@@ -106,6 +115,7 @@ local
locallibdir="$prefix/local/${LMI_COMPILER}_${LMI_TRIPLET}/lib"
local minimal_path
minimal_path=${MINIMAL_PATH:-"/usr/bin:/bin:/usr/sbin:/sbin"}
+ minimal_path="${clanggccdir:+${clanggccdir}:}""$minimal_path"
export PATH="$localbindir":"$locallibdir":"$minimal_path"
# It is okay to export these variables unconditionally.
- [lmi-commits] [lmi] master updated (6030d119 -> ee23febb), Greg Chicares, 2022/06/24
- [lmi-commits] [lmi] master 2d81c4f7 5/8: Simplify, Greg Chicares, 2022/06/24
- [lmi-commits] [lmi] master ee23febb 8/8: Raze clang as gcc is razed, Greg Chicares, 2022/06/24
- [lmi-commits] [lmi] master c850f2bc 4/8: Augment $LD_LIBRARY_PATH for clang, Greg Chicares, 2022/06/24
- [lmi-commits] [lmi] master e35ff020 7/8: Suggest a workaround for a potential problem, Greg Chicares, 2022/06/24
- [lmi-commits] [lmi] master fb4d6416 3/8: Rename a local variable, Greg Chicares, 2022/06/24
- [lmi-commits] [lmi] master 346f3037 6/8: Don't show a flag that's used only elsewhere, internally, Greg Chicares, 2022/06/24
- [lmi-commits] [lmi] master 601f829a 2/8: Find '*-config' scripts in gcc directories for clang,
Greg Chicares <=
- [lmi-commits] [lmi] master d0c1f2c8 1/8: Localize a script variable, Greg Chicares, 2022/06/24