Skip to content

Commit 086b078

Browse files
committed
Disable -mfpu=neon for aarch64
Disable -mfpu command line argument on aarch64, because it is not available in gcc (aarch64)
1 parent 489f101 commit 086b078

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ else()
272272
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|x86_64|AMD64|amd64|i386|i686")
273273

274274
if(HAVE_NEON)
275-
set(NEON_COMPILE_FLAGS "-mfpu=neon")
275+
# -mfpu compiler option is not available for aarch64
276+
# see: https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html
277+
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64.*|AARCH64.*")
278+
set(NEON_COMPILE_FLAGS "-mfpu=neon")
279+
endif(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64.*|AARCH64.*")
276280
message(STATUS "LTO build is not supported on arm/RBPi.")
277281
set(ENABLE_LTO FALSE) # enable LTO cause fatal error on arm/RBPi
278282
endif()

0 commit comments

Comments
 (0)