Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 204985 - VIDEO_CARDS="nv" x11-base/x11-drm-20071019 needs __ucmpdi2 which isnt in the kernel
Summary: VIDEO_CARDS="nv" x11-base/x11-drm-20071019 needs __ucmpdi2 which isnt in the ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: PPC Linux
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-09 02:19 UTC by hiyuh
Modified: 2008-09-13 01:28 UTC (History)
1 user (show)

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


Attachments
patch for __ucmpdi2 workaround (__ucmpdi2_workaround.patch,2.34 KB, patch)
2008-01-09 02:20 UTC, hiyuh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hiyuh 2008-01-09 02:19:33 UTC
x11-base/x11-drm-20071019 w/ VIDEO_CARDS="nv" on ~ppc
(w/ sys-devel.gcc-4.2.2) produces unknown symbol __ucmpdi2.
It comes from wrong code generation by sys-devel/gcc-4.2.2
for 64bit comparison in nouveau.ko. Note, I didn't investigate
whether it's gentoo-patched one specific or not.

Reproducible: Always

Steps to Reproduce:
1. VIDEO_CARDS="nv" emerge x11-base/x11-drm-20071019 on ~ppc.
2.
3.

Actual Results:  
nouveau.ko produces unknown symbol __ucmpdi2.

Expected Results:  
*.ko shouldn't have any unknown symbol.

A workaround I did is to use patched gentoo-sources.
I'll attach it later.
Comment 1 hiyuh 2008-01-09 02:20:19 UTC
Created attachment 140516 [details, diff]
patch for __ucmpdi2 workaround
Comment 2 SpanKY gentoo-dev 2008-01-09 17:58:06 UTC
this isnt a bug in gcc ... dont do 64bit math in the kernel
Comment 3 SpanKY gentoo-dev 2008-01-09 19:19:56 UTC
ugh, no ... the last thing you want to do is actually add these symbols to the kernel.  they arent in there by design: you dont want to do 64bit emulated math in kernel space.

looks like the issue comes up as gcc does not optimize all cases ... so while the x11-drm package is still broken (imo), by adding better optimization to the compiler, you should be able build x11-drm without these sym references ...
Comment 4 hiyuh 2008-02-06 16:16:35 UTC
FYI, same bug was already filed at upstream bugzilla.
Comment 5 Bryan Stine (RETIRED) gentoo-dev 2008-09-13 01:28:37 UTC
This has been fixed in kernel 2.6.25 upstream, according to the fdo bug.

In patchball 0.2 for x11-drm 20071019, I added the patch (with a kernel version check so as to not collide with the function in newer kernels) for kernels without the fix.

This is hopefully good now for users affected. I don't have a PPC so I can't check to make sure if the code works as it should. Any problems, just reopen here.

Thanks.