129 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			129 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff -ruN Python-3.2.2-old//configure Python-3.2.2/configure
 | |
| --- Python-3.2.2-old//configure	2011-09-04 02:16:50.000000000 +1000
 | |
| +++ Python-3.2.2/configure	2011-10-30 19:19:13.852835272 +1000
 | |
| @@ -12160,7 +12160,7 @@
 | |
|  if ${ac_cv_broken_sem_getvalue+:} false; then :
 | |
|    $as_echo_n "(cached) " >&6
 | |
|  else
 | |
| -  if test "$cross_compiling" = yes; then :
 | |
| +  if test "$cross_compiling" = no; then :
 | |
|    ac_cv_broken_sem_getvalue=yes
 | |
|  else
 | |
|    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 | |
| @@ -13625,7 +13625,7 @@
 | |
|    $as_echo_n "(cached) " >&6
 | |
|  else
 | |
|    if test "$cross_compiling" = yes; then :
 | |
| -  ac_cv_have_long_long_format=no
 | |
| +  ac_cv_have_long_long_format="yes"
 | |
|  else
 | |
|    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 | |
|  /* end confdefs.h.  */
 | |
| diff -ruN Python-3.2.2-old//Makefile.pre.in Python-3.2.2/Makefile.pre.in
 | |
| --- Python-3.2.2-old//Makefile.pre.in	2011-09-04 02:16:45.000000000 +1000
 | |
| +++ Python-3.2.2/Makefile.pre.in	2011-10-30 19:25:23.480851641 +1000
 | |
| @@ -435,8 +435,8 @@
 | |
|  # Build the shared modules
 | |
|  sharedmods: $(BUILDPYTHON)
 | |
|  	@case $$MAKEFLAGS in \
 | |
| -	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
 | |
| -	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
 | |
| +	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
 | |
| +	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
 | |
|  	esac
 | |
|  
 | |
|  # Build static library
 | |
| @@ -587,7 +587,7 @@
 | |
|  $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
 | |
|  Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
 | |
|  		-@$(INSTALL) -d Include
 | |
| -		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
 | |
| +		$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
 | |
|  		-touch Parser/pgen.stamp
 | |
|  
 | |
|  $(PGEN):	$(PGENOBJS)
 | |
| @@ -1102,7 +1102,8 @@
 | |
|  # Install the dynamically loadable modules
 | |
|  # This goes into $(exec_prefix)
 | |
|  sharedinstall: sharedmods
 | |
| -	$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
 | |
| +	CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' CROSS_COMPILE='$(CROSS_COMPILE)' \
 | |
| +	$(RUNSHARED) ./$(HOSTPYTHON) -E $(srcdir)/setup.py install \
 | |
|  	   	--prefix=$(prefix) \
 | |
|  		--install-scripts=$(BINDIR) \
 | |
|  		--install-platlib=$(DESTSHARED) \
 | |
| diff -ruN Python-3.1.3Orig/setup.py Python-3.1.3/setup.py
 | |
| --- Python-3.1.3Orig/setup.py   2010-11-26 21:56:26.000000000 +1000
 | |
| +++ Python-3.1.3/setup.py       2011-01-03 23:08:51.489831251 +1000
 | |
| @@ -292,6 +292,8 @@
 | |
|              self.announce('WARNING: skipping import check for Cygwin-based "%s"'
 | |
|                  % ext.name)
 | |
|              return
 | |
| +        if os.environ.get('CROSS_COMPILE_TARGET') == 'yes':
 | |
| +            return
 | |
|          ext_filename = os.path.join(
 | |
|              self.build_lib,
 | |
|              self.get_ext_filename(self.get_ext_fullname(ext.name)))
 | |
| @@ -304,27 +306,31 @@
 | |
|          try:
 | |
|              imp.load_dynamic(ext.name, ext_filename)
 | |
|          except ImportError as why:
 | |
| -            self.failed.append(ext.name)
 | |
| -            self.announce('*** WARNING: renaming "%s" since importing it'
 | |
| -                          ' failed: %s' % (ext.name, why), level=3)
 | |
| -            assert not self.inplace
 | |
| -            basename, tail = os.path.splitext(ext_filename)
 | |
| -            newname = basename + "_failed" + tail
 | |
| -            if os.path.exists(newname):
 | |
| -                os.remove(newname)
 | |
| -            os.rename(ext_filename, newname)
 | |
| -
 | |
| -            # XXX -- This relies on a Vile HACK in
 | |
| -            # distutils.command.build_ext.build_extension().  The
 | |
| -            # _built_objects attribute is stored there strictly for
 | |
| -            # use here.
 | |
| -            # If there is a failure, _built_objects may not be there,
 | |
| -            # so catch the AttributeError and move on.
 | |
| -            try:
 | |
| -                for filename in self._built_objects:
 | |
| -                    os.remove(filename)
 | |
| -            except AttributeError:
 | |
| -                self.announce('unable to remove files (ignored)')
 | |
| +            if os.environ.get('CROSS_COMPILE_TARGET') != "yes":
 | |
| +                self.announce('*** WARNING: renaming "%s" since importing it'
 | |
| +                              ' failed: %s' % (ext.name, why), level=3)
 | |
| +                assert not self.inplace
 | |
| +                basename, tail = os.path.splitext(ext_filename)
 | |
| +                newname = basename + "_failed" + tail
 | |
| +                if os.path.exists(newname):
 | |
| +                    os.remove(newname)
 | |
| +                os.rename(ext_filename, newname)
 | |
| +
 | |
| +                # XXX -- This relies on a Vile HACK in
 | |
| +                # distutils.command.build_ext.build_extension().  The
 | |
| +                # _built_objects attribute is stored there strictly for
 | |
| +                # use here.
 | |
| +                # If there is a failure, _built_objects may not be there,
 | |
| +                # so catch the AttributeError and move on.
 | |
| +                try:
 | |
| +                    for filename in self._built_objects:
 | |
| +                        os.remove(filename)
 | |
| +                except AttributeError:
 | |
| +                    self.announce('unable to remove files (ignored)')
 | |
| +            else:
 | |
| +                self.announce('WARNING: "%s" failed importing, but we leave it '
 | |
| +                              'because we are cross-compiling' %
 | |
| +                              ext.name)
 | |
|          except:
 | |
|              exc_type, why, tb = sys.exc_info()
 | |
|              self.announce('*** WARNING: importing extension "%s" '
 | |
| @@ -1603,7 +1609,7 @@
 | |
|                                           ffi_configfile):
 | |
|                  from distutils.dir_util import mkpath
 | |
|                  mkpath(ffi_builddir)
 | |
| -                config_args = []
 | |
| +                config_args =  sysconfig.get_config_var("CONFIG_ARGS").split(" ")
 | |
| 
 | |
|                  # Pass empty CFLAGS because we'll just append the resulting
 | |
|                  # CFLAGS to Python's; -g or -O2 is to be avoided.
 |