From 0e599b7a640cdf52dacc4d94d45a3ff76c4cab0b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 18 Jul 2018 09:39:10 +0200 Subject: [PATCH] ENH: add optional -clang flag for building gcc - can be useful when bootstrapping --- etc/tools/ThirdPartyFunctions | 2 +- makeADIOS | 4 ++-- makeADIOS2 | 4 ++-- makeCCMIO | 2 +- makeCmake | 4 ++-- makeFFTW | 2 +- makeGcc | 7 +++++++ makeGperftools | 2 +- makeKAHIP | 2 +- makeMETIS | 2 +- makeMGridGen | 2 +- makeMesa | 2 +- makeOPENMPI | 2 +- makeQt | 2 +- 14 files changed, 23 insertions(+), 16 deletions(-) diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions index 54c185f..b1558bb 100644 --- a/etc/tools/ThirdPartyFunctions +++ b/etc/tools/ThirdPartyFunctions @@ -64,7 +64,7 @@ exportLinker() # Force use of gcc/g++ useGcc() { - export CC=gcc # Use gcc/g++ + export CC=gcc export CXX=g++ } diff --git a/makeADIOS b/makeADIOS index a8dde44..7e27744 100755 --- a/makeADIOS +++ b/makeADIOS @@ -41,8 +41,8 @@ usage() { usage: ${0##*/} [OPTION] [adios-VERSION] [-- configure-options] options: - -cmake PATH With cmake from the path given - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -cmake PATH With cmake from the path given + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * Build ADIOS diff --git a/makeADIOS2 b/makeADIOS2 index 80e0464..8231e62 100755 --- a/makeADIOS2 +++ b/makeADIOS2 @@ -39,8 +39,8 @@ usage() { usage: ${0##*/} [OPTION] [adios-VERSION] options: - -cmake PATH With cmake from the path given - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -cmake PATH With cmake from the path given + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * Build ADIOS2 diff --git a/makeCCMIO b/makeCCMIO index 123eabb..b69d2b4 100755 --- a/makeCCMIO +++ b/makeCCMIO @@ -51,7 +51,7 @@ usage() Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * Compile the proprietary libccmio library diff --git a/makeCmake b/makeCmake index 9dcd7bb..01b45fa 100755 --- a/makeCmake +++ b/makeCmake @@ -42,8 +42,8 @@ usage() { usage: ${0##*/} [OPTION] cmake-VERSION options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX - -link Create additional symlink as 'cmake-system' + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -link Create additional symlink as 'cmake-system' -help * build cmake diff --git a/makeFFTW b/makeFFTW index 545dab3..7ee0f16 100755 --- a/makeFFTW +++ b/makeFFTW @@ -59,7 +59,7 @@ usage() { usage: ${0##*/} [OPTION] [fftw-VERSION] [-- configure-options] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * build FFTW with diff --git a/makeGcc b/makeGcc index 8f02ec1..3e19492 100755 --- a/makeGcc +++ b/makeGcc @@ -60,6 +60,7 @@ usage() { usage: ${0##*/} [OPTION] [gcc-VERSION] [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] options: + -clang Force clang/clang++ for building -multilib for 64-bit systems with 32-bit support required -no-multilib for 64-bit systems without 32-bit support (DEFAULT) -no-threadsafe disable mpfr thread-safe (default is auto-detect) @@ -86,6 +87,10 @@ do case "$1" in '') ;; # Ignore empty -h | -help) usage ;; + -clang) # Force use of clang/clang++ for building + export CC=clang + export CXX=clang++ + ;; -multi*) optMultilib=enable @@ -133,6 +138,8 @@ GCC configuration MPFR = $mpfrPACKAGE MPC = $mpcPACKAGE ------------------ +Using CC = $CC $CFLAGS +Using CXX = $CXX $CXXFLAGS SUMMARY # Set 32 or 64 bit ABI diff --git a/makeGperftools b/makeGperftools index de32b8f..fbd1ef6 100755 --- a/makeGperftools +++ b/makeGperftools @@ -41,7 +41,7 @@ usage() { usage: ${0##*/} [gperftools-VERSION] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * build gperftools diff --git a/makeKAHIP b/makeKAHIP index c83c39a..1756267 100755 --- a/makeKAHIP +++ b/makeKAHIP @@ -75,7 +75,7 @@ usage() Usage: ${0##*/} [OPTION] [lib|libso] [kahip-VERSION] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * Compile KaHIP diff --git a/makeMETIS b/makeMETIS index 2b87e55..0011ead 100755 --- a/makeMETIS +++ b/makeMETIS @@ -74,7 +74,7 @@ usage() { usage: ${0##*/} [OPTION] [lib|libso] [METIS-VERSION] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * build METIS with diff --git a/makeMGridGen b/makeMGridGen index 9fb3a33..711fce6 100755 --- a/makeMGridGen +++ b/makeMGridGen @@ -42,7 +42,7 @@ usage() { usage: ${0##*/} [OPTION] [mgridgen-VERSION] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * Build MGridGen diff --git a/makeMesa b/makeMesa index 8a96ef0..e6df600 100755 --- a/makeMesa +++ b/makeMesa @@ -49,7 +49,7 @@ usage() { usage: ${0##*/} [OPTION] mesa-VERSION [-- configure-options] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * build Mesa with diff --git a/makeOPENMPI b/makeOPENMPI index 7780bf0..84b9773 100755 --- a/makeOPENMPI +++ b/makeOPENMPI @@ -70,7 +70,7 @@ usage() { usage: ${0##*/} [OPTION] [openmpi-VERSION] [-- configure-options] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -memcheck Configure with --enable-memcheck (requires valgrind.h) -threaded Configure with --enable-mpi-thread-multiple -no-threaded Configure with --disable-mpi-thread-multiple diff --git a/makeQt b/makeQt index 99a3648..01da561 100755 --- a/makeQt +++ b/makeQt @@ -35,7 +35,7 @@ usage() { usage: ${0##*/} [OPTION] [qt-VERSION] [-- configure-options] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX -help * build $qtTYPE, version ${qtVERSION:-undefined}