[PATCH] Fix cross kernel headers location - rhbz#1642037

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

 



Cross compiled kernel headers are installed into /usr/*-linux-gnu/include/
instead of /usr/*-linux-gnu/sys-root/usr/include/ where they can be
found by default by the Fedora cross compiler toolchain.

Because the kernel-cross-headers package can be installed without the
cross glibc-* binutils-* gcc-* counterparts, it has to own the sysroot
directory.

Signed-off-by: Nicolas Chauvet <kwizart@xxxxxxxxx>
---
 kernel.spec | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel.spec b/kernel.spec
index f6d1e2b2a..1ff196b81 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1681,9 +1681,9 @@ find $RPM_BUILD_ROOT/usr/tmp-headers/include \
 
 # Copy all the architectures we care about to their respective asm directories
 for arch in arm arm64 powerpc s390 x86 ; do
-mkdir -p $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/include
-mv $RPM_BUILD_ROOT/usr/tmp-headers/include/arch-${arch}/asm $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/include/
-cp -a $RPM_BUILD_ROOT/usr/tmp-headers/include/asm-generic $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/include/.
+mkdir -p $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/sys-root%{_includedir}
+mv $RPM_BUILD_ROOT/usr/tmp-headers/include/arch-${arch}/asm $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/sys-root%{_includedir}
+cp -a $RPM_BUILD_ROOT/usr/tmp-headers/include/asm-generic $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/sys-root%{_includedir}.
 done
 
 # Remove the rest of the architectures
@@ -1692,7 +1692,7 @@ rm -rf $RPM_BUILD_ROOT/usr/tmp-headers/include/asm-*
 
 # Copy the rest of the headers over
 for arch in arm arm64 powerpc s390 x86 ; do
-cp -a $RPM_BUILD_ROOT/usr/tmp-headers/include/* $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/include/.
+cp -a $RPM_BUILD_ROOT/usr/tmp-headers/include/* $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/sys-root%{_includedir}/.
 done
 
 rm -rf $RPM_BUILD_ROOT/usr/tmp-headers
@@ -1817,7 +1817,7 @@ fi
 
 %if %{with_cross_headers}
 %files cross-headers
-/usr/*-linux-gnu/include/*
+/usr/*-linux-gnu/sysroot
 %endif
 
 # empty meta-package
-- 
2.17.2
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux