scons: Remove dead code/comments.
[mesa.git] / scons / crossmingw.py
index 949fc4fb1dcc8bd8860e8c13df586a3d0779b5ee..34129450a56cdf14d8da50242c9c5b7a40a37c5c 100644 (file)
@@ -41,26 +41,13 @@ import SCons.Builder
 import SCons.Tool
 import SCons.Util
 
-# This is what we search for to find mingw:
+# These are the mingw toolchain prefixes we search for:
+# (We only search for the mingw-w64 toolchain, and not the mingw.org one.)
 prefixes32 = SCons.Util.Split("""
-    mingw32-
-    mingw32msvc-
-    i386-mingw32-
-    i486-mingw32-
-    i586-mingw32-
-    i686-mingw32-
-    i386-mingw32msvc-
-    i486-mingw32msvc-
-    i586-mingw32msvc-
-    i686-mingw32msvc-
-    i686-pc-mingw32-
     i686-w64-mingw32-
 """)
 prefixes64 = SCons.Util.Split("""
     x86_64-w64-mingw32-
-    amd64-mingw32-
-    amd64-mingw32msvc-
-    amd64-pc-mingw32-
 """)
 
 def find(env):
@@ -130,40 +117,6 @@ SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
 
 
 
-def compile_without_gstabs(env, sources, c_file):
-    '''This is a hack used to compile some source files without the
-    -gstabs option.
-
-    It seems that some versions of mingw32's gcc (4.4.2 at least) die
-    when compiling large files with the -gstabs option.  -gstabs is
-    related to debug symbols and can be omitted from the effected
-    files.
-
-    This function compiles the given c_file without -gstabs, removes
-    the c_file from the sources list, then appends the new .o file to
-    sources.  Then return the new sources list.
-    '''
-
-    # Modify CCFLAGS to not have -gstabs option:
-    env2 = env.Clone()
-    flags = str(env2['CCFLAGS'])
-    flags = flags.replace("-gstabs", "")
-    env2['CCFLAGS'] = SCons.Util.CLVar(flags)
-    
-    # Build the special-case files:
-    obj_file = env2.SharedObject(c_file)
-
-    # Replace ".cpp" or ".c" with ".o"
-    o_file = c_file.replace(".cpp", ".o")
-    o_file = o_file.replace(".c", ".o")
-
-    # Replace the .c files with the specially-compiled .o file
-    sources.remove(c_file)
-    sources.append(o_file)
-
-    return sources
-
-
 def generate(env):
     mingw_prefix = find(env)
 
@@ -221,19 +174,5 @@ def generate(env):
     env['LIBPREFIXES']    = [ 'lib', '' ]
     env['LIBSUFFIXES']    = [ '.a', '.lib' ]
 
-    # MinGW port of gdb does not handle well dwarf debug info which is the
-    # default in recent gcc versions
-    env.AppendUnique(CCFLAGS = ['-gstabs'])
-
-    env.AppendUnique(CPPDEFINES = [('__MSVCRT_VERSION__', '0x0700')])
-    #env.AppendUnique(LIBS = ['iberty'])
-    env.AppendUnique(SHLINKFLAGS = ['-Wl,--enable-stdcall-fixup'])
-    #env.AppendUnique(SHLINKFLAGS = ['-Wl,--kill-at'])
-
-    # Avoid depending on gcc runtime DLLs
-    env.AppendUnique(LINKFLAGS = ['-static-libgcc'])
-
-    env.AddMethod(compile_without_gstabs, 'compile_without_gstabs')
-
 def exists(env):
     return find(env)