summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-02-25 13:27:54 -0600
committerWaldemar Brodkorb <wbx@openadk.org>2015-02-25 13:27:54 -0600
commitfece8b08c7cd7ea201958224fd35b0456ed53dd3 (patch)
tree3ca87d3af24017bcfd80a50ff90026b477f33b6d
parent8717248d7a639bd9463cd593cd6b7a8549970879 (diff)
set CFLAGS for float/fpu correctly
-rw-r--r--mk/vars.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index b47ee053b..ec5d89fdb 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -129,6 +129,22 @@ TARGET_CFLAGS+= $(ADK_TARGET_CPU_FLAGS)
TARGET_CXXFLAGS+= $(ADK_TARGET_CPU_FLAGS)
endif
+ifneq ($(ADK_TARGET_FPU),)
+TARGET_CFLAGS+= -mfpu=$(ADK_TARGET_FPU)
+TARGET_CXXFLAGS+= -mfpu=$(ADK_TARGET_FPU)
+endif
+
+ifneq ($(ADK_TARGET_FLOAT),)
+ifeq ($(ADK_TARGET_ARCH_ARM),y)
+TARGET_CFLAGS+= -mfloat-abi=$(ADK_TARGET_FLOAT)
+TARGET_CXXFLAGS+= -mfloat-abi=$(ADK_TARGET_FLOAT)
+endif
+ifeq ($(ADK_TARGET_ARCH_MIPS),y)
+TARGET_CFLAGS+= -m$(ADK_TARGET_FLOAT)-float
+TARGET_CXXFLAGS+= -m$(ADK_TARGET_FLOAT)-float
+endif
+endif
+
ifeq ($(ADK_TARGET_BINFMT_FLAT),y)
TARGET_LDFLAGS+= -elf2flt
endif