Remove redundant inclusion of -O2 -g in powertop_CXXFLAGS
Magnus Fromreide
PATCH 2/3 Remove redundant inclusion of -O2 -g in powertop_CXXFLAGS
When building a program then program_CXXFLAGS replaces AM_CXXFLAGS and CXXFLAGS is appended to it, this is the reason for the double -O2 -g options when building the powertop binary.
This patch removes the extra -O2 -g and returns the control of the optimization and debug flags to CXXFLAGS as one would expect.
Please note that the default value of CXXFLAGS is -O2 -g if the compiler supports it.
--- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/Makefile.am +1 -1
@@ -33,7 +33,7 @@ powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/par main.cpp css.h powertop.css -powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) +powertop_CXXFLAGS = -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
Signature · 1 line
1.7.10
Chris Ferron
Quoted 20 lines · Magnus Fromreide
When building a program then
program_CXXFLAGSreplacesAM_CXXFLAGSand CXXFLAGS is appended to it, this is the reason for the double -O2 -g options when building the powertop binary.This patch removes the extra -O2 -g and returns the control of the optimization and debug flags to CXXFLAGS as one would expect.
Please note that the default value of CXXFLAGS is -O2 -g if the compiler supports it.
Signed-off-by Magnus Fromreide<magfr(a)lysator.liu.se>--- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/Makefile.am +0
-0
src/Makefile.am powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/par · line 39
Quoted 8 lines
src/Makefile.am +1
-1@@ -33,7 +33,7 @@ powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/par main.cpp css.h powertop.css -powertop_CXXFLAGS = -O2 -g -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) +powertop_CXXFLAGS = -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
patch applied
Thank You
-Chris