File sar2-2.3.2-optflags.patch of Package sar2
diff -up sar2-2.3.2/src/SConscript.optflags sar2-2.3.2/src/SConscript
--- sar2-2.3.2/src/SConscript.optflags 2017-01-30 13:21:00.139188769 -0500
+++ sar2-2.3.2/src/SConscript 2017-01-30 13:23:26.427955596 -0500
@@ -1,10 +1,22 @@
env = Environment()
+AddOption( "--optflags",
+ dest="optflags",
+ type="string",
+ nargs=1,
+ action="store",
+ help="set custom optflags")
+
+optflags = GetOption("optflags")
+
+
debug = ARGUMENTS.get('debug', 0)
if int(debug):
env.Append(CPPFLAGS = ['-g', '-Wall', '-O0', '-finline-functions',
'-Wno-write-strings', '-DHAVE_LIBXPM'])
+elif optflags:
+ env.Append( CPPFLAGS = optflags )
else:
env.Append(CPPFLAGS = ['-O6', '-funroll-loops',
'-fomit-frame-pointer',