• Home
  • Raw
  • Download

Lines Matching +full:gcc +full:- +full:c

4 handles the Cygwin port of the GNU C compiler to Windows.  It also contains
5 the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
6 cygwin in no-cygwin mode).
14 # - create a def-file for python??.dll
15 # - create an import library using
16 # dlltool --dllname python15.dll --def python15.def \
17 # --output-lib libpython15.a
21 # * We put export_symbols in a def-file, and don't use
22 # --export-all-symbols because it doesn't worked reliable in some
28 # * cygwin gcc 2.91.57/ld 2.9.4/dllwrap 0.2.4 works
29 # (after patching python's config.h and for C++ some other include files)
31 # * mingw32 gcc 2.95.2/ld 2.9.4/dllwrap 0.2.4 works
32 # (ld doesn't support -shared, so we use dllwrap)
33 # * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now
34 # - its dllwrap doesn't work, there is a bug in binutils 2.10.90
35 # see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html
36 # - using gcc -mdll instead dllwrap doesn't work without -static because
39 # By specifying -static we force ld to link against the import libraries,
43 # * cygwin gcc 3.2/ld 2.13.90 works
44 # (ld supports -shared)
45 # * mingw gcc 3.2/ld 2.13 works
46 # (ld supports -shared)
66 if msc_pos != -1:
88 """ Handles the Cygwin port of the GNU C compiler to Windows.
103 self.debug_print("Python's GCC status: %s (details: %s)" %
114 self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" %
120 # gcc -mdll instead of dllwrap
125 self.linker_dll = "gcc"
129 # ld_version >= "2.13" support -shared so use it instead of
130 # -mdll -static
132 shared_option = "-shared"
134 shared_option = "-mdll -static"
136 # Hard-code GCC because that's what this is all about.
138 self.set_executables(compiler='gcc -mcygwin -O -Wall',
139 compiler_so='gcc -mcygwin -mdll -O -Wall',
140 compiler_cxx='g++ -mcygwin -O -Wall',
141 linker_exe='gcc -mcygwin',
142 linker_so=('%s -mcygwin %s' %
148 # (gcc version 2.91.57) -- perhaps something about initialization
151 "Consider upgrading to a newer version of gcc")
158 """Compiles the source by spawning GCC and windres if needed."""
160 # gcc needs '.res' and '.rc' compiled to object files !!!
162 self.spawn(["windres", "-i", src, "-o", obj])
165 else: # for other files use the C-compiler
167 self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
185 # handle export symbols by creating a def-file
186 # with executables this only works with gcc/ld as linker
188 (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
189 # (The linker doesn't do anything if output is up-to-date.
215 # next add options for def-file and to creating import libraries
217 # dllwrap uses different options than gcc/ld
219 extra_preargs.extend(["--output-lib", lib_file])
221 extra_preargs.extend(["--def", def_file])
222 # we use gcc/ld here and can be sure ld is >= 2.9.10
225 #extra_preargs.extend(["-Wl,--out-implib,%s" % lib_file])
226 # for gcc/ld the def-file is specified as any object files
230 # (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
239 extra_preargs.append("-s")
244 None, # export_symbols, we do this in our def-file
248 # -- Miscellaneous methods -----------------------------------------
274 """ Handles the Mingw32 port of the GNU C compiler to Windows.
282 # ld_version >= "2.13" support -shared so use it instead of
283 # -mdll -static
285 shared_option = "-shared"
287 shared_option = "-mdll -static"
290 # but cygwin 2.91.57 in no-cygwin-mode needs it.
292 entry_point = '--entry _DllMain@12'
298 'Cygwin gcc cannot be used with --compiler=mingw32')
300 self.set_executables(compiler='gcc -O -Wall',
301 compiler_so='gcc -mdll -O -Wall',
302 compiler_cxx='g++ -O -Wall',
303 linker_exe='gcc',
307 # Maybe we should also append -mthreads, but then the finished
309 # (-mthreads: Support thread-safe exception handling on `Mingw32')
328 extensions with GCC.
333 - CONFIG_H_OK: all is well, go ahead and compile
334 - CONFIG_H_NOTOK: doesn't look good
335 - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h
337 'details' is a human-readable string explaining the situation.
340 the string "GCC" (implying that this Python was built with GCC), or the
345 # "pyconfig.h" check -- should probably be renamed...
349 # if sys.version contains GCC then python was compiled with GCC, and the
351 if "GCC" in sys.version:
352 return CONFIG_H_OK, "sys.version mentions 'GCC'"
393 """ Try to find out the versions of gcc, ld and dllwrap.
397 commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version']
401 '''Try to determine if the gcc that would be used is from cygwin.'''
402 out_string = check_output(['gcc', '-dumpmachine'])