lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 6030d119 7/7: Prepare to support clang


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 6030d119 7/7: Prepare to support clang
Date: Thu, 23 Jun 2022 18:33:54 -0400 (EDT)

branch: master
commit 6030d1195c4d0add4cbb26fbe02cb4ab386c0f64
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Prepare to support clang
---
 compiler_clang.make | 28 ++++++++++++++++++++++++++++
 set_toolchain.sh    |  6 ++++--
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/compiler_clang.make b/compiler_clang.make
new file mode 100644
index 00000000..39664381
--- /dev/null
+++ b/compiler_clang.make
@@ -0,0 +1,28 @@
+# Compiler-specific makefile: clang.
+#
+# Copyright (C) 2022 Gregory W. Chicares.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+#
+# https://savannah.nongnu.org/projects/lmi
+# email: <gchicares@sbcglobal.net>
+# snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+AR      := ar
+CC      := clang
+CPP     := cpp
+CXX     := clang++
+LD      := clang++
+# For GNU/Linux, $(RC) is never invoked.
+RC      := windres
diff --git a/set_toolchain.sh b/set_toolchain.sh
index 25bd8266..85ecd2e1 100755
--- a/set_toolchain.sh
+++ b/set_toolchain.sh
@@ -27,8 +27,9 @@
 # used in production if they were unset or null beforehand. They can
 # be overridden at the command line, e.g.:
 #
-#   LMI_COMPILER=gcc ; LMI_TRIPLET=x86_64-pc-linux-gnu ; . 
/opt/lmi/src/lmi/set_toolchain.sh
-#   LMI_COMPILER=gcc ; LMI_TRIPLET=x86_64-w64-mingw32  ; . 
/opt/lmi/src/lmi/set_toolchain.sh
+# LMI_COMPILER=gcc   ; LMI_TRIPLET=x86_64-pc-linux-gnu ; . 
/opt/lmi/src/lmi/set_toolchain.sh
+# LMI_COMPILER=clang ; LMI_TRIPLET=x86_64-pc-linux-gnu ; . 
/opt/lmi/src/lmi/set_toolchain.sh
+# LMI_COMPILER=gcc   ; LMI_TRIPLET=x86_64-w64-mingw32  ; . 
/opt/lmi/src/lmi/set_toolchain.sh
 #
 # Implemented as a function that runs and then erases itself, so that
 # sourcing this script changes the environment only as intended. This
@@ -170,6 +171,7 @@ export LMI_TRIPLET
 
 case "$LMI_COMPILER" in
     (gcc) ;;
+    (clang) ;;
     (*)
         printf '%s\n' "Changed nothing because compiler '$LMI_COMPILER' is 
untested."
         return 2;



reply via email to

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