Bug 464613

Summary: 11143 unconditional linker option arch/powerpc/lib/crtsavres.o causes external module buildfailure
Product: [Fedora] Fedora Reporter: Thorsten Leemhuis <fedora>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: dwmw2, kernel-maint
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
URL: http://bugzilla.kernel.org/show_bug.cgi?id=11143
Whiteboard:
Fixed In Version: 2.6.26.6-79.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-23 16:39:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
related patch from opensuse's KOTD kernel.src.rpm none

Description Thorsten Leemhuis 2008-09-29 18:19:01 UTC
Created attachment 317996 [details]
related patch from opensuse's KOTD kernel.src.rpm 

Description of problem:
The problem described in http://bugzilla.kernel.org/show_bug.cgi?id=11143 happens on F9 these days. Quoting that bug:

"""
arch/powerpc/Makefile
...
     77 ifeq ($(CONFIG_PPC64),y)
...
     93 else
     94 LDFLAGS_MODULE  += arch/powerpc/lib/crtsavres.o
     95 endif
...

if external modules are build against the source tree, then linking will fail
because there is no arch/powerpc/lib/crtsavres.o binary.

I see a make scripts and make prepare target, which copies
/usr/src/linux/scripts sources to /usr/src/linux-obj/<arch>/<flavor>/
Maybe the ctrsavres.S has to be copied as well?

Now, if I knew how kbuild works, I could provide a patch. But I do not know, so
I opened this bug in the hope that it gets fixed for 2.6.26.1
"""

In the end it looks like this:
"""
  ld -m elf32ppc -r   arch/powerpc/lib/crtsavres.o --build-id -o /home/thl/rpmbuild/BUILD/qc-usb-kmod-0.6.6/qc-usb-0.6.6/quickcam.ko /home/thl/rpmbuild/BUILD/qc-usb-kmod-0.6.6/qc-usb-0.6.6/quickcam.o /home/thl/rpmbuild/BUILD/qc-usb-kmod-0.6.6/qc-usb-0.6.6/quickcam.mod.o
ld: arch/powerpc/lib/crtsavres.o: No such file: No such file or directory

"""
That was building of qc-usb for ppc

Version-Release number of selected component (if applicable):
2.6.26.5-47.fc9.ppc

Additional info:
Seems suse has patch in their kernels; in the changelog I found
"""
* Mi Aug 06 2008 olh
- add patches.suse/ppc-no-LDFLAGS_MODULE.patch
  do not link external modules against arch/powerpc/lib/crtsavres.o
"""

Same problem happens on F8.ppc; didn't check rawhide

P.S.:
Why is there no arch "ppc" in the "Platform" selection of bugzilla?

Comment 1 Thorsten Leemhuis 2008-09-29 18:20:29 UTC
(In reply to comment #0)
> P.S.: Why is there no arch "ppc" in the "Platform" selection of bugzilla?

Ohh, there is powerpc; missed that, sorry

Comment 2 Chuck Ebbert 2008-10-08 22:28:26 UTC
Copied dwmw2's fixes from rawhide in 2.6.26.6-58.rc1.

Comment 3 Fedora Update System 2008-10-14 19:53:08 UTC
kernel-2.6.26.6-46.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/kernel-2.6.26.6-46.fc8

Comment 4 Fedora Update System 2008-10-14 20:01:25 UTC
kernel-2.6.26.6-71.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/kernel-2.6.26.6-71.fc9

Comment 5 Fedora Update System 2008-10-20 20:29:05 UTC
kernel-2.6.26.6-79.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kernel'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8929

Comment 6 Fedora Update System 2008-10-23 16:38:33 UTC
kernel-2.6.26.6-79.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.