GNOME Bugzilla – Bug 615996
doesn't detect HAVE_CPU_I386 or HAVE_CPU_X86_64 properly on Solaris
Last modified: 2010-04-23 13:50:35 UTC
Created attachment 158923 [details] [review] patch fixing identification of when to set HAVE_CPU_I386 or HAVE_CPU_X86_64 On Solaris you can build either 32-bit or 64-bit code on an amd64 bit processor. On such a machine "uname -a" returns: SunOS dhcp-uchi03-250-85 5.11 snv_137 i86pc i386 i86pc So, it doesn't indicate that it is 64-bit. A better way to test on Solaris x86 if building in 32 or 64 bit mode is to check the "__i386" or "__amd64" defines when compiling a test program. The attached patch does this and fixes the problem for Solaris. Can this go upstream?
Since this patch fixes a common/m4 file, it probably should go into all the gstreamer modules, but it seems that it only causes problems when building gst-plugins-good due to the MMX code in goom. Without this patch, the amd64 build of gst-plugins-good fails to build in the goom code since HAVE_CPU_X86_64 isn't set and instead HAVE_CPU_I386 is incorrectly set in this case.
Comment on attachment 158923 [details] [review] patch fixing identification of when to set HAVE_CPU_I386 or HAVE_CPU_X86_64 Looks good... too bad that the host cpu variable on Solaris doesn't make a difference between both architectures.
Ok, committed: commit 4d67bd6f51003ea5c7e7ae75f53ce95acc4c4175 Author: Brian Cameron <brian.cameron@oracle.com> Date: Fri Apr 23 14:34:41 2010 +0100 gst-arch.m4: fix detection on Solaris stop-gap measure to fix CPU/arch detection on solaris, which makes the goom problems work properly on solaris. Probably needs more fixes after the release (use target_* etc.). Fixes #615996. The way we use this stuff seems a bit dodgy, but we can fix that after the release IMO.