<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/c3935cc6ac93a4da2b1e0219c32692735efa134d">https://github.com/macports/macports-ports/commit/c3935cc6ac93a4da2b1e0219c32692735efa134d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit c3935cc6ac93a4da2b1e0219c32692735efa134d
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Wed Jan 26 01:36:59 2022 -0600
<span style='display:block; white-space:pre;color:#404040;'> fasttext: Don't use -march=native
</span>---
textproc/fasttext/Portfile | 6 +++---
textproc/fasttext/files/no-march-native.patch | 28 +++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/textproc/fasttext/Portfile b/textproc/fasttext/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 3689fe8e07e..247cd065b11 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/textproc/fasttext/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/textproc/fasttext/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,11 +4,10 @@ PortSystem 1.0
</span> PortGroup github 1.0
github.setup facebookresearch fastText 0.9.2 v
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> name [string tolower ${github.project}]
categories-append textproc
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin
</span> license MIT
maintainers nomaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -21,7 +20,8 @@ checksums rmd160 f83305b9e95c7e97a0a51c8a82293b235346315b \
</span> sha256 e9ce4ab7d2bf6c5e2343faa5920c59370d3e8a08bf6bd07b1f1e7ea48d441fe7 \
size 4036928
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Reequires c++11 support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles no-march-native.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> compiler.cxx_standard 2011
if {${name} eq ${subport}} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/textproc/fasttext/files/no-march-native.patch b/textproc/fasttext/files/no-march-native.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..59aeaa54598
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/textproc/fasttext/files/no-march-native.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,28 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Don't use -march=native. On non-Intel machines it will cause a build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+failure and on Intel machines it may cause the built binary not to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+usable on computers with processor models different from the build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+machine.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- CMakeLists.txt.orig 2020-04-28 04:40:33.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ CMakeLists.txt 2022-01-26 01:32:18.000000000 -0600
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -15,7 +15,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ include_directories(fasttext)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(CMAKE_CXX_FLAGS " -pthread -std=c++11 -funroll-loops -O3 -march=native")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++set(CMAKE_CXX_FLAGS " -pthread -std=c++11 -funroll-loops -O3")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(HEADER_FILES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/args.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- setup.py.orig 2020-04-28 04:40:33.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ setup.py 2022-01-26 01:33:01.000000000 -0600
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -75,8 +75,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FASTTEXT_SRC,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ language='c++',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- extra_compile_args=["-O0 -fno-inline -fprofile-arcs -pthread -march=native" if coverage else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "-O3 -funroll-loops -pthread -march=native"],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ extra_compile_args=["-O0 -fno-inline -fprofile-arcs -pthread" if coverage else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "-O3 -funroll-loops -pthread"],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>