Bug 65314 - multimedia/libxine may not build on some cpu/gcc combos
Summary: multimedia/libxine may not build on some cpu/gcc combos
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: MANTANI Nobutaka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-08 09:10 UTC by Joel Ray Holveck
Modified: 2004-05-12 18:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Ray Holveck 2004-04-08 09:10:18 UTC
This wasn't on my own computer, so I didn't have time to build a
patch, but I think my notes here should be enough to make one easily.

The errant code is in the file
work/xine-lib-1-rc3a/src/post/goom/zoom_filter_xmmx.c on line 123:
"addl %0,%%ebx".

gcc picked %xmm0, which (according to an as error) is invalid for the
addl instruction.  I don't have the details like gcc version, etc; all
I know is that it was on an x86 architecture.

In the .c file, operand %0 is specified as "X"(precalCoef).  On a
hunch, I changed it to "g"(precalCoef) and it compiled fine.  I'm not
sure if that's the best solution or not; I don't know much about
recent (MMX and beyond) x86 architecture stuff.  It may be best to
bounce this off of the libxine guys.

Sorry this PR is so sparse, but I hope there's enough here to get a
resolution.
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2004-04-08 09:11:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->nobutaka

Over to maintainer.
Comment 2 Sven.Schellack 2004-04-12 15:49:38 UTC
Ran into exactly the same problem on my P4 on FreeBSD-CURRENT. After
commenting out CPUTYPE=p4 in /etc/make.conf it compiled without any
problems. Seems to be a gcc-related problem. Haven't tried other gcc
versions(eg. 3.4) with CPUTYPE=p4 set, though. Hope this hint helps.
Comment 3 Joel Ray Holveck 2004-04-13 05:02:44 UTC
> Ran into exactly the same problem on my P4 on FreeBSD-CURRENT. After
> commenting out CPUTYPE=p4 in /etc/make.conf it compiled without any
> problems.

Yes, since %xmm0 doesn't exist on (for instance) the 386, gcc won't
try to use it without knowing the CPU type.

> Seems to be a gcc-related problem.

Well, only to a limited degree.  The original code said, "use any
register whatsoever", when it really wasn't built to allow absolutely
any register whatsoever.  It was the compiler that exposed the
problem, but I wouldn't really consider it a gcc-related problem.
Specifically, gcc is behaving appropriately, and doesn't need to be
changed.

joelh
Comment 4 MANTANI Nobutaka freebsd_committer freebsd_triage 2004-05-12 17:59:28 UTC
State Changed
From-To: open->closed

Fixed, thanks!