Bug 86481 - libsdl-1.2.8-r1 undefined references with gcc-2.95
|
Bug#:
86481
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: All
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: games@gentoo.org
|
Reported By: liverbugg@juno.com
|
|
Component: Applications
|
|
|
URL:
|
|
Summary: libsdl-1.2.8-r1 undefined references with gcc-2.95
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2005-03-24 00:45 0000
|
trying to link agains libsdl gives this:
/usr/lib/libSDL.so: undefined reference to `_MMX_UbluRGB'
/usr/lib/libSDL.so: undefined reference to `_MMX_Vred5x5'
/usr/lib/libSDL.so: undefined reference to `_MMX_VgrnRGB'
/usr/lib/libSDL.so: undefined reference to `_MMX_grn565'
/usr/lib/libSDL.so: undefined reference to `_MMX_VredRGB'
/usr/lib/libSDL.so: undefined reference to `_MMX_Vgrn565'
/usr/lib/libSDL.so: undefined reference to `_MMX_FF00w'
/usr/lib/libSDL.so: undefined reference to `_MMX_Ugrn565'
/usr/lib/libSDL.so: undefined reference to `_MMX_Ycoeff'
/usr/lib/libSDL.so: undefined reference to `_MMX_UgrnRGB'
/usr/lib/libSDL.so: undefined reference to `_MMX_00FFw'
/usr/lib/libSDL.so: undefined reference to `_MMX_red565'
/usr/lib/libSDL.so: undefined reference to `_MMX_0080w'
/usr/lib/libSDL.so: undefined reference to `_MMX_Ublu5x5'
This is because of the patch from bug 75392. Better patch that works for both gcc2 and gcc3 follows.
added to portage, thanks :)
the logic to apply the old 1.2.8-gcc2-asm.patch only on gcc2 in the ebuild
should be removed as its no longer needed and it is broken if they are both
applied.
* Applying libsdl-1.2.8-gcc2.patch.bz2 ... [ ok
]
* Applying 1.2.8-keyrepeat.patch ... [ ok
]
* Applying 1.2.8-linux26.patch ... [ ok
]
* Applying 1.2.8-amd64-endian.patch ... [ ok
]
* Applying 1.2.8-gcc2-asm.patch ...
* Failed Patch: 1.2.8-gcc2-asm.patch !
* ( /mnt/portage/portage/media-libs/libsdl/files/1.2.8-gcc2-asm.patch )
*
* Include in your bugreport the contents of:
*
*
/mnt/portage/tmp/portage/libsdl-1.2.8-r1/temp/1.2.8-gcc2-asm.patch-31520.out
!!! ERROR: media-libs/libsdl-1.2.8-r1 failed.
!!! Function epatch, Line 402, Exitcode 0
!!! Failed Patch: 1.2.8-gcc2-asm.patch!
whoops, i didnt notice because i have gcc-2 :)
fixed in cvs, sorry about that
This patch causes the compile of libsdl-1.2.8-r1 to fail when compiling with
GCC 3.4.3. See this bug report:
http://bugs.gentoo.org/show_bug.cgi?id=87077
There is a fix that involves disabling a compile flag, but that is a hack for a
bad patch. This patch is flawed and needs fixing. I suggest disabling it for
gcc versions greater than 3.4.
Remove the volatiles added in the top section of the patch and it compiles with
-fforce-addr on gcc-3.4.3 (bug 87077) and still works with gcc2.
This patch is from upstream, and I don't know if they had a reason for adding
volatile or not, or if they support using -fforce-addr.