]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
make : change GNU make default CXX from g++ to c++ (#6966)
authorPrzemysław Pawełczyk <redacted>
Mon, 29 Apr 2024 13:08:20 +0000 (15:08 +0200)
committerGitHub <redacted>
Mon, 29 Apr 2024 13:08:20 +0000 (16:08 +0300)
Makefile

index 9dc35410a2945e052a5e01ce0b8037e35bf26def..e169cae88895a9a93a72914b3c160c2995f22dac 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,17 @@ ifndef UNAME_M
 UNAME_M := $(shell uname -m)
 endif
 
+# In GNU make default CXX is g++ instead of c++.  Let's fix that so that users
+# of non-gcc compilers don't have to provide g++ alias or wrapper.
+DEFCC  := cc
+DEFCXX := c++
+ifeq ($(origin CC),default)
+CC  := $(DEFCC)
+endif
+ifeq ($(origin CXX),default)
+CXX := $(DEFCXX)
+endif
+
 # Mac OS + Arm can report x86_64
 # ref: https://github.com/ggerganov/whisper.cpp/issues/66#issuecomment-1282546789
 ifeq ($(UNAME_S),Darwin)