mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
kbuild: rpm-pkg: record ARCH option in spec file
Currently, we rely on the top Makefile defining ARCH option when we run 'make rpm-pkg' or 'make binrpm-pkg'. It does not apply when we run 'make srcrpm-pkg', and separately run 'rpmbuild' for the generated SRPM. This is a problem for cross-build. Just like the Debian package, save the value of ARCH in the spec file. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
fe809b8271
commit
a06d9ef897
@ -38,8 +38,10 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
|
||||
# $S: this line is enabled only when building source package
|
||||
# $M: this line is enabled only when CONFIG_MODULES is enabled
|
||||
sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
|
||||
%define ARCH ${ARCH}
|
||||
|
||||
%{!?make: %define make make}
|
||||
%define makeflags %{?_smp_mflags}
|
||||
%define makeflags %{?_smp_mflags} ARCH=%{ARCH}
|
||||
|
||||
Name: kernel
|
||||
Summary: The Linux Kernel
|
||||
|
Loading…
Reference in New Issue
Block a user