]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
[PATCH] clean up compiler warnings if building using klibc.
authorgreg@kroah.com <greg@kroah.com>
Tue, 27 Jan 2004 02:10:53 +0000 (18:10 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:18 +0000 (21:13 -0700)
Makefile

index 0fd158a2c7070e93ba0af32d4c51d1b5e098cabc..30ebd45eedecc0f09d3558378d0d447eef8df198 100644 (file)
--- 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