3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- udev-065/Makefile~flags
9 # check if compiler option is supported
10 cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;}
12 -CFLAGS += -Wall -fno-builtin -Wchar-subscripts -Wpointer-arith \
13 +override CFLAGS += -Wall -fno-builtin -Wchar-subscripts -Wpointer-arith \
14 -Wstrict-prototypes -Wsign-compare
15 -CFLAGS += $(call cc-supports, -Wdeclaration-after-statement, )
17 -CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
18 +override CFLAGS += $(call cc-supports, -Wdeclaration-after-statement, )
19 +override CFLAGS += -pipe
20 +override CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
22 # use '-Os' optimization if available, else use -O2
23 OPTFLAGS := $(call cc-supports, -Os, -O2)
26 SYSFS = $(PWD)/libsysfs/sysfs.a
28 -CFLAGS += -I$(PWD)/libsysfs/sysfs \
29 +override CFLAGS += -I$(PWD)/libsysfs/sysfs \
32 ifeq ($(strip $(USE_LOG)),true)
34 + override CFLAGS += -DUSE_LOG
37 # if DEBUG is enabled, then we do not strip or optimize
38 ifeq ($(strip $(DEBUG)),true)
39 - CFLAGS += -O1 -g -DDEBUG
40 + override CFLAGS += -DDEBUG
42 STRIPCMD = /bin/true -Since_we_are_debugging
48 - CFLAGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
49 + override CFLAGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
52 ifeq ($(strip $(USE_SELINUX)),true)
53 UDEV_OBJS += udev_selinux.o
55 - CFLAGS += -DUSE_SELINUX
56 + override CFLAGS += -DUSE_SELINUX
59 ifeq ($(strip $(USE_STATIC)),true)
60 - CFLAGS += -DUSE_STATIC
62 + override CFLAGS += -DUSE_STATIC
63 + override LDFLAGS += -static
66 ifeq ($(strip $(V)),false)