summaryrefslogtreecommitdiff
blob: d7e5f37817efa14496ed6ba989ec126d887195ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- a/SConstruct	2014-03-07 14:27:26.797904671 -0500
+++ b/SConstruct	2014-03-07 14:31:18.672478115 -0500
@@ -49,7 +49,7 @@
 build_target = 'all'
 
 # Optimization level
-opt_flags    = ' -g -O3 -DNDEBUG'
+opt_flags    = ' -DNDEBUG'
 
 # Architecture (defaults to build host type)
 compile_arch = ''
@@ -214,12 +214,12 @@
                       ' -Wall -Wextra -Wno-unused-parameter')
 
 # C-specific flags
-env.Replace(CFLAGS = ' -std=c99 -fno-strict-aliasing -pipe')
+env.Replace(CFLAGS = os.getenv('CFLAGS','') + ' -std=c99 -fno-strict-aliasing -pipe')
 
 # CXX-specific flags
 # Note: not all 3rd-party libs like '-Wold-style-cast -Weffc++'
 #       adding those after checks
-env.Replace(CXXFLAGS = ' -Wno-long-long -Wno-deprecated -ansi')
+env.Replace(CXXFLAGS = os.getenv('CXXFLAGS','') + ' -Wno-long-long -Wno-deprecated -ansi')
 if sysname != 'sunos':
     env.Append(CXXFLAGS = ' -pipe')
 
@@ -228,7 +228,7 @@
 # TODO: enable '-Wl,--warn-common -Wl,--fatal-warnings' after warnings from
 # static linking have beed addressed
 #
-env.Append(LINKFLAGS = link_arch)
+env.Append(LINKFLAGS = link_arch + ' ' + os.getenv('LDFLAGS',''))
 
 #
 # Check required headers and libraries (autoconf functionality)