svn commit: r462646 - head/lang/rust/files
Jan Beich
jbeich at FreeBSD.org
Thu Feb 22 22:05:22 UTC 2018
Author: jbeich
Date: Thu Feb 22 22:05:21 2018
New Revision: 462646
URL: https://svnweb.freebsd.org/changeset/ports/462646
Log:
lang/rust: unbreak on aarch64 after r459911
gmake: Leaving directory '.../aarch64-unknown-freebsd/release/build/rustc_binaryen-cfb76adb9420e94c/out/build'
--- stderr
c++: error: the clang compiler does not support '-march=native'
c++: error: the clang compiler does not support '-march=native'
PR: 225600
Reported by: Gergely Czuczy, pkg-fallout
Obtained from: upstream (binaryen 1.37.35)
Approved by: portmgr blanket
Added:
head/lang/rust/files/patch-src_binaryen_CMakeLists.txt (contents, props changed)
Added: head/lang/rust/files/patch-src_binaryen_CMakeLists.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/rust/files/patch-src_binaryen_CMakeLists.txt Thu Feb 22 22:05:21 2018 (r462646)
@@ -0,0 +1,60 @@
+https://github.com/WebAssembly/binaryen/commit/07f6dfbf0d89
+https://github.com/WebAssembly/binaryen/commit/d9692277357b
+
+--- src/binaryen/CMakeLists.txt.orig 2018-02-12 18:56:16 UTC
++++ src/binaryen/CMakeLists.txt
+@@ -99,51 +99,12 @@ ELSE()
+ FIND_PACKAGE(Threads REQUIRED)
+ ADD_CXX_FLAG("-std=c++11")
+ if (NOT EMSCRIPTEN)
+- # try to get the target architecture by compiling a dummy.c file and
+- # checking the architecture using the file command.
+- file(WRITE ${PROJECT_BINARY_DIR}/dummy.c "main(){}")
+- try_compile(
+- COMPILE_OK
+- ${PROJECT_BINARY_DIR}
+- ${PROJECT_BINARY_DIR}/dummy.c
+- OUTPUT_VARIABLE COMPILE_OUTPUT
+- COPY_FILE ${PROJECT_BINARY_DIR}/dummy
+- )
+- if (COMPILE_OK)
+- execute_process(
+- COMMAND file ${PROJECT_BINARY_DIR}/dummy
+- RESULT_VARIABLE FILE_RESULT
+- OUTPUT_VARIABLE FILE_OUTPUT
+- ERROR_QUIET
+- )
+-
+- if (FILE_RESULT EQUAL 0)
+- if (${FILE_OUTPUT} MATCHES "x86[-_]64")
+- set(TARGET_ARCH "x86-64")
+- elseif (${FILE_OUTPUT} MATCHES "Intel 80386")
+- set(TARGET_ARCH "i386")
+- elseif (${FILE_OUTPUT} MATCHES "ARM")
+- set(TARGET_ARCH "ARM")
+- else ()
+- message(WARNING "Unknown target architecture!")
+- endif ()
+- if(TARGET_ARCH)
+- MESSAGE(STATUS "Building for platform ${TARGET_ARCH}")
+- endif ()
+- else ()
+- message(WARNING "Error running file on dummy executable")
+- endif ()
+- else ()
+- message(WARNING "Error compiling dummy.c file: ${COMPILE_OUTPUT}")
+- endif ()
+-
+- if (TARGET_ARCH STREQUAL "i386")
++ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
+ # wasm doesn't allow for x87 floating point math
+ ADD_COMPILE_FLAG("-msse2")
+ ADD_COMPILE_FLAG("-mfpmath=sse")
+- elseif(TARGET_ARCH STREQUAL "ARM")
+- # stub for ARM-specific instructions. GCC6 adds NEON with the below flags
+- ADD_COMPILE_FLAG("-march=native")
++ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv[2-6]" AND NOT CMAKE_CXX_FLAGS MATCHES "-mfpu=")
++ ADD_COMPILE_FLAG("-mfpu=vfpv3")
+ endif ()
+ endif ()
+ ADD_COMPILE_FLAG("-Wall")
More information about the svn-ports-head
mailing list