Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 145206 | Differences between
and this patch

Collapse All | Expand All

(-)Python-2.5.2.old1/Lib/distutils/ccompiler.py (-1 / +4 lines)
Lines 689-700 class CCompiler: Link Here
689
                                    depends, extra_postargs)
689
                                    depends, extra_postargs)
690
        cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
690
        cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
691
691
692
        lang = self.detect_language(sources)
693
692
        for obj in objects:
694
        for obj in objects:
693
            try:
695
            try:
694
                src, ext = build[obj]
696
                src, ext = build[obj]
695
            except KeyError:
697
            except KeyError:
696
                continue
698
                continue
697
            self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
699
            self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts,
700
                          lang=lang)
698
701
699
        # Return *all* object filenames, not just the ones we just built.
702
        # Return *all* object filenames, not just the ones we just built.
700
        return objects
703
        return objects
(-)Python-2.5.2.old1/Lib/distutils/unixccompiler.py (-4 / +5 lines)
Lines 166-181 class UnixCCompiler(CCompiler): Link Here
166
            except DistutilsExecError, msg:
166
            except DistutilsExecError, msg:
167
                raise CompileError, msg
167
                raise CompileError, msg
168
168
169
    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
169
    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts,
170
                 lang='c'):
170
        compiler_so = self.compiler_so
171
        compiler_so = self.compiler_so
171
        compiler_cxx_so = self.compiler_cxx_so
172
        compiler_cxx_so = self.compiler_cxx_so
172
        if sys.platform == 'darwin':
173
        if sys.platform == 'darwin':
173
            compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs)
174
            compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs)
174
        try:
175
        try:
175
            if ext == '.c' or ext == '.m':
176
            if lang == 'c++':
176
                cc = compiler_so + cc_args
177
            else:
178
                cc = compiler_cxx_so + cc_args
177
                cc = compiler_cxx_so + cc_args
178
            else:
179
                cc = compiler_so + cc_args
179
            self.spawn(cc + cc_args + [src, '-o', obj] +
180
            self.spawn(cc + cc_args + [src, '-o', obj] +
180
                       extra_postargs)
181
                       extra_postargs)
181
        except DistutilsExecError, msg:
182
        except DistutilsExecError, msg:

Return to bug 145206