From eeee1a336164398b7a48f7d5c31a03f43d8ed100 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Thu, 6 May 2021 23:28:08 +0300 Subject: [PATCH] Makefile.Linux: use cc -dumpmachine The -dumpmachine flag returns a platform and this is exactly the same as clang --version returns in "Target:" line. Also the same flag works for other compilers: $ gcc -dumpmachine x86_64-linux-gnu $ clang -dumpmachine x86_64-pc-linux-gnu --- Build/Makefile.Darwin | 2 +- Build/Makefile.Linux | 2 +- Build/Makefile.Raspi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Build/Makefile.Darwin b/Build/Makefile.Darwin index de3d805..cb37b9f 100644 --- a/Build/Makefile.Darwin +++ b/Build/Makefile.Darwin @@ -15,7 +15,7 @@ XCODE_SDK_PATH := $(shell $(XCODE_RUN) --show-sdk-path) CC := $(shell $(XCODE_RUN) -find clang) AR := ar -COMPILER := $(shell $(CC) --version | grep "Target:" | cut -d ' ' -f 2) +COMPILER := $(shell $(CC) -dumpmachine) DEBUGGER := lldb SRC_DIRS_Darwin := PAL/Darwin Common diff --git a/Build/Makefile.Linux b/Build/Makefile.Linux index 5e47ff7..c46bd5a 100644 --- a/Build/Makefile.Linux +++ b/Build/Makefile.Linux @@ -1,7 +1,7 @@ CC := clang AR := ar -COMPILER := $(shell $(CC) --version | grep "Target:" | cut -d ' ' -f 2) +COMPILER := $(shell $(CC) -dumpmachine) DEBUGGER := gdb SRC_DIRS_Linux := PAL/Linux diff --git a/Build/Makefile.Raspi b/Build/Makefile.Raspi index de34338..4a16285 100644 --- a/Build/Makefile.Raspi +++ b/Build/Makefile.Raspi @@ -1,7 +1,7 @@ CC := clang AR := ar -COMPILER := $(shell $(CC) --version | grep "Target:" | cut -d ' ' -f 2) +COMPILER := $(shell $(CC) -dumpmachine) DEBUGGER := gdb SRC_DIRS_Raspi := PAL/Raspi