From a9d30b70002079ee22989bb5a69eb8aba0c96cc9 Mon Sep 17 00:00:00 2001 From: Jaehun Jeong Date: Thu, 20 Jul 2017 15:25:30 +0900 Subject: Add hard-float option Signed-off-by: Jaehun Jeong --- cross/arm/toolchain.cmake | 1 + packaging/corefx.spec | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/cross/arm/toolchain.cmake b/cross/arm/toolchain.cmake index 7d5a70acfb..29c3281c0c 100644 --- a/cross/arm/toolchain.cmake +++ b/cross/arm/toolchain.cmake @@ -6,6 +6,7 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabihf") +add_compile_options(-mfloat-abi=hard) add_compile_options(-target armv7-linux-gnueabihf) add_compile_options(-mthumb) add_compile_options(-mfpu=vfpv3) diff --git a/packaging/corefx.spec b/packaging/corefx.spec index f4104822eb..7989de2898 100644 --- a/packaging/corefx.spec +++ b/packaging/corefx.spec @@ -216,14 +216,26 @@ export C_INCLUDE_PATH="${LLVM_INCLUDEDIR}/llvm-c/:%{_includedir}" %else %ifarch %{arm} +%ifarch armv7l %define _barch armel +%endif +%ifarch armv7hl +%define _barch arm +%endif %if 0%{skipnative} %else +%ifarch armv7l aarch64 %{ix86} x86_64 export CFLAGS="${CFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -Wp,-D__SOFTFP__ -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w" export CPPFLAGS="${CPPFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -Wp,-D__SOFTFP__ -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w" export CXXFLAGS="${CXXFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -Wp,-D__SOFTFP__ -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w" %endif +%ifarch armv7hl +export CFLAGS="${CFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=hard -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w" +export CPPFLAGS="${CPPFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=hard -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w" +export CXXFLAGS="${CXXFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=hard -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w" +%endif +%endif %else # write the paths in general! -- cgit v1.2.3