devel/fccf: fix build on non-x86

immintrin.h is only used on amd64 and i386.

In file included from /wrkdirs/usr/ports/devel/fccf/work/fccf-0.6.0/source/sse2_strstr.cpp:5:
In file included from /usr/lib/clang/13.0.0/include/immintrin.h:17:
/usr/lib/clang/13.0.0/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
    __builtin_ia32_emms();
    ^
This commit is contained in:
Piotr Kubaj 2022-08-27 11:16:27 +02:00
parent b3485c5abc
commit b33c627183
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,12 @@
--- source/searcher.hpp.orig 2022-08-27 09:05:01 UTC
+++ source/searcher.hpp
@@ -18,7 +18,9 @@
#define FMT_HEADER_ONLY 1
#include <fmt/color.h>
#include <fmt/core.h>
+#if defined(__x86_64__) || defined (__i386__)
#include <immintrin.h>
+#endif
#include <sse2_strstr.hpp>
#include <thread_pool.hpp>

View file

@ -0,0 +1,12 @@
--- source/sse2_strstr.cpp.orig 2022-08-27 09:05:40 UTC
+++ source/sse2_strstr.cpp
@@ -2,7 +2,9 @@
#include <cstring>
#include <ctype.h>
+#if defined(__x86_64__) || defined (__i386__)
#include <immintrin.h>
+#endif
#include <sse2_strstr.hpp>
#define FORCE_INLINE inline __attribute__((always_inline))