Ignore:
Timestamp:
Sep 3, 2010, 5:33:06 PM (15 years ago)
Author:
Yuri Dario
Message:

python: merged offline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/trunk/Lib/distutils/emxccompiler.py

    r2 r10  
    6464        # Hard-code GCC because that's what this is all about.
    6565        # XXX optimization, warnings etc. should be customizable.
    66         self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
    67                              compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
    68                              linker_exe='gcc -Zomf -Zmt -Zcrtdll',
    69                              linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
     66        self.set_executables(compiler='gcc -g -O2 -march=i386 -mtune=i686 -fomit-frame-pointer -Wall',
     67                             compiler_so='gcc -g -O2 -march=i386 -mtune=i686 -fomit-frame-pointer -Wall',
     68                             linker_exe='gcc -Zomf -Zexe',
     69                             linker_so='gcc -Zomf -Zdll')
    7070
    7171        # want the gcc library statically linked (so that we don't have
     
    139139                "EXPORTS"]
    140140            for sym in export_symbols:
    141                 contents.append('  "%s"' % sym)
     141                contents.append('  "_%s"' % sym)
    142142            self.execute(write_file, (def_file, contents),
    143143                         "writing %s" % def_file)
     
    209209    # to deal with file naming/searching differences
    210210    def find_library_file(self, dirs, lib, debug=0):
    211         shortlib = '%s.lib' % lib
    212         longlib = 'lib%s.lib' % lib    # this form very rare
     211        try_names = [lib + ".lib", lib + ".a", "lib" + lib + ".lib", "lib" + lib + ".a"]
    213212
    214213        # get EMX's default library directory search path
     
    218217            emx_dirs = []
    219218
     219        #print "dirs:",dirs
    220220        for dir in dirs + emx_dirs:
    221             shortlibp = os.path.join(dir, shortlib)
    222             longlibp = os.path.join(dir, longlib)
    223             if os.path.exists(shortlibp):
    224                 return shortlibp
    225             elif os.path.exists(longlibp):
    226                 return longlibp
     221            for name in try_names:
     222                libfile = os.path.join(dir, name)
     223                #print "libfile:",libfile
     224                if os.path.exists(libfile):
     225                    return libfile
    227226
    228227        # Oops, didn't find it in *any* of 'dirs'
Note: See TracChangeset for help on using the changeset viewer.