Comment #5 on issue 2140 by [email protected]: Fix hardfloat detection
in Linux
http://code.google.com/p/v8/issues/detail?id=2140
The test in the current code is indeed wrong, and as suggested we should
use __ARM_PCS and __ARM_PCS_VFP to check for the calling convention (PCS =
Procedure Call Standard)
The change could go further in that __SOFTFP__ and __ARM_PCS_VFP can't be
defined together. I attached an updated patch. Maybe Khem Raj (author of
the initial patch) would prefer to modify his and contribute it?
I'll try to get access to a board with hardfp this afternoon to check
everything works fine. I'll confirm everything works fine after I have
tested it.
Below are a few details for information.
Details on the -mfloat-abi option can be found at
http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
On my tegra2 I get:
$ gcc -mfloat-abi=soft -dM -E /tmp/test.c | grep -i "vfp_fp\|pcs\|soft"
#define __APCS_32__ 1
#define __ARM_PCS 1
#define __SOFTFP__ 1
#define __VFP_FP__ 1
$ gcc -mfloat-abi=softfp -dM -E /tmp/test.c | grep -i "vfp_fp\|pcs\|soft"
#define __APCS_32__ 1
#define __ARM_PCS 1
#define __VFP_FP__ 1
$ gcc -mfloat-abi=hard -dM -E /tmp/test.c | grep -i "vfp_fp\|pcs\|soft"
#define __APCS_32__ 1
#define __ARM_PCS_VFP 1
#define __VFP_FP__ 1
Note the confusing definition and usage of __SOFTFP__ and
-mfloat-abi=softfp.
Attachments:
abi.detection.patch 534 bytes
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev