Skip to content

Commit

Permalink
kernel-6.1: exclude more object files from devel
Browse files Browse the repository at this point in the history
Now that an unpacked set of kernel-devel files is present in the
buildroot, object files will be found by the `/usr/lib/rpm/brp-strip`
invocation that tries to ensure all files are stripped.

This can lead to build failures if the host and target arch don't
match, and if the target arch requires a host tool to be built. The
object files will be built for the host, and the target's `strip`
command will not recognize the format.

In any case, these object files shouldn't be included, as they may
need to be rebuilt to match the running host architecture at the time
the kernel-devel files are used.

Fixes: 76af8be ("kernel-6.1: also provide uncompressed devel files")

Signed-off-by: Ben Cressey <[email protected]>
  • Loading branch information
bcressey committed Oct 1, 2024
1 parent ab18bc6 commit 4440154
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/kernel-6.1/kernel-6.1.spec
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,20 @@ chmod 600 System.map
\( -name module.lds -o -name vmlinux.lds.S -o -name Platform -o -name \*.tbl \) \
-print

find arch/%{_cross_karch}/{include,lib}/ -type f ! -name \*.o ! -name \*.o.d -print
find arch/%{_cross_karch}/{include,lib}/ -type f ! -name \*.o ! -name \*.o.d ! -name \*.a -print
echo arch/%{_cross_karch}/kernel/asm-offsets.s
echo lib/vdso/gettimeofday.c

for d in \
arch/%{_cross_karch}/tools \
arch/%{_cross_karch}/kernel/vdso ; do
[ -d "${d}" ] && find "${d}/" -type f -print
[ -d "${d}" ] && find "${d}/" -type f ! -name \*.o -print
done

find include -type f -print
find scripts -type f ! -name \*.l ! -name \*.y ! -name \*.o -print

find tools/{arch/%{_cross_karch},include,objtool,scripts}/ -type f ! -name \*.o -print
find tools/{arch/%{_cross_karch},include,objtool,scripts}/ -type f ! -name \*.o ! -name \*.a -print
echo tools/build/fixdep.c
find tools/lib/subcmd -type f -print
find tools/lib/{ctype,hweight,rbtree,string,str_error_r}.c
Expand Down

0 comments on commit 4440154

Please sign in to comment.