SPECS (LINUX_2_6): kernel.spec - fix cross-building when host is ppc or ppc...
sparky
sparky at pld-linux.org
Sat Sep 27 02:27:25 CEST 2008
Author: sparky Date: Sat Sep 27 00:27:25 2008 GMT
Module: SPECS Tag: LINUX_2_6
---- Log message:
- fix cross-building when host is ppc or ppc64
- define HOSTCC
---- Files affected:
SPECS:
kernel.spec (1.441.2.1967 -> 1.441.2.1968)
---- Diffs:
================================================================
Index: SPECS/kernel.spec
diff -u SPECS/kernel.spec:1.441.2.1967 SPECS/kernel.spec:1.441.2.1968
--- SPECS/kernel.spec:1.441.2.1967 Fri Sep 26 23:13:54 2008
+++ SPECS/kernel.spec Sat Sep 27 02:27:17 2008
@@ -449,7 +449,7 @@
%define DepMod /sbin/depmod
%endif
- %ifarch ppc ppc64
+ %if "%{_target_base_arch}" == ppc || "%{_target_base_arch}" == "ppc64"
%define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
%endif
%else
@@ -460,6 +460,7 @@
%endif
%define DepMod /sbin/depmod
%endif
+%define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
%define __features Netfilter module dated: %{netfilter_snap}\
%{?with_grsec_full:Grsecurity full support - enabled}\
@@ -1164,27 +1165,27 @@
%{?debug:set -x}
echo "Building kernel $1 ..."
install .config %{defconfig}
- %{__make} %CrossOpts mrproper \
+ %{__make} %{MakeOpts} mrproper \
RCS_FIND_IGNORE='-name build-done -prune -o'
ln -sf %{defconfig} .config
- %{__make} %CrossOpts clean \
+ %{__make} %{MakeOpts} clean \
RCS_FIND_IGNORE='-name build-done -prune -o'
- %{__make} %CrossOpts include/linux/version.h \
+ %{__make} %{MakeOpts} include/linux/version.h \
%{?with_verbose:V=1}
- %{__make} %CrossOpts scripts/mkcompile_h \
+ %{__make} %{MakeOpts} scripts/mkcompile_h \
%{?with_verbose:V=1}
# make does vmlinux, modules and bzImage at once
%ifarch sparc64
- %{__make} %CrossOpts image \
+ %{__make} %{MakeOpts} image \
%{?with_verbose:V=1}
- %{__make} %CrossOpts modules \
+ %{__make} %{MakeOpts} modules \
%{?with_verbose:V=1}
%else
- %{__make} %CrossOpts \
+ %{__make} %{MakeOpts} \
%{?with_verbose:V=1}
%endif
}
@@ -1230,7 +1231,7 @@
install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
%endif
- %{__make} %CrossOpts modules_install \
+ %{__make} %{MakeOpts} modules_install \
%{?with_verbose:V=1} \
DEPMOD=%DepMod \
INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
@@ -1261,7 +1262,7 @@
ln -sf %{defconfig} .config
install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
rm -f include/linux/autoconf.h
-%{__make} %CrossOpts include/linux/autoconf.h
+%{__make} %{MakeOpts} include/linux/autoconf.h
install include/linux/autoconf.h \
$KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
install .config \
@@ -1269,7 +1270,7 @@
BuildKernel
PreInstallKernel
-%{__make} %CrossOpts include/linux/utsrelease.h
+%{__make} %{MakeOpts} include/linux/utsrelease.h
cp include/linux/utsrelease.h{,.save}
cp include/linux/version.h{,.save}
cp scripts/mkcompile_h{,.save}
@@ -1303,7 +1304,7 @@
cd $RPM_BUILD_ROOT%{_kernelsrcdir}
-%{__make} %CrossOpts mrproper archclean \
+%{__make} %{MakeOpts} mrproper archclean \
RCS_FIND_IGNORE='-name build-done -prune -o'
if [ -e $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h ]; then
@@ -1316,7 +1317,7 @@
cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \
$RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
-%{__make} %CrossOpts mrproper
+%{__make} %{MakeOpts} mrproper
mv -f include/linux/utsrelease.h.save $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/utsrelease.h
cp include/linux/version.h{.save,}
cp scripts/mkcompile_h{.save,}
@@ -1673,6 +1674,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.441.2.1968 2008/09/27 00:27:17 sparky
+- fix cross-building when host is ppc or ppc64
+- define HOSTCC
+
Revision 1.441.2.1967 2008/09/26 21:13:54 sparky
- remove useless CONFIG_TOI=n on ppc, it's value is allways set to 'y' if
CONFIG_TOI_CORE is set
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/kernel.spec?r1=1.441.2.1967&r2=1.441.2.1968&f=u
More information about the pld-cvs-commit
mailing list