Fix build on non-x86 architectures by conditionally turning off

-march=native.

Approved by:	portmgr (tier-2 blanket)
This commit is contained in:
Mark Linimon 2019-04-03 04:33:35 +00:00
parent 498bb75d3a
commit 6521bed65e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=497619
2 changed files with 19 additions and 1 deletions

View File

@ -26,4 +26,11 @@ do-test:
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
.include <bsd.port.mk>
.include <bsd.port.pre.mk>
# disable march-native on non-x86 archs
.if ${ARCH} != amd64 && ${ARCH} != i386
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-CMakeLists.txt
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,11 @@
--- CMakeLists.txt.orig 2018-10-25 03:22:02 UTC
+++ CMakeLists.txt
@@ -35,8 +35,6 @@ ELSE()
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES
"(arm)|(ARM)|(armhf)|(ARMHF)|(armel)|(ARMEL)")
add_definitions (-march=armv7-a)
- ELSE ()
- add_definitions (-march=native) #TODO use correct c++11 def once everybody has moved to gcc 4.7 # for now I even removed std=gnu++0x
ENDIF()
add_definitions (
-O3