summaryrefslogtreecommitdiff
path: root/scons
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-03-20 10:52:17 +1000
committerDave Airlie <airlied@redhat.com>2009-03-20 10:52:17 +1000
commit407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (patch)
tree2d9d05a5c3122f41a13aa8bd9ae921c1176e6b0d /scons
parentbdaa0341caffc353fd26bbd91865c2d86eed11c1 (diff)
parent114bb54324f22cb53bcd14607234d0acd74d37bd (diff)
Merge remote branch 'main/master' into radeon-rewrite
Conflicts: src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/r300/r300_state.c src/mesa/drivers/dri/r300/r300_swtcl.c src/mesa/drivers/dri/r300/radeon_ioctl.c src/mesa/drivers/dri/radeon/radeon_screen.c
Diffstat (limited to 'scons')
-rw-r--r--scons/gallium.py15
-rw-r--r--scons/generic.py20
2 files changed, 27 insertions, 8 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index fc1ed08e478..ecdeef06fdf 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -330,9 +330,14 @@ def generate(env):
]
if env['machine'] == 'x86_64':
cflags += ['-m64']
+ # See also:
+ # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
cflags += [
+ '-Werror=declaration-after-statement',
'-Wall',
'-Wmissing-prototypes',
+ '-Wmissing-field-initializers',
+ '-Wpointer-arith',
'-Wno-long-long',
'-ffast-math',
'-std=gnu99',
@@ -347,6 +352,7 @@ def generate(env):
'/Od', # disable optimizations
'/Oi', # enable intrinsic functions
'/Oy-', # disable frame pointer omission
+ '/GL-', # disable whole program optimization
]
else:
cflags += [
@@ -437,10 +443,15 @@ def generate(env):
linkflags += ['-m32']
if env['machine'] == 'x86_64':
linkflags += ['-m64']
- if platform == 'winddk':
+ if platform == 'windows' and msvc:
# See also:
# - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx
linkflags += [
+ '/fixed:no',
+ '/incremental:no',
+ ]
+ if platform == 'winddk':
+ linkflags += [
'/merge:_PAGE=PAGE',
'/merge:_TEXT=.text',
'/section:INIT,d',
@@ -467,7 +478,7 @@ def generate(env):
'/entry:DrvEnableDriver',
]
- if env['profile']:
+ if env['debug'] or env['profile']:
linkflags += [
'/MAP', # http://msdn.microsoft.com/en-us/library/k7xkk3e2.aspx
]
diff --git a/scons/generic.py b/scons/generic.py
index 23231966731..01a374e3633 100644
--- a/scons/generic.py
+++ b/scons/generic.py
@@ -405,17 +405,19 @@ def generate(env):
]
if env['machine'] == 'x86_64':
ccflags += ['-m64']
+ # See also:
+ # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
ccflags += [
+ '-Werror=declaration-after-statement',
'-Wall',
'-Wmissing-prototypes',
+ '-Wmissing-field-initializers',
+ '-Wpointer-arith',
'-Wno-long-long',
'-ffast-math',
- '-pedantic',
+ '-std=gnu99',
'-fmessage-length=0', # be nice to Eclipse
]
- cflags += [
- '-Wmissing-prototypes',
- ]
if msvc:
# See also:
# - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx
@@ -425,6 +427,7 @@ def generate(env):
'/Od', # disable optimizations
'/Oi', # enable intrinsic functions
'/Oy-', # disable frame pointer omission
+ '/GL-', # disable whole program optimization
]
else:
ccflags += [
@@ -516,10 +519,15 @@ def generate(env):
linkflags += ['-m32']
if env['machine'] == 'x86_64':
linkflags += ['-m64']
- if platform == 'winddk':
+ if platform == 'windows' and msvc:
# See also:
# - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx
linkflags += [
+ '/fixed:no',
+ '/incremental:no',
+ ]
+ if platform == 'winddk':
+ linkflags += [
'/merge:_PAGE=PAGE',
'/merge:_TEXT=.text',
'/section:INIT,d',
@@ -546,7 +554,7 @@ def generate(env):
'/entry:DrvEnableDriver',
]
- if env['profile']:
+ if env['debug'] or env['profile']:
linkflags += [
'/MAP', # http://msdn.microsoft.com/en-us/library/k7xkk3e2.aspx
]