]> git.openpandora.org Git - openembedded.git/commitdiff
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 86468b66424c0236ad774dd64be12a9a717ab2c7..c913a5c38d4d5f597914d77c3bbfbb78243f3590 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 3aa70723707129bae3f0154c456149268f596e18..d308e205b1d6e594e97918b45064e74bf6a322fe 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 6e14f67c0e0724558b78ac0af07ffb9ff27adac1..81dc5e9ec0c60ce309fb229a6233a8a11640ac22 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 e54077460bd304fa6c42ae0bae0f357d2e45c147..986d5ddf3766a3dea6643050b9b2bd831987befc 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 53e713178a8017ae9a09e73be45e2d6524b8c3f8..43330d6de27eb1b82cfee343fae7c2c025e67f8f 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 3cc9a6c70ae72728b27f34d765afcb67442bced2..a3587e80640e76b52a9173bf6b6a994e76317c68 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 c0e0cb930cce2548c1f6dc6d3f94224eadc76b2f..66cf9e6b067292329f91b81f6ea0839af6779289 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 c5ddf66bef19996a512aabe1a5bde95729a871f6..84929d5cb5d39ebab2081eac971e13dbf7c10dc1 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 4fca2c3a1e4f4f01ae579678488816e801895d46..48d435564879b20efbc7758ec7d9a1be1742e703 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 788d303c678381d24bc872e26e927e0807978b19..7146d9e4022ae2e48dfa6687629acb229c3e223a 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 2feef7ea4a959193b1d1702ec1685e4baf128acc..debdeb404fcd3354c1003c1a566771b0bbbc3d22 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 963ecc2f645967a4ae8f94f2588e3c9b31a7915f..3fc86c272dad4cbd78660bfee756d42b822003b4 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 93ac8aab6fdb5bad7987adfe3e53b165ac5616e9..a91cc25cc1d0f6c66727c8b89c15dd6ccaf62a77 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 b9d09c05654c320a15d1be2395c2c4b9d7936017..29b32e80d8931b3ce0dbc9b93fe46461ec333fde 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 ee0d233ac29f5bace2328d9d1f0e14187fedf865..d30bcf77ce7b8a0de07ad6d163b31599e4c73ad2 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.