Changeset 10 for python/trunk/Lib/distutils/emxccompiler.py
- Timestamp:
- Sep 3, 2010, 5:33:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk/Lib/distutils/emxccompiler.py
r2 r10 64 64 # Hard-code GCC because that's what this is all about. 65 65 # 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 -Z mt -Zcrtdll',69 linker_so='gcc -Zomf -Z mt -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') 70 70 71 71 # want the gcc library statically linked (so that we don't have … … 139 139 "EXPORTS"] 140 140 for sym in export_symbols: 141 contents.append(' " %s"' % sym)141 contents.append(' "_%s"' % sym) 142 142 self.execute(write_file, (def_file, contents), 143 143 "writing %s" % def_file) … … 209 209 # to deal with file naming/searching differences 210 210 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"] 213 212 214 213 # get EMX's default library directory search path … … 218 217 emx_dirs = [] 219 218 219 #print "dirs:",dirs 220 220 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 227 226 228 227 # Oops, didn't find it in *any* of 'dirs'
Note:
See TracChangeset
for help on using the changeset viewer.