* [PATCH] am33x-cm3: pass float ABI flag to fix gcc-4.9.1 issue with stubs
@ 2014-08-18 19:08 Denys Dmytriyenko
2014-08-18 19:36 ` Peter A. Bigot
0 siblings, 1 reply; 3+ messages in thread
From: Denys Dmytriyenko @ 2014-08-18 19:08 UTC (permalink / raw)
To: meta-ti
From: Denys Dmytriyenko <denys@ti.com>
Since we are re-using the Linux cross-compiler to compile Cortex-M3 firmware
code and not a dedicated bare-metal compiler, we have to match the float ABI
for the compiler to find the correct gnu/stubs.h files. In other words, if we
built a hardfp compiler, it doesn't have the corresponding gnu/stubs-soft.h
header and fails when building anything non-hardfp. Even though float ABI
flag doesn't make any sense for Cortex-M3 build. The error looks like this:
| CC src/sys_exec/trace.o
| CC src/sys_exec/sys_init.o
| In file included from /OE/sysroots/am335x-evm/usr/include/features.h:402:0,
| from /OE/sysroots/am335x-evm/usr/include/stdint.h:25,
| from /OE/sysroots/x86_64-linux/usr/lib/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.1/include/stdint.h:9,
| from src/sys_exec/rsc_table.h:13,
| from src/sys_exec/sys_init.c:19:
| /OE/sysroots/am335x-evm/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
| # include <gnu/stubs-soft.h>
| ^
| compilation terminated.
| Makefile:51: recipe for target 'src/sys_exec/sys_init.o' failed
| make: *** [src/sys_exec/sys_init.o] Error 1
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
recipes-bsp/am33x-cm3/am33x-cm3_git.bb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/recipes-bsp/am33x-cm3/am33x-cm3_git.bb b/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
index 51ec9bd..7731992 100644
--- a/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
+++ b/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
@@ -14,8 +14,10 @@ SRC_URI = "git://git.ti.com/ti-cm3-pm-firmware/amx3-cm3.git;protocol=git;branch=
S = "${WORKDIR}/git"
+FLOATABI = "${@base_contains("TUNE_FEATURES", "vfp", base_contains("TUNE_FEATURES", "callconvention-hard", " -mfloat-abi=hard", " -mfloat-abi=softfp", d), "" ,d)}"
+
do_compile() {
- make CROSS_COMPILE="${TARGET_PREFIX}"
+ make CROSS_COMPILE="${TARGET_PREFIX}" CC="${TARGET_PREFIX}gcc ${FLOATABI}"
}
do_install() {
--
2.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] am33x-cm3: pass float ABI flag to fix gcc-4.9.1 issue with stubs
2014-08-18 19:08 [PATCH] am33x-cm3: pass float ABI flag to fix gcc-4.9.1 issue with stubs Denys Dmytriyenko
@ 2014-08-18 19:36 ` Peter A. Bigot
2014-08-18 19:46 ` Denys Dmytriyenko
0 siblings, 1 reply; 3+ messages in thread
From: Peter A. Bigot @ 2014-08-18 19:36 UTC (permalink / raw)
To: meta-ti
On 08/18/2014 02:08 PM, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
>
> Since we are re-using the Linux cross-compiler to compile Cortex-M3 firmware
> code and not a dedicated bare-metal compiler, we have to match the float ABI
> for the compiler to find the correct gnu/stubs.h files. In other words, if we
> built a hardfp compiler, it doesn't have the corresponding gnu/stubs-soft.h
> header and fails when building anything non-hardfp. Even though float ABI
> flag doesn't make any sense for Cortex-M3 build. The error looks like this:
Just as a heads-up: A recent patch to OE core might affect this re-use
of the cross-compiler.
See:
http://www.mail-archive.com/openembedded-core@lists.openembedded.org/msg55590.html
If you're using the cross-compiler to build applications for a less
capable architecture than the target you might need to provide an
explicit -mcpu=cortex-m3 parameter as it won't default to armv5t anymore.
There's some background on why this change was made at:
http://www.mail-archive.com/openembedded-core%40lists.openembedded.org/msg55489.html
Peter
>
> | CC src/sys_exec/trace.o
> | CC src/sys_exec/sys_init.o
> | In file included from /OE/sysroots/am335x-evm/usr/include/features.h:402:0,
> | from /OE/sysroots/am335x-evm/usr/include/stdint.h:25,
> | from /OE/sysroots/x86_64-linux/usr/lib/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.1/include/stdint.h:9,
> | from src/sys_exec/rsc_table.h:13,
> | from src/sys_exec/sys_init.c:19:
> | /OE/sysroots/am335x-evm/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
> | # include <gnu/stubs-soft.h>
> | ^
> | compilation terminated.
> | Makefile:51: recipe for target 'src/sys_exec/sys_init.o' failed
> | make: *** [src/sys_exec/sys_init.o] Error 1
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
> recipes-bsp/am33x-cm3/am33x-cm3_git.bb | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/recipes-bsp/am33x-cm3/am33x-cm3_git.bb b/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
> index 51ec9bd..7731992 100644
> --- a/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
> +++ b/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
> @@ -14,8 +14,10 @@ SRC_URI = "git://git.ti.com/ti-cm3-pm-firmware/amx3-cm3.git;protocol=git;branch=
>
> S = "${WORKDIR}/git"
>
> +FLOATABI = "${@base_contains("TUNE_FEATURES", "vfp", base_contains("TUNE_FEATURES", "callconvention-hard", " -mfloat-abi=hard", " -mfloat-abi=softfp", d), "" ,d)}"
> +
> do_compile() {
> - make CROSS_COMPILE="${TARGET_PREFIX}"
> + make CROSS_COMPILE="${TARGET_PREFIX}" CC="${TARGET_PREFIX}gcc ${FLOATABI}"
> }
>
> do_install() {
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] am33x-cm3: pass float ABI flag to fix gcc-4.9.1 issue with stubs
2014-08-18 19:36 ` Peter A. Bigot
@ 2014-08-18 19:46 ` Denys Dmytriyenko
0 siblings, 0 replies; 3+ messages in thread
From: Denys Dmytriyenko @ 2014-08-18 19:46 UTC (permalink / raw)
To: Peter A. Bigot; +Cc: meta-ti
On Mon, Aug 18, 2014 at 02:36:20PM -0500, Peter A. Bigot wrote:
> On 08/18/2014 02:08 PM, Denys Dmytriyenko wrote:
> >From: Denys Dmytriyenko <denys@ti.com>
> >
> >Since we are re-using the Linux cross-compiler to compile Cortex-M3 firmware
> >code and not a dedicated bare-metal compiler, we have to match the float ABI
> >for the compiler to find the correct gnu/stubs.h files. In other words, if we
> >built a hardfp compiler, it doesn't have the corresponding gnu/stubs-soft.h
> >header and fails when building anything non-hardfp. Even though float ABI
> >flag doesn't make any sense for Cortex-M3 build. The error looks like this:
>
> Just as a heads-up: A recent patch to OE core might affect this
> re-use of the cross-compiler.
>
> See: http://www.mail-archive.com/openembedded-core@lists.openembedded.org/msg55590.html
>
> If you're using the cross-compiler to build applications for a less
> capable architecture than the target you might need to provide an
> explicit -mcpu=cortex-m3 parameter as it won't default to armv5t
> anymore.
>
> There's some background on why this change was made at:
> http://www.mail-archive.com/openembedded-core%40lists.openembedded.org/msg55489.html
Indeed, -mcpu=cortex-m3 is already specified in the Makefile, otherwise the
firmware won't work at all, as our defaults are set to -mcpu=cortex-a8,
cortex-a9 and cortex-a15 based on the paltform.
And thanks for the heads-up! It looks like a slightly different issue, but
seems to stem from the same core changes in gcc-4.9.1...
--
Denys
> >
> >| CC src/sys_exec/trace.o
> >| CC src/sys_exec/sys_init.o
> >| In file included from /OE/sysroots/am335x-evm/usr/include/features.h:402:0,
> >| from /OE/sysroots/am335x-evm/usr/include/stdint.h:25,
> >| from /OE/sysroots/x86_64-linux/usr/lib/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.1/include/stdint.h:9,
> >| from src/sys_exec/rsc_table.h:13,
> >| from src/sys_exec/sys_init.c:19:
> >| /OE/sysroots/am335x-evm/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
> >| # include <gnu/stubs-soft.h>
> >| ^
> >| compilation terminated.
> >| Makefile:51: recipe for target 'src/sys_exec/sys_init.o' failed
> >| make: *** [src/sys_exec/sys_init.o] Error 1
> >
> >Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> >---
> > recipes-bsp/am33x-cm3/am33x-cm3_git.bb | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/recipes-bsp/am33x-cm3/am33x-cm3_git.bb b/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
> >index 51ec9bd..7731992 100644
> >--- a/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
> >+++ b/recipes-bsp/am33x-cm3/am33x-cm3_git.bb
> >@@ -14,8 +14,10 @@ SRC_URI = "git://git.ti.com/ti-cm3-pm-firmware/amx3-cm3.git;protocol=git;branch=
> > S = "${WORKDIR}/git"
> >+FLOATABI = "${@base_contains("TUNE_FEATURES", "vfp", base_contains("TUNE_FEATURES", "callconvention-hard", " -mfloat-abi=hard", " -mfloat-abi=softfp", d), "" ,d)}"
> >+
> > do_compile() {
> >- make CROSS_COMPILE="${TARGET_PREFIX}"
> >+ make CROSS_COMPILE="${TARGET_PREFIX}" CC="${TARGET_PREFIX}gcc ${FLOATABI}"
> > }
> > do_install() {
>
> --
> _______________________________________________
> meta-ti mailing list
> meta-ti@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-18 19:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18 19:08 [PATCH] am33x-cm3: pass float ABI flag to fix gcc-4.9.1 issue with stubs Denys Dmytriyenko
2014-08-18 19:36 ` Peter A. Bigot
2014-08-18 19:46 ` Denys Dmytriyenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.