Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26657 - psemu-peopsspu-1.0.7-r1 fails building because of bad Makefile
Summary: psemu-peopsspu-1.0.7-r1 fails building because of bad Makefile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-14 20:16 UTC by Matthias Langhammer
Modified: 2003-08-21 17:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix compiling on other processors than pentium (psemu-peopsspu-1.0.7-r1.ebuild.diff,418 bytes, patch)
2003-08-14 20:44 UTC, Matthias Langhammer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Langhammer 2003-08-14 20:16:33 UTC
DESCRIPTION:
------------
psemu-peopsspu can fail from building because the Makefile adds the deprecated
option "-mpentium" to CFLAGS


REASON:
-------
The option "-mpentium" is deprecated and can break the build on other processors
than pentium.
The bug is reproducable by setting CFLAGS="-march=athlon-tbird
-fprefetch-loop-arrays".


SOLUTION:
--------- 
Remove the "-mpentium" from the Makefile.
This breaks nothing and owners of pentiums have their "-march=pentium" in
/etc/make.conf.


ERROR-LOG:
----------

gcc -march=athlon-tbird -fprefetch-loop-arrays  -fPIC -c -Wall -mpentium -O3
-ffast-math -fomit-frame-pointer -DUSEALSA  dma.c
`-mpentium' is deprecated. Use `-march=pentium' or `-mcpu=pentium' instead.
dma.c: In function `SPUreadDMAMem':
dma.c:64: internal error: Floating point exception
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
make: *** [dma.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from spu.c:198:
adsr.c: In function `InitADSR':
adsr.c:65: internal error: Floating point exception
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
make: *** [spu.o] Error 1

!!! ERROR: app-emulation/psemu-peopsspu-1.0.7-r1 failed.
!!! Function src_compile, Line 43, Exitcode 2
!!! (no error message)
Comment 1 Matthias Langhammer 2003-08-14 20:44:08 UTC
Created attachment 16123 [details, diff]
patch to fix compiling on other processors than pentium

apply patch with:

cd /usr/portage/app-emulation/psemu-peopsspu
patch < psemu-peopsspu-1.0.7-r1.ebuild.diff
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2003-08-15 05:37:56 UTC
This is your error:

dma.c:64: internal error: Floating point exception

This has nothing to do with the -mpentium being in the source, at least at first glance.  Have you tried removing the -mpentium from the Makefile and compiling it by hand to see if it fails?  If removing the flag solves the problem, then I'll modify the ebuild to fix the Makefile.
Comment 3 Matthias Langhammer 2003-08-15 06:00:23 UTC
Yes, I tried it.
Removing the "-mpentium" from the Makefile fixes the build on my "-march=athlon-tbird".

Seems that gcc gets confused how to optimize the code if there is "-march=athlon-tbird -mpentium" together.

The modified sed-expression in my .diff removes the -mpentium from the Makefile. This will have no bad sideeffects to anybody, because every normal gentoo-user with a pentium processor has his "-mpentium" or better "-march=pentium" in his CFLAGS.

Please remove the flag from the Makefile. I think there are many people without pentium processor out there ;-)
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2003-08-15 06:31:26 UTC
Fixed in CVS
Comment 5 SpanKY gentoo-dev 2003-08-21 17:27:42 UTC
http://bugs.gentoo.org/show_bug.cgi?id=25461#c6 explains the issue better :)