203-opt_flags.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. build: Move optimization flags into a separate variable
  2. Isolate optimization related compiler flags from CFLAGS and move them into a
  3. separate COPTS variable so that it is easier to override optimizations from
  4. the environment.
  5. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
  6. --- a/pppd/plugins/radius/Makefile.linux
  7. +++ b/pppd/plugins/radius/Makefile.linux
  8. @@ -12,7 +12,8 @@ VERSION = $(shell awk -F '"' '/VERSION/
  9. INSTALL = install
  10. PLUGIN=radius.so radattr.so radrealms.so
  11. -CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
  12. +COPTS = -O2
  13. +CFLAGS=-I. -I../.. -I../../../include $(COPTS) -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
  14. # Uncomment the next line to include support for Microsoft's
  15. # MS-CHAP authentication protocol.
  16. --- a/pppdump/Makefile.linux
  17. +++ b/pppdump/Makefile.linux
  18. @@ -2,7 +2,8 @@ DESTDIR = $(INSTROOT)@DESTDIR@
  19. BINDIR = $(DESTDIR)/sbin
  20. MANDIR = $(DESTDIR)/share/man/man8
  21. -CFLAGS= -O -I../include/net
  22. +COPTS = -O
  23. +CFLAGS= $(COPTS) -I../include/net
  24. OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
  25. INSTALL= install