lmi-commits
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]