summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-02-01 22:08:43 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-02-01 22:08:43 +0000
commitc57c602353c5538d9219feabd11bf3f0394bd0c3 (patch)
tree4c8c9649c9220b2475e593a8d8bb4e67196e9539 /Rules.mak
parent1de7b5deae65d052672e409d5d4a99e05858896a (diff)
everything uses now CFLAGS, no need to add anything to CPU_FLAGS, add -DSTATIC for those not needing shared libs, needed to be seen in libc-symbols.h
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak40
1 files changed, 23 insertions, 17 deletions
diff --git a/Rules.mak b/Rules.mak
index 8cffc323d..ce93d52a1 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -97,6 +97,8 @@ endif
ifneq ($(HAVE_SHARED),y)
libc :=
+interp :=
+ldso :=
endif
ifndef CROSS
@@ -304,21 +306,28 @@ endif
XARCH_CFLAGS=$(subst ",, $(strip $(ARCH_CFLAGS)))
CPU_CFLAGS=$(subst ",, $(strip $(CPU_CFLAGS-y)))
-# Make sure "char" behavior is the same everywhere
-CPU_CFLAGS += -fsigned-char
+SSP_DISABLE_FLAGS ?= $(call check_gcc,-fno-stack-protector,)
+ifeq ($(UCLIBC_BUILD_SSP),y)
+SSP_CFLAGS := $(call check_gcc,-fno-stack-protector-all,)
+SSP_CFLAGS += $(call check_gcc,-fstack-protector,)
+SSP_ALL_CFLAGS ?= $(call check_gcc,-fstack-protector-all,)
+else
+SSP_CFLAGS := $(SSP_DISABLE_FLAGS)
+endif
-# only i386 is known to work if compile.S gets -D__ASSEMBLER__
-#CPU_CFLAGS += $(call check_gcc,-std=c99,)
+# Some nice CFLAGS to work with
+CFLAGS := -include $(top_builddir)include/libc-symbols.h \
+ $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
+ -fno-builtin -nostdinc -I$(top_builddir)include -I.
LDADD_LIBFLOAT=
ifeq ($(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.
# Hmm... might need to revisit this for arm since it has 2 different
# soft float encodings.
ifneq ($(TARGET_ARCH),nios)
ifneq ($(TARGET_ARCH),nios2)
- CPU_CFLAGS += -msoft-float
+CFLAGS += -msoft-float
endif
endif
ifeq ($(TARGET_ARCH),arm)
@@ -328,19 +337,16 @@ ifeq ($(TARGET_ARCH),arm)
endif
endif
-SSP_DISABLE_FLAGS?=$(call check_gcc,-fno-stack-protector,)
-ifeq ($(UCLIBC_BUILD_SSP),y)
-SSP_CFLAGS:=$(call check_gcc,-fno-stack-protector-all,)
-SSP_CFLAGS+=$(call check_gcc,-fstack-protector,)
-SSP_ALL_CFLAGS?=$(call check_gcc,-fstack-protector-all,)
-else
-SSP_CFLAGS:=$(SSP_DISABLE_FLAGS)
+# Make sure "char" behavior is the same everywhere
+CFLAGS += -fsigned-char
+
+# We need this to be checked within libc-symbols.h
+ifneq ($(HAVE_SHARED),y)
+CFLAGS += -DSTATIC
endif
-# Some nice CFLAGS to work with
-CFLAGS:=-include $(top_builddir)include/libc-symbols.h \
- $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
- -fno-builtin -nostdinc -I$(top_builddir)include -I.
+# only i386 is known to work if compile.S gets -D__ASSEMBLER__
+#CFLAGS += $(call check_gcc,-std=c99,)
LDFLAGS_NOSTRIP:=$(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc