From cdb7396390b0afffc0d33c9aba2898012802e6d0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 25 Aug 2011 16:50:56 -0600 Subject: scons: don't compile some files with -gstabs if using mingw32 Compiling some (large) files with i686-pc-mingw32-gcc 4.2.2 (at least) and the -gstabs option triggers a compiler error. Use this work-around to simply compile the effected files without -gstabs. --- src/gallium/auxiliary/SConscript | 4 ++++ src/mapi/glapi/SConscript | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript index e00040d97ab..07c420e138d 100644 --- a/src/gallium/auxiliary/SConscript +++ b/src/gallium/auxiliary/SConscript @@ -58,6 +58,10 @@ if env['llvm']: 'GALLIVM_CPP_SOURCES' ]) + if env['toolchain'] == 'crossmingw': + # compile lp_bld_misc.cpp without -gstabs option + source = env.compile_without_gstabs(source, "gallivm/lp_bld_misc.cpp") + gallium = env.ConvenienceLibrary( target = 'gallium', source = source, diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index a7764745eda..fdd65790013 100644 --- a/src/mapi/glapi/SConscript +++ b/src/mapi/glapi/SConscript @@ -74,6 +74,11 @@ if env['platform'] != 'winddk': else: pass + if env['toolchain'] == 'crossmingw': + # compile these files without -gstabs option + glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_dispatch.c") + glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_getproc.c") + glapi = env.ConvenienceLibrary( target = 'glapi', source = glapi_sources, -- cgit v1.2.3