Change default CONFIG to none

- Use default value of `CXX` instead of forcing override to `clang++`.
- Add base `CXXFLAGS` and `ABCMKARGS` in else condition of `ifeq ($(CONFIG),..)`
  block and output the value of `CXX`.
- Change readme to mention `CXX` envvar and that using `make config-clang` etc
  will ignore `CXX`.
This commit is contained in:
Krystine Sherwin 2024-03-08 11:09:03 +13:00
parent 6d528ef808
commit 56f66596b0
No known key found for this signature in database
2 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,6 @@
CONFIG := clang CONFIG := none
# CONFIG := clang
# CONFIG := gcc # CONFIG := gcc
# CONFIG := afl-gcc # CONFIG := afl-gcc
# CONFIG := emcc # CONFIG := emcc
@ -362,6 +363,10 @@ EXE = .exe
else ifneq ($(CONFIG),none) else ifneq ($(CONFIG),none)
$(error Invalid CONFIG setting '$(CONFIG)'. Valid values: clang, gcc, emcc, mxe, msys2-32, msys2-64) $(error Invalid CONFIG setting '$(CONFIG)'. Valid values: clang, gcc, emcc, mxe, msys2-32, msys2-64)
else
$(info Using provided C++ compiler, '$(CXX)'.)
CXXFLAGS += -std=$(CXXSTD) -Os
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H $(ABC_ARCHFLAGS)"
endif endif
ifeq ($(ENABLE_LIBYOSYS),1) ifeq ($(ENABLE_LIBYOSYS),1)

View File

@ -105,11 +105,17 @@ For Cygwin use the following command to install all prerequisites, or select the
setup-x86_64.exe -q --packages=bison,flex,gcc-core,gcc-g++,git,libffi-devel,libreadline-devel,make,pkg-config,python3,tcl-devel,boost-build,zlib-devel setup-x86_64.exe -q --packages=bison,flex,gcc-core,gcc-g++,git,libffi-devel,libreadline-devel,make,pkg-config,python3,tcl-devel,boost-build,zlib-devel
To configure the build system to use a specific compiler, use one of The environment variable `CXX` can be used to control the C++ compiler used, or
run one of the following:
$ make config-clang $ make config-clang
$ make config-gcc $ make config-gcc
Note that these will result in `make` ignoring the `CXX` environment variable,
unless `CXX` is assigned in the call to make, e.g.
$ make CXX=$CXX
For other compilers and build configurations it might be For other compilers and build configurations it might be
necessary to make some changes to the config section of the necessary to make some changes to the config section of the
Makefile. Makefile.