Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2019 04:33:36 +0000 (UTC)
From:      Mark Linimon <linimon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r497619 - in head/graphics/opengv: . files
Message-ID:  <201904030433.x334XaVb056172@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: linimon
Date: Wed Apr  3 04:33:35 2019
New Revision: 497619
URL: https://svnweb.freebsd.org/changeset/ports/497619

Log:
  Fix build on non-x86 architectures by conditionally turning off
  -march=native.
  
  Approved by:	portmgr (tier-2 blanket)

Added:
  head/graphics/opengv/files/
  head/graphics/opengv/files/extra-patch-CMakeLists.txt   (contents, props changed)
Modified:
  head/graphics/opengv/Makefile

Modified: head/graphics/opengv/Makefile
==============================================================================
--- head/graphics/opengv/Makefile	Wed Apr  3 04:27:41 2019	(r497618)
+++ head/graphics/opengv/Makefile	Wed Apr  3 04:33:35 2019	(r497619)
@@ -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>

Added: head/graphics/opengv/files/extra-patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opengv/files/extra-patch-CMakeLists.txt	Wed Apr  3 04:33:35 2019	(r497619)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904030433.x334XaVb056172>