Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 538104 - dev-libs/marisa: CPU feature flags need overhaul
Summary: dev-libs/marisa: CPU feature flags need overhaul
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
: 523720 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-28 22:08 UTC by Michał Górny
Modified: 2015-02-01 12:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-28 22:08:20 UTC
To summarize:

1. there's a lot of --enable switches:

  --enable-sse2           use SSE2 [default=no]
  --enable-sse3           use SSE3 [default=no]
  --enable-ssse3          use SSSE3 [default=no]
  --enable-sse4.1         use SSE4.1 [default=no]
  --enable-sse4.2         use SSE4.2 [default=no]
  --enable-sse4           use SSE4 [default=no]
  --enable-sse4a          use SSE4a [default=no]
  --enable-popcnt         use POPCNT [default=no]

2. that implicitly enable other switches:

AS_IF([test "x${enable_popcnt}" != "xno"], [
  enable_sse3="yes"
])
AS_IF([test "x${enable_sse4a}" != "xno"], [
  enable_popcnt="yes"
  enable_sse3="yes"
])
AS_IF([test "x${enable_sse4}" != "xno"], [
  enable_popcnt="yes"
  enable_sse4_2="yes"
])
#...

3. and those in turn enable some defines:

if test "x${enable_sse4a}" != "xno"; then
  CXXFLAGS="$CXXFLAGS -DMARISA_USE_SSE4A -msse4a"
elif test "x${enable_sse4}" != "xno"; then
  CXXFLAGS="$CXXFLAGS -DMARISA_USE_SSE4 -msse4"
elif test "x${enable_sse4_2}" != "xno"; then
  CXXFLAGS="$CXXFLAGS -DMARISA_USE_SSE4_2 -msse4.2"
#...

4. which do some implicit deps again:

#ifdef MARISA_USE_SSE4A
 #ifndef MARISA_USE_SSE3
  #define MARISA_USE_SSE3
 #endif  // MARISA_USE_SSE3
 #ifndef MARISA_USE_POPCNT
  #define MARISA_USE_POPCNT
 #endif  // MARISA_USE_POPCNT
#endif  // MARISA_USE_SSE4A

#ifdef MARISA_USE_SSE4
 #ifndef MARISA_USE_SSE4_2
  #define MARISA_USE_SSE4_2
 #endif  // MARISA_USE_SSE4_2
#endif  // MARISA_USE_SSE4
/* ... */


Someone *needs* to take a serious look at those flags, remove dumb aliases (sse4), put proper REQUIRED_USE and preferably figure out what it all does.
Comment 1 Ulrich Müller gentoo-dev 2015-01-28 22:45:39 UTC
*** Bug 523720 has been marked as a duplicate of this bug. ***
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-01 12:26:40 UTC
And done. Added necessary REQUIRED_USE and killed sse4 as it's only alias to sse4.2.