File dmenu-optflags.patch of Package dmenu

Index: dmenu-4.8/config.mk
===================================================================
--- dmenu-4.8.orig/config.mk
+++ dmenu-4.8/config.mk
@@ -23,9 +23,9 @@ INCS = -I${X11INC} -I${FREETYPEINC}
 LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
 
 # flags
-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
-CFLAGS   = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
-LDFLAGS  = -s ${LIBS}
+CPPFLAGS += -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
+CFLAGS   := $(CFLAGS) -Wall $(INCS) $(CPPFLAGS)
+LDFLAGS  += $(LIBS)
 
 # compiler and linker
 CC = cc
Index: dmenu-4.8/Makefile
===================================================================
--- dmenu-4.8.orig/Makefile
+++ dmenu-4.8/Makefile
@@ -26,11 +26,11 @@ ${OBJ}: arg.h config.h config.mk drw.h
 
 dmenu: dmenu.o drw.o util.o
 	@echo CC -o $@
-	@${CC} -o $@ dmenu.o drw.o util.o ${LDFLAGS}
+	@${CC} $(CFLAGS) -o $@ dmenu.o drw.o util.o ${LDFLAGS}
 
 stest: stest.o
 	@echo CC -o $@
-	@${CC} -o $@ stest.o ${LDFLAGS}
+	@${CC} $(CFLAGS) -o $@ stest.o ${LDFLAGS}
 
 clean:
 	@echo cleaning
openSUSE Build Service is sponsored by