summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-11-24 04:24:31 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-11-24 04:24:31 +0000
commit53d8027c8096f22aa32c1faa59dd09dc8b7b3c9c (patch)
tree82e8ed27f7097ade291926a97335b2a901508ddc /Rules.mak
parent433c0b2e61802f0020b6b6122bc6db0ba9633b86 (diff)
Add -msoft-float to CPU_CFLAGS instead of CFLAGS, since ldso and libdl
Makefiles ignore CFLAGS.
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak20
1 files changed, 11 insertions, 9 deletions
diff --git a/Rules.mak b/Rules.mak
index 6418a4176..02d7d6820 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -178,6 +178,17 @@ OPTIMIZATION+=$(call check_gcc,-Os,-O2)
XWARNINGS=$(subst ",, $(strip $(WARNINGS))) -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
XARCH_CFLAGS=$(subst ",, $(strip $(ARCH_CFLAGS)))
CPU_CFLAGS=$(subst ",, $(strip $(CPU_CFLAGS-y)))
+
+LDADD_LIBFLOAT=
+ifeq ($(strip $(UCLIBC_HAS_SOFT_FLOAT)),y)
+# Add -msoft-float to the CPU_FLAGS since ldso and libdl ignore CFLAGS.
+# If -msoft-float isn't supported, we want an error anyway.
+ CPU_CFLAGS += -msoft-float
+ifeq ($(strip $(TARGET_ARCH)),arm)
+ LDADD_LIBFLOAT=-lfloat
+endif
+endif
+
# Some nice CFLAGS to work with
CFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) \
-fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)include -I.
@@ -210,15 +221,6 @@ ifeq ($(HAVE_SHARED),y)
endif
endif
-LDADD_LIBFLOAT=
-ifeq ($(strip $(UCLIBC_HAS_SOFT_FLOAT)),y)
- CFLAGS += $(call check_gcc,-msoft-float,CAN_NOT_SET_SOFT_FLOAT)
- #LDFLAGS+= -Wa,-mno-fpu
-ifeq ($(strip $(TARGET_ARCH)),arm)
- LDADD_LIBFLOAT=-lfloat
-endif
-endif
-
CFLAGS_NOPIC:=$(CFLAGS)
ifeq ($(DOPIC),y)
CFLAGS += $(PICFLAG)