FreeBSD Bugzilla – Attachment 243597 Details for
Bug 272702
security/nflib: Remove NATIVE option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for nflib
nflib-nonative.patch (text/plain), 3.07 KB, created by
Daniel Engberg
on 2023-07-24 21:54:53 UTC
(
hide
)
Description:
Patch for nflib
Filename:
MIME Type:
Creator:
Daniel Engberg
Created:
2023-07-24 21:54:53 UTC
Size:
3.07 KB
patch
obsolete
>diff --git a/security/nflib/Makefile b/security/nflib/Makefile >index 6b821c36d14c..9e4da5d14d2d 100644 >--- a/security/nflib/Makefile >+++ b/security/nflib/Makefile >@@ -2,7 +2,7 @@ PORTNAME= nflib > DISTVERSIONPREFIX= v > DISTVERSION= 1.0.0-23 > DISTVERSIONSUFFIX= -g5cf40ed >-PORTREVISION= 2 >+PORTREVISION= 3 > CATEGORIES= security math > > MAINTAINER= yuri@FreeBSD.org >@@ -21,19 +21,13 @@ LIB_DEPENDS= libmpfr.so:math/mpfr \ > libgmp.so:math/gmp > > USES= cmake compiler:c++11-lang localbase >+USE_CXXSTD= c++11 > USE_GITHUB= yes > GH_ACCOUNT= quarkslab > GH_PROJECT= NFLlib > USE_LDCONFIG= yes > >-CMAKE_ON= NFL_OPTIMIZED >- >-OPTIONS_DEFINE= NATIVE >- >-NATIVE_DESC= Build with native optimizations (-march=native) >- >-post-patch-NATIVE-off: >- @${REINPLACE_CMD} -e 's|-march=native|| ; s|-mtune=native||' ${WRKSRC}/CMakeLists.txt ${WRKSRC}/CMakeCompilers.txt >+CMAKE_OFF= NFL_OPTIMIZED > > do-test: > @cd ${BUILD_WRKSRC} && \ >diff --git a/security/nflib/files/patch-CMakeLists.txt b/security/nflib/files/patch-CMakeLists.txt >index 66188024ab0b..0961518c909c 100644 >--- a/security/nflib/files/patch-CMakeLists.txt >+++ b/security/nflib/files/patch-CMakeLists.txt >@@ -1,5 +1,14 @@ >---- CMakeLists.txt.orig 2020-02-22 22:31:07 UTC >+--- CMakeLists.txt.orig 2019-11-18 12:19:53 UTC > +++ CMakeLists.txt >+@@ -27,7 +27,7 @@ if(NFL_OPTIMIZED) >+ endif() >+ endif() >+ >+-include(CMakeCompilers.txt) >++# include(CMakeCompilers.txt) >+ >+ >+ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) > @@ -64,4 +64,6 @@ install(FILES ${NFLLIB_HDRS_3} DESTINATION include/nfl > install(FILES ${NFLLIB_HDRS_4} DESTINATION include/nfl/opt/arch) > install(FILES ${NFLLIB_PRNG_HDRS} DESTINATION include/nfl/prng) >diff --git a/security/nflib/files/patch-include_nfl_arch.hpp b/security/nflib/files/patch-include_nfl_arch.hpp >new file mode 100644 >index 000000000000..07f9c34daff6 >--- /dev/null >+++ b/security/nflib/files/patch-include_nfl_arch.hpp >@@ -0,0 +1,19 @@ >+--- include/nfl/arch.hpp.orig 2023-07-24 21:28:33 UTC >++++ include/nfl/arch.hpp >+@@ -3,14 +3,10 @@ >+ >+ #include "nfl/arch/common.hpp" >+ >+-#ifdef NFL_OPTIMIZED >+- >+-#if defined __AVX2__ && defined NTT_AVX2 >++#if defined __AVX2__ && defined __SSE4_2__ >+ #define CC_SIMD nfl::simd::avx2 >+-#elif defined __SSE4_2__ && defined NTT_SSE >++#elif defined __SSE4_2__ && !defined __AVX2__ >+ #define CC_SIMD nfl::simd::sse >+-#endif >+- >+ #endif >+ >+ #ifndef CC_SIMD >diff --git a/security/nflib/files/patch-include_nfl_ops.hpp b/security/nflib/files/patch-include_nfl_ops.hpp >new file mode 100644 >index 000000000000..958354773ca1 >--- /dev/null >+++ b/security/nflib/files/patch-include_nfl_ops.hpp >@@ -0,0 +1,23 @@ >+--- include/nfl/ops.hpp.orig 2023-07-24 21:30:23 UTC >++++ include/nfl/ops.hpp >+@@ -281,18 +281,14 @@ struct _make_op<shoup<type, tag0>, expr<mulmod<type, t >+ >+ } // nfl >+ >+-#ifdef NFL_OPTIMIZED >+- >+ #include "nfl/opt/ops.hpp" >+ >+-#if defined __SSE4_2__ && defined NTT_SSE >++#if defined __SSE4_2__ && !defined __AVX2__ >+ #include "nfl/opt/arch/sse.hpp" >+ #endif >+ >+-#if defined __AVX2__ && defined NTT_AVX2 >++#if defined __AVX2__ && defined __SSE4_2__ >+ #include "nfl/opt/arch/avx2.hpp" >+-#endif >+- >+ #endif >+ >+ #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272702
: 243597