Bug 67921

Summary: [bisected commit 883987] crosscompiling fails with util/u_cpu_detect.c:247:4: error: 'asm' undeclared (first use in this function)
Product: Mesa Reporter: Alexandre Demers <alexandre.f.demers>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: sroland
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Alexandre Demers 2013-08-08 22:21:38 UTC
Commit 883987503fc79691398eb024f37480ff083805a3 breaks crosscompilation when building with the following:
baseExec="./autogen.sh --prefix=/usr \
		--enable-debug \
		--enable-osmesa \
		--enable-gbm \
		--enable-xvmc \
		--enable-vdpau \
		--enable-gles1 \
		--enable-gles2 \
		--enable-openvg \
		--enable-xorg \
		--enable-xa \
		--enable-egl \
		--enable-gallium-egl \
		--enable-glx-tls \
		--enable-texture-float \
		--enable-wgl \
		--with-gallium-drivers=r600,swrast,svga \
		--with-dri-drivers= \
		--with-egl-platforms=x11,drm,wayland"
	export CFLAGS='-m32'
	export CXXFLAGS='-m32'
	export LLVM_CONFIG='/usr/bin/llvm-config32'
	export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig"
	Exec32="$baseExec --enable-32-bit --build=x86_64-pc-linux-gnu --host=i686-pc-linux-gnu --libdir=/usr/lib/i386-linux-gnu --includedir=/usr/include/i386-linux-gnu"
	$Exec32

---
It fails with:
  CC       util/u_cpu_detect.lo
util/u_cpu_detect.c: In function 'sse2_has_daz':
util/u_cpu_detect.c:247:4: error: 'asm' undeclared (first use in this function)
    asm volatile ("fxsave %0" :: "m" (fxarea));
    ^
util/u_cpu_detect.c:247:4: note: each undeclared identifier is reported only once for each function it appears in
util/u_cpu_detect.c:247:8: error: expected ';' before 'volatile'
    asm volatile ("fxsave %0" :: "m" (fxarea));
        ^
make[3]: *** [util/u_cpu_detect.lo] Error 1

---
However, compiling normally for my 64bit architecture works fine.


Bad commit 883987503fc79691398eb024f37480ff083805a3
util: try much harder to set DAZ flag
Author
Roland Scheidegger<sroland@vmware.com>
Author date
8/5/13 9:30 PM
Comment 1 Roland Scheidegger 2013-08-08 23:33:07 UTC
(In reply to comment #0)
> However, compiling normally for my 64bit architecture works fine.
Yes, the code in question is never compiled on x64. Weird though when I hacked around the ifdefs to test it on x64 it worked just fine.
Anyway fixed with 8f40fa0e7f47093d6e93ca4dd12569a6f948dae6.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.