Package: kernel-package
Version: 8.135
Severity: wishlist
Tags: patch

Hi,

attached is a patch to make it possible to build kernel-image packages
for the non native archs of a multiarch set, e.g. amd64 on i386.

The patch allows one to set --arch <arch> --cross-compile '-', the
later indicating that packages for the native arch should be build and
the normal gcc should be used.

MfG
        Goswin

-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.8-frosties-2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

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

-- no debconf information
diff -Nru /tmp/x9wz55JTdI/kernel-package-10.038/debian/changelog 
/tmp/lIdLSZmu1O/kernel-package-10.038/debian/changelog
--- /tmp/x9wz55JTdI/kernel-package-10.038/debian/changelog      2006-03-24 
06:09:44.000000000 +0100
+++ /tmp/lIdLSZmu1O/kernel-package-10.038/debian/changelog      2006-03-25 
23:42:34.000000000 +0100
@@ -1,3 +1,13 @@
+kernel-package (10.038-0c0.mrvn.1) unstable; urgency=low
+
+  * Add support to build for the other archs of a multiarch set like
+    i386/amd64. Usage is with --arch <arch> --cross-compile -.
+    + ruleset/misc/defaults.mk: Set CROSS_COMPILE="" if it is '-'.
+    + ruleset/common/archvars.mk: Don't override DEB_HOST_* if
+      CROSS_COMPILE='-'.
+
+ -- Goswin von Brederlow <[EMAIL PROTECTED]>  Sat, 25 Mar 2006 22:38:11 +0000
+
 kernel-package (10.038) unstable; urgency=medium
 
   * The debconf templates broke. 
diff -Nru 
/tmp/x9wz55JTdI/kernel-package-10.038/kernel/ruleset/common/archvars.mk 
/tmp/lIdLSZmu1O/kernel-package-10.038/kernel/ruleset/common/archvars.mk
--- /tmp/x9wz55JTdI/kernel-package-10.038/kernel/ruleset/common/archvars.mk     
2006-03-22 06:16:53.000000000 +0100
+++ /tmp/lIdLSZmu1O/kernel-package-10.038/kernel/ruleset/common/archvars.mk     
2006-03-25 23:36:51.000000000 +0100
@@ -41,7 +41,9 @@
 ifdef KPKG_ARCH
   ifneq ($(strip $(KPKG_ARCH)),powerpc64)
     ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
-      ha:=-a$(KPKG_ARCH)
+      ifneq ($(CROSS_COMPILE),-)
+        ha:=-a$(KPKG_ARCH)
+      endif
     endif
   endif
 endif
diff -Nru /tmp/x9wz55JTdI/kernel-package-10.038/kernel/ruleset/misc/defaults.mk 
/tmp/lIdLSZmu1O/kernel-package-10.038/kernel/ruleset/misc/defaults.mk
--- /tmp/x9wz55JTdI/kernel-package-10.038/kernel/ruleset/misc/defaults.mk       
2006-02-27 17:56:29.000000000 +0100
+++ /tmp/lIdLSZmu1O/kernel-package-10.038/kernel/ruleset/misc/defaults.mk       
2006-03-25 23:38:03.000000000 +0100
@@ -124,7 +124,11 @@
 KERNEL_CROSS:=$(shell echo $(KERNEL_CROSS) | sed -e 's,--$$,-,')
 
 ifneq ($(strip $(KERNEL_CROSS)),)
-  CROSS_ARG:=CROSS_COMPILE=$(KERNEL_CROSS)
+  ifeq ($(KERNEL_CROSS),-)
+    CROSS_ARG:=CROSS_COMPILE=''
+  else
+    CROSS_ARG:=CROSS_COMPILE=$(KERNEL_CROSS)
+  endif
 endif
 
 DEBCONFIG = $(CONFDIR)/config

Reply via email to