Hello,
On 02/18/2013 10:21 AM, Alberich de megres wrote:
Hello Again,
And sorry to insist.
Editing the KBUILD_CFLAGS and KBUILD_AFLAGS from the
build_dir/linux-arm/linux/arch/arm/Makefile and removing the
-msoft-float I can bypass the error.
This does not sound right, the kernel must be compiled with software
floating point, I assume this is because we do not want the kernel to
trap itself by making it use hardware floating point and attempt to
emulate this. The real fix would be to filter out the floating-point
related CFLAGS that are being passed to the Linux kernel build system by
OpenWrt, I will reproduce your issue and fix this.
My I happiness did not last any longer.. as I'm getting this next error:
arm-hardfp-linux-gnueabi-ld: unrecognised emulation mode: uclibc
Supported emulations: armelf_linux_eabi armelfb_linux_eabi
If I try to compile the same kernel tree (which is in a local git repo),
with the toolchain (based on glibc) I can do it with no problems (also
without the -mfloat-abi=soft and -mfloat-abi=hard error). Also using a
demo .c and manually passing the -muclibc to the gcc compiler I'm able
to compile it with any complains from the compiler.
An user-space application can select the floating point implementation
at will, this is not the case for the kernel so your example here just
works because your toolchain is properly configured and will not attempt
to override the kernel floating-point CFLAGS.
When using an external toolchain, openwrt asked me for a file in
include/site/arm-hardfp-linux-gnueabi. I created one as a clone of the
arm-openwrt-linux-gnueabi.
I think I'm missing something. Can anyone helpme?
thanks!
On Sun, Feb 17, 2013 at 3:16 PM, Alberich de megres
<[email protected] <mailto:[email protected]>> wrote:
Hello Florian,
Thanks for your quick reply.
I had the fpu feature for my target Makefile, and Also I disabled
the SOFT_FLOAT.
Also, I did a quick hack into rules.mk <http://rules.mk> to ensure
msoft-float is never activated,
ifeq ($(CONFIG_SOFT_FLOAT),y)
# SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
# TARGET_CFLAGS+= -msoft-float
SOFT_FLOAT_CONFIG_OPTION:=
else
SOFT_FLOAT_CONFIG_OPTION:=
endif
But i'm still getting the same error.
Maybe am I looking at the wrong place?
Thanks once again,
Alberich
On Sun, Feb 17, 2013 at 2:32 PM, Florian Fainelli
<[email protected] <mailto:[email protected]>> wrote:
Hello Alberich,
Le 17/02/2013 14:26, Alberich de megres a écrit :
Hello,
I'm trying to compile openwrt for an ARM using an external
toolchain
with hardfp.
When openwrt buildroot is compiling the kernel, at the
oldconfig prepare
scripts i'm getting this error:
arm-hardfp-linux-gnueabi-gcc: error: -mfloat-abi=soft and
-mfloat-abi=hard may not be used together
In the openwrt menuconfig,
In advanced (developers ) -> target options -> use softhp is
disabled
with this flags (for both: TARGET_OPTIMIZATION,
DEFAULT_TARGET_OPTIMIZATION):
-O2 -pipe -mfloat-abi=hard -mfpu=vfp
Also I checked the kernel_menuconfig for FPU, which is enabled.
At some point the -mfloat-abi=soft compiler flags is added
to the flags,
but I could not find where is it added. fgrep for
mfloat-abi=soft or
msoft-float didn't show anything relevant.
Can anyone help me?
This is specifically passed to the GCC configure script here:
https://dev.openwrt.org/__browser/trunk/toolchain/gcc/__common.mk#L125
<https://dev.openwrt.org/browser/trunk/toolchain/gcc/common.mk#L125>
you can disable the use of software floating point for your
binaries from here:
https://dev.openwrt.org/__browser/trunk/Config.in#L670
<https://dev.openwrt.org/browser/trunk/Config.in#L670>
software floating point is enabled by default for ARM little and
big endian toolchains. Alternatively you can set the "fpu"
feature flag in your target Makefile in
target/linux/<target>/Makefile if you want to disable software
floating point for your specific target/platform.
--
Florian
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel