configure: don't optimize away avx2 test functions
PATCH 1/1 configure: don't optimize away avx2 test functions
The configure script contains an embedded test C function to test for avx2 support. It gets optimized away with gcc 4.7 on wheezy.
Add __attribute__((optimize("O0"))) to it in order to prevent optimizing it away
Signed-off-by Mohammed Gamal <[email protected]>
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
@@ -1782,7 +1782,7 @@ fi cat > $TMPC << EOF static void bar(void) {} -static void *bar_ifunc(void) {return (void*) bar;} +static void __attribute__((optimize("O0"))) *bar_ifunc(void) {return (void*) bar;} static void foo(void) __attribute__((ifunc("bar_ifunc"))); int main(void) { foo(); return 0; } EOF
Signature · 1 line
1.9.1
Please drop this patch. I see it has already been fixed upstream
Quoted 27 lines · Mohammed Gamal
The configure script contains an embedded test C function to test for avx2 support. It gets optimized away with gcc 4.7 on wheezy.
Add __attribute__((optimize("O0"))) to it in order to prevent optimizing it awaySigned-off-by Mohammed Gamal <[email protected]>--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)configure +1
-2@@ -1782,7 +1782,7 @@ fi cat > $TMPC << EOF static void bar(void) {} -static void *bar_ifunc(void) {return (void*) bar;} +static void __attribute__((optimize("O0"))) *bar_ifunc(void) {return (void*) bar;} static void foo(void) __attribute__((ifunc("bar_ifunc"))); int main(void) { foo(); return 0; } EOF --1.9.1
Signature · 14 lines
Mohammed Gamal Software Engineer ProfitBricks GmbH Greifswalder Straße 207 D - 10405 Berlin Tel: +49 30 577 008 20 Email: [email protected] Web: http://www.profitbricks.de Sitz der Gesellschaft: Berlin. Registergericht: Amtsgericht Charlottenburg, HRB 125506B. Geschäftsführer: Andreas Gauger, Achim Weiss.