aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-09 16:11:45 +0000
committerlloyd <[email protected]>2009-10-09 16:11:45 +0000
commitb37dbf1f1c80168f79bcb59809be5002dc7515b4 (patch)
treed3891048ea9b2f31c9f492ce5299beb319f215a7
parent22d3cefcb55369ceaece846bc2fa0c34edfb75fe (diff)
Fix --enable-debug
With GCC, only use -finline-functions if not a debug build
-rwxr-xr-xconfigure.py14
-rw-r--r--src/build-data/cc/gcc5
2 files changed, 14 insertions, 5 deletions
diff --git a/configure.py b/configure.py
index 1c4edb851..0f5e1502d 100755
--- a/configure.py
+++ b/configure.py
@@ -519,6 +519,14 @@ class CompilerInfo(object):
return ''
+ def library_opt_flags(self, debug_build):
+ flags = self.lib_opt_flags
+ if debug_build and self.debug_flags != '':
+ flags += ' ' + self.debug_flags
+ if not debug_build and self.no_debug_flags != '':
+ flags += ' ' + self.no_debug_flags
+ return flags
+
def so_link_command_for(self, osname):
if osname in self.so_link_flags:
return self.so_link_flags[osname]
@@ -731,7 +739,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo):
options.arch,
options.cpu),
- 'lib_opt': cc.lib_opt_flags,
+ 'lib_opt': cc.library_opt_flags(options.debug_build),
'mach_opt': cc.mach_opts(options.arch, options.cpu),
'check_opt': cc.check_opt_flags,
'lang_flags': cc.lang_flags + options.extra_flags,
@@ -1139,7 +1147,7 @@ if __name__ == '__main__':
main()
except Exception, e:
print >>sys.stderr, e
- #import traceback
- #traceback.print_exc(file=sys.stderr)
+ import traceback
+ traceback.print_exc(file=sys.stderr)
sys.exit(1)
sys.exit(0)
diff --git a/src/build-data/cc/gcc b/src/build-data/cc/gcc
index 606b622f6..9adef8cfb 100644
--- a/src/build-data/cc/gcc
+++ b/src/build-data/cc/gcc
@@ -16,10 +16,11 @@ lang_flags "-D_REENTRANT -ansi -Wno-long-long"
warning_flags "-W -Wall"
#warning_flags "-Wextra -Wall -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wno-unused-parameter"
-lib_opt_flags "-O2 -finline-functions"
-check_opt_flags "-O2"
+lib_opt_flags "-O2"
+check_opt_flags "-O"
shared_flags "-fPIC"
debug_flags "-g"
+no_debug_flags "-finline-functions"
dll_import_flags ""
dll_export_flags ""