Browse Source

Add logic to autodetect compiler and fix build with clang on linux

Signed-off-by: Violet Purcell <vimproved@inventati.org>
pull/1805/head
Violet Purcell 1 year ago
parent
commit
7c3315bef9
No known key found for this signature in database GPG Key ID: FC4685561892D0BA
2 changed files with 13 additions and 1 deletions
  1. +12
    -0
      source/Makefile.deps.mk
  2. +1
    -1
      source/Makefile.mk

+ 12
- 0
source/Makefile.deps.mk View File

@@ -55,6 +55,18 @@ endif # BSD
# ---------------------------------------------------------------------------------------------------------------------
# Auto-detect the processor

COMPILER_VERSION := $(shell $(CC) --version)

ifneq (,$(findstring clang,$(COMPILER_VERSION)))
CLANG = true
endif
ifneq (,$(findstring gcc,$(COMPILER_VERSION)))
GCC = true
endif

# ---------------------------------------------------------------------------------------------------------------------
# Auto-detect the processor

TARGET_PROCESSOR := $(firstword $(subst -, ,$(TARGET_MACHINE)))

ifneq (,$(filter i%86,$(TARGET_PROCESSOR)))


+ 1
- 1
source/Makefile.mk View File

@@ -85,7 +85,7 @@ CXXFLAGS += -fvisibility-inlines-hidden
endif

ifneq ($(MACOS_OR_WASM_OR_WINDOWS),true)
ifneq ($(BSD),true)
ifeq ($(GCC),true)
BASE_FLAGS += -fno-gnu-unique
endif
endif


Loading…
Cancel
Save