linux: fix missing HOST_CC_ARCH in module compilation in kernel/module all
authorJohn Bowler <jbowler@nslu2-linux.org>
Mon, 30 Jan 2006 03:05:50 +0000 (03:05 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Mon, 30 Jan 2006 03:05:50 +0000 (03:05 +0000)
 - define TARGET_KERNEL_CC_ARCH to define arch specific compiler options
   in machine.conf.  The default for the kernel is "" (empty), although
   it should probably be TARGET_CC_ARCH in the future.  The default for
   modules is TARGET_CC_ARCH

15 files changed:
classes/kernel.bbclass
classes/module-base.bbclass
packages/ixp425-eth/ixp400-eth_1.4.bb
packages/ixp425-eth/ixp400-eth_1.5.bb
packages/ixp425-eth/ixp425-eth_1.1.bb
packages/ixp425-eth/ixp425-eth_1.2.bb
packages/ixp4xx/ixp-osal_1.5.bb
packages/ixp4xx/ixp-osal_2.0.bb
packages/ixp4xx/ixp-osal_2.1.bb
packages/ixp4xx/ixp4xx-csr_1.4.bb
packages/ixp4xx/ixp4xx-csr_1.5.bb
packages/ixp4xx/ixp4xx-csr_2.0.bb
packages/ixp4xx/ixp4xx-csr_2.1.bb
packages/linux/ixp4xx-kernel.inc
packages/linux/nslu2-kernel.inc

index 86468b6..c913a5c 100644 (file)
@@ -24,8 +24,16 @@ KERNEL_RELEASE ?= "${PV}${KERNEL_LOCALVERSION}"
 KERNEL_CCSUFFIX ?= ""
 KERNEL_LDSUFFIX ?= ""
 
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}"
-KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}"
+# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
+# specific options necessary for building the kernel and modules.
+#FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
+TARGET_CC_KERNEL_ARCH ?= ""
+HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
+TARGET_LD_KERNEL_ARCH ?= ""
+HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
+
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
+KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
 
 KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
 KERNEL_IMAGEDEST = "boot"
index 3aa7072..d308e20 100644 (file)
@@ -10,8 +10,16 @@ export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')
 KERNEL_OBJECT_SUFFIX = "${@[".o", ".ko"][base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion') > "2.6.0"]}"
 KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}"
 KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}"
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_ARCH}"
-KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}"
+
+# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
+# specific options necessary for building the kernel and modules.
+TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
+HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
+TARGET_LD_KERNEL_ARCH ?= ""
+HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
+
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
+KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
 
 # kernel modules are generally machine specific
 PACKAGE_ARCH = "${MACHINE_ARCH}"
index 6e14f67..81dc5e9 100644 (file)
@@ -25,12 +25,6 @@ RPROVIDES = "ixp-eth"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 # This is a somewhat arbitrary choice:
 OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
 
index e540774..986d5dd 100644 (file)
@@ -33,12 +33,6 @@ RPROVIDES = "ixp-eth"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 # This is a somewhat arbitrary choice:
 OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
 
index 53e7131..43330d6 100644 (file)
@@ -24,12 +24,6 @@ RPROVIDES = "ixp-eth"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 do_pre_patch () {
        patcher -p 0 -i ixp425_eth_1_1_update_nf_bridge.patch
        patcher -f -p 0 -i ixp425_eth.c.patch
index 3cc9a6c..a3587e8 100644 (file)
@@ -23,12 +23,6 @@ RPROVIDES = "ixp-eth"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 # This is a somewhat arbitrary choice:
 OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
 
index c0e0cb9..66cf9e6 100644 (file)
@@ -27,12 +27,6 @@ COMPATIBLE_HOST = "^armeb-linux.*"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \
                'LD=${KERNEL_LD}' \
                'AR=${AR}' \
index c5ddf66..84929d5 100644 (file)
@@ -33,12 +33,6 @@ COMPATIBLE_HOST = "^arm.*-linux.*"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 IX_TARGET = "linux${ARCH_BYTE_SEX}"
 
 EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \
index 4fca2c3..48d4355 100644 (file)
@@ -37,12 +37,6 @@ COMPATIBLE_HOST = "^arm.*-linux.*"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 IX_TARGET = "linux${ARCH_BYTE_SEX}"
 IX_ENSURE = ""
 #IX_ENSURE = "IX_OSAL_ENSURE_ON=1"
index 788d303..7146d9e 100644 (file)
@@ -31,12 +31,6 @@ COMPATIBLE_HOST = "^armeb-linux.*"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 #LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
 CFLAGS = "-fno-common -D__KERNEL__ -DMODULE -D__linux -DCPU=33 -DXSCALE=33 \
          -D__LINUX_ARM_ARCH__=5 \
index 2feef7e..debdeb4 100644 (file)
@@ -30,12 +30,6 @@ COMPATIBLE_HOST = "^armeb-linux.*"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 OSAL_PATH = "lib/linux/linuxbe/ixp400"
 # This is a somewhat arbitrary choice:
 OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
index 963ecc2..3fc86c2 100644 (file)
@@ -38,12 +38,6 @@ COMPATIBLE_HOST = "^arm.*-linux.*"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 IX_TARGET = "linux${ARCH_BYTE_SEX}"
 
 OSAL_PATH = "lib/ixp425/linux/${IX_TARGET}"
index 93ac8aa..a91cc25 100644 (file)
@@ -44,12 +44,6 @@ COMPATIBLE_HOST = "^arm.*-linux.*"
 
 inherit module
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 IX_TARGET = "linux${ARCH_BYTE_SEX}"
 IX_ENSURE = ""
 #IX_ENSURE = "IX_OSAL_ENSURE_ON=1"
index b9d09c0..29b32e8 100644 (file)
@@ -171,12 +171,6 @@ CMDLINE  = "${CMDLINE_ROOT}"
 CMDLINE += "${CMDLINE_DEBUG}"
 CMDLINE += "${CMDLINE_CONSOLE}"
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 # Set EXTRAVERSION and LOCALVERSION to "" so that the kernel version
 # remains pinned to the x.y.z form, also turn off the directory
 # printing which provides almost all the output of an incremental build.
index ee0d233..d30bcf7 100644 (file)
@@ -172,12 +172,6 @@ CMDLINE_ROOT ?= "root=/dev/mtdblock4 rw rootfstype=jffs2 mem=32M@0x00000000 init
 CMDLINE_DEBUG ?= ""
 CMDLINE = "${CMDLINE_ROOT} ${CMDLINE_KERNEL_OPTIONS} ${CMDLINE_DEBUG} ${CMDLINE_CONSOLE}"
 
-# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
-# required.  Notice that this has to be done for each separately built
-# module as well!
-KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
-KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
-
 # Set EXTRAVERSION and LOCALVERSION to "" so that the kernel version
 # remains pinned to the x.y.z form, also turn off the directory
 # printing which provides almost all the output of an incremental build.