diff options
author | John Bowler <jbowler@nslu2-linux.org> | 2006-01-30 03:05:50 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-01-30 03:05:50 +0000 |
commit | 9f00cacbccf02db56cb4e134a8dcecb6d13205d9 (patch) | |
tree | 1a7ea5199565885e67fbd4a5cbc211847bdcd0f8 | |
parent | f0c27346be9b14f69a4fd1424db329d58a505ce7 (diff) |
linux: fix missing HOST_CC_ARCH in module compilation in kernel/module all
- 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
-rw-r--r-- | classes/kernel.bbclass | 12 | ||||
-rw-r--r-- | classes/module-base.bbclass | 12 | ||||
-rw-r--r-- | packages/ixp425-eth/ixp400-eth_1.4.bb | 6 | ||||
-rw-r--r-- | packages/ixp425-eth/ixp400-eth_1.5.bb | 6 | ||||
-rw-r--r-- | packages/ixp425-eth/ixp425-eth_1.1.bb | 6 | ||||
-rw-r--r-- | packages/ixp425-eth/ixp425-eth_1.2.bb | 6 | ||||
-rw-r--r-- | packages/ixp4xx/ixp-osal_1.5.bb | 6 | ||||
-rw-r--r-- | packages/ixp4xx/ixp-osal_2.0.bb | 6 | ||||
-rw-r--r-- | packages/ixp4xx/ixp-osal_2.1.bb | 6 | ||||
-rw-r--r-- | packages/ixp4xx/ixp4xx-csr_1.4.bb | 6 | ||||
-rw-r--r-- | packages/ixp4xx/ixp4xx-csr_1.5.bb | 6 | ||||
-rw-r--r-- | packages/ixp4xx/ixp4xx-csr_2.0.bb | 6 | ||||
-rw-r--r-- | packages/ixp4xx/ixp4xx-csr_2.1.bb | 6 | ||||
-rw-r--r-- | packages/linux/ixp4xx-kernel.inc | 6 | ||||
-rw-r--r-- | packages/linux/nslu2-kernel.inc | 6 |
15 files changed, 20 insertions, 82 deletions
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 86468b6642..c913a5c38d 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -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" diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass index 3aa7072370..d308e205b1 100644 --- a/classes/module-base.bbclass +++ b/classes/module-base.bbclass @@ -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}" diff --git a/packages/ixp425-eth/ixp400-eth_1.4.bb b/packages/ixp425-eth/ixp400-eth_1.4.bb index 6e14f67c0e..81dc5e9ec0 100644 --- a/packages/ixp425-eth/ixp400-eth_1.4.bb +++ b/packages/ixp425-eth/ixp400-eth_1.4.bb @@ -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" diff --git a/packages/ixp425-eth/ixp400-eth_1.5.bb b/packages/ixp425-eth/ixp400-eth_1.5.bb index e54077460b..986d5ddf37 100644 --- a/packages/ixp425-eth/ixp400-eth_1.5.bb +++ b/packages/ixp425-eth/ixp400-eth_1.5.bb @@ -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" diff --git a/packages/ixp425-eth/ixp425-eth_1.1.bb b/packages/ixp425-eth/ixp425-eth_1.1.bb index 53e713178a..43330d6de2 100644 --- a/packages/ixp425-eth/ixp425-eth_1.1.bb +++ b/packages/ixp425-eth/ixp425-eth_1.1.bb @@ -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 diff --git a/packages/ixp425-eth/ixp425-eth_1.2.bb b/packages/ixp425-eth/ixp425-eth_1.2.bb index 3cc9a6c70a..a3587e8064 100644 --- a/packages/ixp425-eth/ixp425-eth_1.2.bb +++ b/packages/ixp425-eth/ixp425-eth_1.2.bb @@ -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" diff --git a/packages/ixp4xx/ixp-osal_1.5.bb b/packages/ixp4xx/ixp-osal_1.5.bb index c0e0cb930c..66cf9e6b06 100644 --- a/packages/ixp4xx/ixp-osal_1.5.bb +++ b/packages/ixp4xx/ixp-osal_1.5.bb @@ -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}' \ diff --git a/packages/ixp4xx/ixp-osal_2.0.bb b/packages/ixp4xx/ixp-osal_2.0.bb index c5ddf66bef..84929d5cb5 100644 --- a/packages/ixp4xx/ixp-osal_2.0.bb +++ b/packages/ixp4xx/ixp-osal_2.0.bb @@ -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}' \ diff --git a/packages/ixp4xx/ixp-osal_2.1.bb b/packages/ixp4xx/ixp-osal_2.1.bb index 4fca2c3a1e..48d4355648 100644 --- a/packages/ixp4xx/ixp-osal_2.1.bb +++ b/packages/ixp4xx/ixp-osal_2.1.bb @@ -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" diff --git a/packages/ixp4xx/ixp4xx-csr_1.4.bb b/packages/ixp4xx/ixp4xx-csr_1.4.bb index 788d303c67..7146d9e402 100644 --- a/packages/ixp4xx/ixp4xx-csr_1.4.bb +++ b/packages/ixp4xx/ixp4xx-csr_1.4.bb @@ -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 \ diff --git a/packages/ixp4xx/ixp4xx-csr_1.5.bb b/packages/ixp4xx/ixp4xx-csr_1.5.bb index 2feef7ea4a..debdeb404f 100644 --- a/packages/ixp4xx/ixp4xx-csr_1.5.bb +++ b/packages/ixp4xx/ixp4xx-csr_1.5.bb @@ -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" diff --git a/packages/ixp4xx/ixp4xx-csr_2.0.bb b/packages/ixp4xx/ixp4xx-csr_2.0.bb index 963ecc2f64..3fc86c272d 100644 --- a/packages/ixp4xx/ixp4xx-csr_2.0.bb +++ b/packages/ixp4xx/ixp4xx-csr_2.0.bb @@ -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}" diff --git a/packages/ixp4xx/ixp4xx-csr_2.1.bb b/packages/ixp4xx/ixp4xx-csr_2.1.bb index 93ac8aab6f..a91cc25cc1 100644 --- a/packages/ixp4xx/ixp4xx-csr_2.1.bb +++ b/packages/ixp4xx/ixp4xx-csr_2.1.bb @@ -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" diff --git a/packages/linux/ixp4xx-kernel.inc b/packages/linux/ixp4xx-kernel.inc index b9d09c0565..29b32e80d8 100644 --- a/packages/linux/ixp4xx-kernel.inc +++ b/packages/linux/ixp4xx-kernel.inc @@ -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. diff --git a/packages/linux/nslu2-kernel.inc b/packages/linux/nslu2-kernel.inc index ee0d233ac2..d30bcf77ce 100644 --- a/packages/linux/nslu2-kernel.inc +++ b/packages/linux/nslu2-kernel.inc @@ -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. |