Skip to content

Commit eac7372

Browse files
committed
Improve compiler detection for x86_64 target
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
1 parent 7954df3 commit eac7372

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build/configs/toolchain_linux_x86_64.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
set(CMAKE_SYSTEM_NAME Linux)
1616
set(CMAKE_SYSTEM_PROCESSOR x86_64)
1717

18-
set(CMAKE_C_COMPILER x86_64-linux-gnu-gcc)
19-
set(CMAKE_CXX_COMPILER x86_64-linux-gnu-g++)
18+
find_program(CMAKE_C_COMPILER NAMES x86_64-linux-gnu-gcc x86_64-unknown-linux-gnu-gcc)
19+
find_program(CMAKE_CXX_COMPILER NAMES x86_64-linux-gnu-g++ x86_64-unknown-linux-gnu-g++)
20+
# FIXME: This could break cross compilation, when the strip is not for the target architecture
21+
find_program(CMAKE_STRIP NAMES x86_64-linux-gnu-strip x86_64-unknown-linux-gnu-strip strip)
2022

2123
set(FLAGS_COMMON_ARCH -ffixed-rbp)

0 commit comments

Comments
 (0)