This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix x86_64 multiarch build (sse2svx problems)

An x86_64 build (multiarch-enabled, as is the default) failed with:

/scratch/jmyers/fsf/glibc/build/math/libm_pic.a(e_atan2.os): In function `__ieee754_atan2':
/scratch/jmyers/fsf/glibc/glibc/math/../sysdeps/x86_64/fpu/multiarch/e_atan2.c:15: undefined reference to `__ieee754_atan2_avx'
/scratch/jmyers/fsf/glibc/build/math/libm_pic.a(e_exp.os): In function `__ieee754_exp':
/scratch/jmyers/fsf/glibc/glibc/math/../sysdeps/x86_64/fpu/multiarch/e_exp.c:15: undefined reference to `__ieee754_exp_avx'

This appears to be because a recent commit was incomplete, changing a
makefile test to test config-cflags-sse2avx without adding a
definition of that variable; in addition, there was a typo in a CFLAGS
setting under that condition.  I've committed this patch to fix this;
tested x86_64.

I'd like to encourage everyone to be careful about testing the patches
they submit or commit with both build and testsuite runs in advance of
submission; there have been multiple other recent instances where I've
tried to test one change and found some independent preexisting
breakage, either broken build or broken testcases.  I know from
experience that it's very easy to think something is obvious and then
find that in fact it breaks the build.  I think it would be overkill
to require builds for all affected targets in all cases - for patches
requiring mechanical all-architectures updates that's a recipe for
either the patch not getting in at all, or for only some architectures
being updated and others staying out of sync - but if in doubt, and if
testing is easy, it's a very good idea to do tests of building and
running the testsuite and check that they did actually build the code
that you changed.

In general it's a good thing that the expected testsuite state on
x86_64 is either all tests passing or very close to that.  It is
however unfortunate that you can't readily run the whole testsuite,
even if some tests fail, and get out of it a clean report of what
passed and what failed (this is possible by running make with
debugging enabled and errors ignored and postprocessing the debugging
output, but that's hardly a convenient test harness); that would
facilitate autobuilders reporting the state for their architectures,
even if the expected state isn't quite 100% clean everywhere.

2012-01-30  Joseph Myers  <>

	* (libc_cv_cc_sse2avx): AC_SUBST.
	* configure: Regenerate.
	* (config-cflags-sse2avx): Define.
	* sysdeps/x86_64/fpu/multiarch/Makefile (CFLAGS-slowexp-avx.c):
	Fix typo.

diff --git a/ b/
index d937952..75061f6 100644
--- a/
+++ b/
@@ -36,6 +36,7 @@ asflags-cpu = @libc_cv_cc_submachine@
 config-cflags-sse4 = @libc_cv_cc_sse4@
 config-cflags-avx = @libc_cv_cc_avx@
+config-cflags-sse2avx = @libc_cv_cc_sse2avx@
 config-cflags-novzeroupper = @libc_cv_cc_novzeroupper@
 config-asflags-i686 = @libc_cv_as_i686@
diff --git a/configure b/configure
index 71e8de1..508e1bb 100755
--- a/configure
+++ b/configure
@@ -620,6 +620,7 @@ use_ldconfig
@@ -7643,6 +7644,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIC is default" >&5
 $as_echo_n "checking whether -fPIC is default... " >&6; }
 if ${libc_cv_pic_default+:} false; then :
diff --git a/ b/
index 5fd6d85..0499d3c 100644
--- a/
+++ b/
@@ -2154,6 +2154,7 @@ dnl sysdeps/CPU/ checks set this via arch-specific asm tests
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 4b5c173..2a38ffc 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -48,7 +48,7 @@ CFLAGS-mpexp-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-mplog-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-slowexp-avx.c = -sse2mavx -DSSE2AVX
+CFLAGS-slowexp-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]