diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2020-11-12 02:00:00 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-11-12 16:54:34 -0500 |
commit | 3901a6f4b767074586f5f2cc4583285296ff1b25 (patch) | |
tree | 678455e0503580d85ebd4a6b9669f6625c1f842d /dev-libs/marisa | |
parent | dev-libs/marisa: Set DISTUTILS_USE_SETUPTOOLS="no". (diff) | |
download | gentoo-3901a6f4b767074586f5f2cc4583285296ff1b25.tar.gz gentoo-3901a6f4b767074586f5f2cc4583285296ff1b25.tar.bz2 gentoo-3901a6f4b767074586f5f2cc4583285296ff1b25.zip |
dev-libs/marisa: Update code for selection of CPU instructions.
https://github.com/s-yata/marisa-trie/commit/bbcff46114eaf306ed26ec9e55ee3f3e1dc54f16
Unconditionally passing --enable-sse2, --enable-sse3 etc. no longer works.
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-libs/marisa')
-rw-r--r-- | dev-libs/marisa/marisa-9999.ebuild | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/dev-libs/marisa/marisa-9999.ebuild b/dev-libs/marisa/marisa-9999.ebuild index 0450f64682a8..2458eb10f419 100644 --- a/dev-libs/marisa/marisa-9999.ebuild +++ b/dev-libs/marisa/marisa-9999.ebuild @@ -55,16 +55,30 @@ src_prepare() { src_configure() { local -x CPPFLAGS="${CPPFLAGS} ${CXXFLAGS}" + cpu_instructions_option() { + local option="${1}" + local macros="${2}" + local result="--enable-${option}" + local macro + for macro in ${macros}; do + if ! $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -Eq "^#define ${macro}([[:space:]]|$)"; then + result="--disable-${option}" + fi + done + echo "${result}" + } + local options=( - # Preprocessor macros dependent on CPPFLAGS are checked. - --enable-sse2 - --enable-sse3 - --enable-ssse3 - --enable-sse4.1 - --enable-sse4.2 - --enable-sse4 - --enable-sse4a - --enable-popcnt + $(cpu_instructions_option sse2 __SSE2__) + $(cpu_instructions_option sse3 __SSE3__) + $(cpu_instructions_option ssse3 __SSSE3__) + $(cpu_instructions_option sse4.1 __SSE4_1__) + $(cpu_instructions_option sse4.2 __SSE4_2__) + $(cpu_instructions_option sse4 __POPCNT__ __SSE4_2__) + $(cpu_instructions_option sse4a __SSE4A__) + $(cpu_instructions_option popcnt __POPCNT__) + $(cpu_instructions_option bmi __BMI__) + $(cpu_instructions_option bmi2 __BMI2__) $(use_enable static-libs static) ) @@ -90,7 +104,7 @@ src_compile() { src_install() { default - find "${D}" -name "*.la" -type f -delete || die + find "${ED}" -name "*.la" -delete || die ( docinto html |