summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-01-26 18:10:53 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:18 -0700
commiteea34a0e9909405467185bb1e5291e6cc88fd0bc (patch)
treeeba61873bddb0ef3204f8f6b4be604e9c1cacd4d /Makefile
parent25f8a5ad642e4338dacaf892e4ad47577c1cbf11 (diff)
[PATCH] clean up compiler warnings if building using klibc.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 0fd158a2c7..30ebd45eed 100644
--- a/Makefile
+++ b/Makefile
@@ -94,7 +94,7 @@ OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>
then echo "-Os"; else echo "-O2" ; fi}
# add -Wredundant-decls when libsysfs gets cleaned up
-WARNINGS := -Wall -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
+WARNINGS := -Wall
# Some nice architecture specific optimizations
ifeq ($(strip $(TARGET_ARCH)),arm)
@@ -117,11 +117,11 @@ endif
# if DEBUG is enabled, then we do not strip or optimize
ifeq ($(strip $(DEBUG)),true)
- CFLAGS += $(WARNINGS) -O1 -g -DDEBUG -D_GNU_SOURCE
+ CFLAGS += -O1 -g -DDEBUG -D_GNU_SOURCE
LDFLAGS += -Wl,-warn-common
STRIPCMD = /bin/true -Since_we_are_debugging
else
- CFLAGS += $(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
+ CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
LDFLAGS += -s -Wl,-warn-common
STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
endif
@@ -142,15 +142,20 @@ ifeq ($(strip $(USE_KLIBC)),true)
CRT0 = $(KLIBC_DIR)/crt0.o
LIBC = $(ARCH_LIB_OBJS) $(LIB_OBJS) $(CRT0)
- CFLAGS += -nostdinc -I$(INCLUDE_DIR) -I$(KLIBC_DIR)/arch/$(ARCH)/include \
- -I$(INCLUDE_DIR)/bits$(BITSIZE) -I$(GCCINCDIR) -I$(LINUX_INCLUDE_DIR) \
- -D__KLIBC__ -fno-builtin-printf
+ CFLAGS += $(WARNINGS) -nostdinc \
+ -D__KLIBC__ -fno-builtin-printf \
+ -I$(INCLUDE_DIR) \
+ -I$(KLIBC_DIR)/arch/$(ARCH)/include \
+ -I$(INCLUDE_DIR)/bits$(BITSIZE) \
+ -I$(GCCINCDIR) \
+ -I$(LINUX_INCLUDE_DIR)
LIB_OBJS =
LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs
else
+ WARNINGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
CRT0 =
LIBC =
- CFLAGS += -I$(GCCINCDIR)
+ CFLAGS += $(WARNINGS) -I$(GCCINCDIR)
LIB_OBJS = -lc
LDFLAGS =
endif