[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Kernel build fails with GCC 4.3

On Fri, 01 Feb 2008 22:06:29 +0100, Chuck Ebbert wrote:
> And, after fixing that one we get (on ppc):
> *** ERROR: same build ID in nonidentical files!
>         /usr/lib/debug/lib/modules/2.6.24-14.fc9/vmlinux
>    and  /boot/vmlinuz-2.6.24-14.fc9


vmlinuz-$VER: Not marked as executable and therefore not splitted into
              binary + .debug 
vmlinux: Copied directly into /usr/lib/debug and therefore its stripped part is
         duplicite to the vmlinuz-$VER one


vmlinuz-$VER: Marked as executable, split into a separete vmlinuz-$VER.debug
vmlinux: Just a symlink into vmlinuz-$VER, GDB will load the vmlinuz-$VER.debug
         file for it.  This symlink could be dropped but some tools may expect
         the /lib/modules/$VER/vmlinux file to exist.  Still they will now have
         to deal with the split binary + .debug file for it.

If you agree I can test if it works well, it takes a lot of time to build it.

--- kernel.spec	1 Feb 2008 17:45:46 -0000	1.398
+++ kernel.spec	1 Feb 2008 22:10:44 -0000
@@ -1422,8 +1422,14 @@ BuildKernel() {
     # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
 %if %{with_debuginfo}
-    mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
-    cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
+    if [ $KernelImage != vmlinux ]; then
+      mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
+      cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
+    else
+      # mark it executable so that strip-to-file can strip it
+      chmod u+x $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
+      ln -s %{image_install_path}/vmlinuz-$KernelVer $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer/vmlinux
+    fi 
     find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]