aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.custom14
-rw-r--r--Makefile.flags4
-rw-r--r--arch/i386/Makefile2
3 files changed, 17 insertions, 3 deletions
diff --git a/Makefile.custom b/Makefile.custom
index 3fbf4a866..6a08fcdab 100644
--- a/Makefile.custom
+++ b/Makefile.custom
@@ -110,8 +110,20 @@ docs/busybox.net/BusyBox.html: docs/busybox.pod
syn_tgt = $(wildcard $(patsubst %,%/*.c,$(busybox-alldirs)))
syn = $(patsubst %.c, %.syn, $(syn_tgt))
+comma:= ,
+brace_open:= (
+brace_close:= )
+
+SYN_CPPFLAGS := $(strip $(CPPFLAGS) $(EXTRA_CPPFLAGS))
+SYN_CPPFLAGS := $(subst $(brace_open),\$(brace_open),$(SYN_CPPFLAGS))
+SYN_CPPFLAGS := $(subst $(brace_close),\$(brace_close),$(SYN_CPPFLAGS))
+#SYN_CPPFLAGS := $(subst ",\",$(SYN_CPPFLAGS))
+#")
+#SYN_CPPFLAGS := [$(patsubst %,'%'$(comma),$(SYN_CPPFLAGS))'']
+
%.syn: %.c
- synopsis --verbose --debug -p C -l Comments.SSDFilter,Comments.Previous $(INCS) -Wp,verbose=True,debug=True,preprocess=True,cppflags="'$(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) $(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) $(APPLETS_DEFINE) $(BUSYBOX_DEFINE)'" -o $@ $<
+ $(warning fla='$(SYN_CPPFLAGS)')
+ synopsis -p C -l Comments.SSDFilter,Comments.Previous -Wp,preprocess=True,cppflags="'$(SYN_CPPFLAGS)'" -o $@ $<
.PHONY: html
html: $(syn)
diff --git a/Makefile.flags b/Makefile.flags
index 0c680f904..bb5cef0d9 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -13,7 +13,9 @@ CPPFLAGS += \
-include include/autoconf.h \
-D_GNU_SOURCE -DNDEBUG \
$(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \
- -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP \
+ -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP
+
+CFLAGS += \
-Wall -Wstrict-prototypes -Wshadow -Werror -Wundef \
-funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \
-Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 0a235921c..595868ec5 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -2,4 +2,4 @@
# Build system
# ==========================================================================
-CPPFLAGS += -march=i386 -mpreferred-stack-boundary=2
+CFLAGS += -march=i386 -mpreferred-stack-boundary=2