Package: kernel-package
Version: 8.124
Severity: minor
Tags: patch

When using --cross-compile XXX, make-kpkg sets the environment
variable CROSS_COMPILE=XXX. It subsequently also sets
CROSS_ARG="CROSS_COMPILE=XXX-".

Most invocations of Make for the kernel tree's toplevel Makefile
are of the form make ... $CROSS_ARG ... target. And this works fine.
However, in some cases $CROSS_ARG is missing an this causes warnings
to be displayed as make picks up the value of CROSS_COMPILE from
the environment, which is XXX instead of XXX-.

I think that the warnings are harmless but it is at the very least 
confusing. The attached patch seems to resolve the problem.
However, perhaps a better fix would be to have make-kpkg
set CROSS_COMPILE=XXX- and abandon CROSS_ARG all together.


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-rc2
Locale: LANG=ja_JP.eucJP, LC_CTYPE=ja_JP.eucJP (charmap=EUC-JP) (ignored: 
LC_ALL set to ja_JP.eucJP)

Versions of packages kernel-package depends on:
ii  dpkg                          1.10.24    Package maintenance system for Deb
ii  dpkg-dev                      1.10.24    Package building tools for Debian
ii  gcc [c-compiler]              4:3.3.4-3  The GNU C compiler
ii  gcc-3.2 [c-compiler]          1:3.2.3-9  The GNU C compiler
ii  gcc-3.3 [c-compiler]          1:3.3.5-2  The GNU C compiler
ii  make                          3.80-9     The GNU version of the "make" util
ii  perl                          5.8.4-3    Larry Wall's Practical Extraction 

-- no debconf information

-- 
Horms
--- /usr/share/kernel-package/rules     2005-03-02 16:50:12.000000000 +0900
+++ /usr/share/kernel-package/rules     2005-03-02 17:29:06.000000000 +0900
@@ -157,11 +157,11 @@
 
 # Could have used :=, but some patches do seem to patch the
 # Makefile. perhaps deferring the rule makes that better
-VERSION      :=$(shell $(MAKE) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_VERSION)
-PATCHLEVEL   :=$(shell $(MAKE) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_PATCHLEVEL)
-SUBLEVEL     :=$(shell $(MAKE) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_SUBLEVEL)
-EXTRA_VERSION:=$(shell $(MAKE) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_EXTRAVERSION)
-LOCALVERSION :=$(shell $(MAKE) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_LOCALVERSION)
+VERSION      :=$(shell $(MAKE) $(CROSS_ARG) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_VERSION)
+PATCHLEVEL   :=$(shell $(MAKE) $(CROSS_ARG) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_PATCHLEVEL)
+SUBLEVEL     :=$(shell $(MAKE) $(CROSS_ARG) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_SUBLEVEL)
+EXTRA_VERSION:=$(shell $(MAKE) $(CROSS_ARG) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_EXTRAVERSION)
+LOCALVERSION :=$(shell $(MAKE) $(CROSS_ARG) --no-print-directory -sf 
$(DEBDIR)/kernel_version.mk debian_LOCALVERSION)
 
 
 
@@ -1800,7 +1800,8 @@
 real_stamp_clean:
        test ! -f .config || cp -pf .config config.precious
        test -f Makefile && \
-            $(MAKE) $(FLAV_ARG) $(EXTRAV_ARG) ARCH=$(KERNEL_ARCH) distclean
+            $(MAKE) $(FLAV_ARG) $(EXTRAV_ARG) $(CROSS_ARG) \
+               ARCH=$(KERNEL_ARCH) distclean
        test ! -f config.precious || mv -f config.precious .config
 ifeq ($(strip $(patch_the_kernel)),YES)
        $(deb_rule) unpatch_now
@@ -1902,7 +1903,8 @@
 endif
        $(install_file) debian/changelog         
$(SOURCE_SRC)/Debian.src.changelog
        (cd $(SOURCE_SRC); \
-            $(MAKE) $(EXTRAV_ARG) $(FLAV_ARG) ARCH=$(KERNEL_ARCH) distclean)
+            $(MAKE) $(EXTRAV_ARG) $(FLAV_ARG) $(CROSS_ARG) \
+               ARCH=$(KERNEL_ARCH) distclean)
        (cd $(SOURCE_SRC);         rm -f stamp-building $(STAMPS_TO_CLEAN))
        (cd $(SOURCE_SRC);         \
          [ ! -d scripts/cramfs ]   || make -C scripts/cramfs distclean ; )
@@ -2338,7 +2340,7 @@
        dpkg --build $(IMAGE_TOP) $(DEB_DEST)
        rm -f -r $(IMAGE_TOP)
 ifeq ($(strip $(do_clean)),YES)
-       $(MAKE) $(EXTRAV_ARG) $(FLAV_ARG) ARCH=$(KERNEL_ARCH) \
+       $(MAKE) $(EXTRAV_ARG) $(FLAV_ARG) $(CROSS_ARG) ARCH=$(KERNEL_ARCH) \
                                 clean
        rm -f stamp-build
 endif

Reply via email to