Skip to content

Commit

Permalink
Makefile.Linux: use cc -dumpmachine
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stokito authored and aajain-com committed May 20, 2021
1 parent d3eb6f8 commit eeee1a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Build/Makefile.Darwin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Build/Makefile.Linux
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Build/Makefile.Raspi
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit eeee1a3

Please sign in to comment.