Skip to contentSkip to conversation

"armv6" override not used

DISCUSSION Robert Schuster 4 participants 8 messages Jan 14, 2009 – Jan 15, 2009

lore
Share & tools
lore
#0 lore raw

Hi,
I am building chinook-compat for the n800 when it comes to libffi the successful build depends on this line:

TARGET_CC_ARCH_append_armv6 =3D " -D__SOFTFP__"

However the build fails because __SOFTFP__ isn't defined and bitbake -i reveals:

BB>> peek libffi-2.0+gcc4.3.2 TARGET_CC_ARCH
SHELL: This command needs to parse bbfiles...
NOTE: Handling BitBake files: - (6521/6521) [100 %]
NOTE: Parsing finished. 0 cached, 6238 parsed, 283 skipped, 0 masked.

-march=3Darmv6j -mtune=3Darm1136jf-s -mfpu=3Dvfp -mfloat-abi=3Dsoftfp -mno-thumb-interwork -mno-thumb
BB>>

It looks like something is wrong with the OVERRIDES variable. It has this value:

local:nokia800:chinook-compat:linux-gnueabi:arm:build-linux:fail-fast:pn-= libffi

Checking the same variable in an Angstrom build for the BeagleBoard (armv7a - needs the same hack) it looks like this:

local:beagleboard:angstrom:linux-gnueabi:arm:build-linux:fail-fast:pn-lib= ffi:armv7a

Something went wrong, but what?

Regards
Robert

#1 lore raw
Quoted 24 lines · Robert Schuster

Hi,
I am building chinook-compat for the n800 when it comes to libffi the successful build depends on this line:

TARGET_CC_ARCH_append_armv6 =3D " -D__SOFTFP__"

However the build fails because __SOFTFP__ isn't defined and bitbake -i reveals:

BB>> peek libffi-2.0+gcc4.3.2 TARGET_CC_ARCH
SHELL: This command needs to parse bbfiles...
NOTE: Handling BitBake files: - (6521/6521) [100 %]
NOTE: Parsing finished. 0 cached, 6238 parsed, 283 skipped, 0 masked.

(quoted diff) +0 -2
-march=3Darmv6j -mtune=3Darm1136jf-s -mfpu=3Dvfp -mfloat-abi=3Dsoftfp
-mno-thumb-interwork -mno-thumb

BB>>

It looks like something is wrong with the OVERRIDES variable. It has this value:

local:nokia800:chinook-compat:linux-gnueabi:arm:build-linux:fail-fast:pn-= libffi

Quoted 7 lines

Checking the same variable in an Angstrom build for the BeagleBoard (armv7a - needs the same hack) it looks like this:

local:beagleboard:angstrom:linux-gnueabi:arm:build-linux:fail-fast:pn-lib= ffi:armv7a

Something went wrong, but what?

Angstrom defines architecture overrides to make life easier for developers, other distros don't.

regards,

KOen

#2 lore raw

Hi,

Quoted 10 lines · Koen Kooi
Quoted 10 lines

It looks like something is wrong with the OVERRIDES variable. It has this value:

local:nokia800:chinook-compat:linux-gnueabi:arm:build-linux:fail-fast:pn-=

libffi

Checking the same variable in an Angstrom build for the BeagleBoard (armv7a - needs the same hack) it looks like this:

Quoted 8 lines
Quoted 5 lines

local:beagleboard:angstrom:linux-gnueabi:arm:build-linux:fail-fast:pn-lib=

ffi:armv7a

Something went wrong, but what?

Angstrom defines architecture overrides to make life easier for developers, other distros don't.

I see:

include/angstrom.inc:OVERRIDES .= ":${FEED_ARCH}"

Is that such a controversial feature? I think this should be part of all distros.

Without this libffi breaks (on armv6 and arm7a) and in the future this means that stuff like openjdk won't be buildable on these arches. :(

Regards
Robert

#3 lore raw
Quoted 5 lines · Robert Schuster

Is that such a controversial feature? I think this should be part of all distros.

Without this libffi breaks (on armv6 and arm7a) and in the future this means that stuff like openjdk won't be buildable on these arches. :(

Why exactly is this override required? It seems a bit sad that these packages need to be fed a special "-DMAKE_ME_WORK" flag by some external intelligence in order to build on newer architectures. Can't they figure it out for themselves?

p.

#4 lore raw

Hi,

Quoted 11 lines · Phil Blundell
Quoted 5 lines · Robert Schuster

Is that such a controversial feature? I think this should be part of all distros.

Without this libffi breaks (on armv6 and arm7a) and in the future this means that stuff like openjdk won't be buildable on these arches. :(

Why exactly is this override required? It seems a bit sad that these packages need to be fed a special "-DMAKE_ME_WORK" flag by some external intelligence in order to build on newer architectures. Can't they figure it out for themselves?

it is related to GCC: Although -mfloat-abi=vfp is given __SOFTFP__ is not defined and that is required for libffi because otherwise the sysv.S assembler file uses instructions not available any more on armv6/armv7.

Regards
Robert

#5 lore raw
Quoted 3 lines · Robert Schuster

it is related to GCC: Although -mfloat-abi=vfp is given __SOFTFP__ is not defined and that is required for libffi because otherwise the sysv.S assembler file uses instructions not available any more on armv6/armv7.

That sounds more like libffi is to blame. Shouldn't it be checking for (defined(__SOFT_FP__) || defined(__VFP_FP__))? Or, if you really are using soft-float, then presumably gcc is to blame for not defining __SOFT_FP__.

Either way, it seems like whichever package is broken should just be fixed, rather than trying to work around it with architecture-specific CFLAGS forcing. Assuming that the problem is libffi trying to use FPA instructions #ifndef __SOFT_FP__, then it will break on ARMv5 architectures as well if you happen to be using VFP.

p.

#6 lore raw
Quoted 10 lines · Phil Blundell
Quoted 3 lines · Robert Schuster

it is related to GCC: Although -mfloat-abi=vfp is given __SOFTFP__ is not defined and that is required for libffi because otherwise the sysv.S assembler file uses instructions not available any more on armv6/armv7.

That sounds more like libffi is to blame. Shouldn't it be checking for (defined(__SOFT_FP__) || defined(__VFP_FP__))? Or, if you really are using soft-float, then presumably gcc is to blame for not defining __SOFT_FP__.

Quoted 5 lines

Either way, it seems like whichever package is broken should just be fixed, rather than trying to work around it with architecture-specific CFLAGS forcing. Assuming that the problem is libffi trying to use FPA instructions #ifndef __SOFT_FP__, then it will break on ARMv5 architectures as well if you happen to be using VFP.

-mfloat-abi=softfp makes sure that the calling conventions used are compatible with soft-float but gcc can generate VFP code if the architecture supports it and thats why __SOFTFP__ is not defined.

GCC only defines __SOFTFP__ when float abi is soft which means there is no FPU of any sort.

My understanding is that this define means that code is not using FPU of any sort and is pure soft-fp not only the calling convention.

by default -mfloat-abi is soft.

You should check the code in question weather it really needs to be soft float. If thats the case then either you should use -mfloat-abi=soft for this file.

Thx

-Khem

#7 lore raw
In reply to Robert Schuster
Quoted 5 lines · Robert Schuster

Hi,
I am building chinook-compat for the n800 when it comes to libffi the successful build depends on this line:

TARGET_CC_ARCH_append_armv6 =3D " -D__SOFTFP__"

FWIW, there's a hard(v)fp branch for gcc 4.4 in svn.

regards,

Koen