Errors while creating a new PowerPC 405e tune file

Elvis Dowson

     I have defined a ( suffixed with an 'e' to signify that it has a hardware floating point unit attached), as follows:

DEFAULTTUNE ?= "ppc405e"

require conf/machine/include/powerpc/

TUNEVALID[ppc405e] = "Enable ppc405e specific processor optimizations"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc405e", "-mcpu=405fp", "", d)}"

AVAILTUNES += "ppc405e"
TUNE_FEATURES_tune-ppc405e = "m32 ppc405e fpu-hard"
TUNE_PKGARCH_tune-ppc440e = "ppc405e"
PACKAGE_EXTRA_ARCHS_tune-ppc405e = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppc405e"

# glibc configure options to get ppc405e specific library (for sqrt)
GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppc405e", "-with-cpu=405fp", "", d)}"

And in my machine, should I be defining TARGET_CPU = "405fp" or "405e" ?

TARGET_CPU  = "405fp"
#tune for the 405e cpu
require conf/machine/include/

The gcc compiler options for -mcpu=cpu_type can be one of '405' or '405fp'.

I can't get bitbake to build it for some reason, I keep getting errors like this:

$ bitbake -c fetchall core-image-minimal
Pseudo is not present but is required, building this first before the main build
NOTE: Error expanding variable oe_runconf                                                                          | ETA:  00:00:50
NOTE: Error during finalise of /tool/yocto/meta-openembedded/toolchain-layer/recipes-devtools/gcc/
ERROR: ExpansionError during parsing /tool/yocto/meta-openembedded/toolchain-layer/recipes-devtools/gcc/ Failure expanding variable EXTRA_OECONF, expression was --with-newlib --without-headers --disable-shared --disable-threads --disable-multilib --disable-__cxa_atexit --enable-languages=c                   --program-prefix=powerpc-poky-linux- --with-sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5 --with-build-sysroot=/tool/yocto/poky/build/tmp/work/${TUNE_PKGARCH_tune-ppc405e}-poky-linux/gcc-cross-initial-4.5.1+svnr162773-r14/gcc-4_5-branch/build.x86_64-linux.powerpc-poky-linux/tmpsysroot --disable-libmudflap --disable-libgomp --disable-libssp --enable-decimal-float=no ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/${TUNE_PKGARCH_tune-ppc405e}-poky-linux/powerpc-poky-linux-ld.bfd', '', d)} ${@gettext_oeconf(d)} --enable-__cxa_atexit --with-long-double-128 which triggered exception SyntaxError: EOL while scanning string literal (EXTRA_OECONF, line 1)
NOTE: Error expanding variable do_install
NOTE: Error during finalise of /tool/yocto/meta-openembedded/toolchain-layer/recipes-devtools/gcc/
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH (${TUNE_PKGARCH_tune-ppc405e}).
ERROR: Execution of event handler 'check_sanity_eventhandler' failed
ERROR: Command execution failed: Exited with 1

Summary: There were 4 ERROR messages shown, returning a non-zero exit code.

Is this some how related to expanding the variable EXTRA_OECONF_FPU in (I'm working on a commit that is before Khem's recent rework on gcc-4.7)

EXTRA_OECONF = "--with-newlib \
--without-headers \
--disable-shared \
--disable-threads \
--disable-multilib \
--disable-__cxa_atexit \
--enable-languages=c \
                ${OPTSPACE} \
--program-prefix=${TARGET_PREFIX} \
--with-sysroot=${STAGING_DIR_TARGET} \
--with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \
${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \

Best regards,

Elvis Dowson

Join { to automatically receive all group messages.