1
0

0003-disable-avx2_opt-with-musl.patch 623 B

1234567891011121314
  1. --- a/configure.orig 2016-11-22 17:35:12.069598617 +0800
  2. +++ b/configure 2016-11-22 18:24:01.042515353 +0800
  3. @@ -1789,7 +1789,10 @@ static void foo(void) __attribute__((ifu
  4. int main(void) { foo(); return 0; }
  5. EOF
  6. if compile_prog "-mavx2" "" ; then
  7. - if readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then
  8. + if readelf --program-headers $TMPE | grep -iq 'Requesting program interpreter: .*ld-musl'; then
  9. + # ifunc support is not available with dynamic linker of musl
  10. + avx2_opt="no"
  11. + elif readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then
  12. avx2_opt="yes"
  13. fi
  14. fi