Looks better. Still have a few comments; carrying over conversation from the previous merge request. > b) /usr/$arch exec_prefix > exec_prefix is DEB_HOST_GNU_TYPE Is that == $arch? > These are the build host installation directories - "sysroot" > where crossed packages are installed, so they are needed in the path. I assumed from context that exec_prefix is $arch. dpkg-cross installs all packages to /usr/$arch/lib, /usr/$arch/include. multiarch packages will install to /usr/lib/$arch and /usr/include/$arch (but you shouldn't need to add these paths anywhere because they're on the system path). The only way to get a path of /usr/$arch/usr/lib or /usr/$arch/usr/include, from a package, is by unpacking it directly to /usr/$arch with 'dpkg -x'. That should never be needed; basically this is a workaround for a bug in some other package not being crossable with dpkg-cross, and I don't think we should merge those workarounds into the package. > c) I'm dropping the arm, not adding it. There are several other tests > against DEB_HOST_ARCH for it..... Yes - but it's a test for the architecture named 'arm', whereas all our builds are for 'armel', which should never match here. Whatever this check was needed for on the old OABI port, it probably still applies there and we shouldn't change it. New comments: The one thing I notice with cross.patch is that all the make dependencies have been changed from $(BUILDPYTHON) to $(PYTHON). I probably didn't explain this very well in my previous message; I meant that in the general case, there should be a dependency on both of these targets, e.g.: -build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks +build_all: $(BUILDPYTHON) $(PYTHON) oldsharedmods sharedmods gdbhooks and -platform: $(BUILDPYTHON) +platform: $(BUILDPYTHON) $(PYTHON) This ensures that both the host and build python interpreters are available before trying to call these rules, so that all of the dependencies of the $(PYTHON) target have also been built first in case they're referenced. In the native compilation case, $(BUILDPYTHON) $(PYTHON) is simply redundant, so not a problem. I've also just spied this: +$(PYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ Modules/python.o \ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) BLDLIBRARY is a variable referring to options for the build architecture, so we need to update this to $(LDLIBRARY) as well. # Build the shared modules -sharedmods: $(BUILDPYTHON) +sharedmods: $(PYTHON) @case $$MAKEFLAGS in \ - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ esac I'm pretty sure this dropping of '-q' is unnecessary here and should be reverted. @@ -423,7 +425,7 @@ fi libpython$(VERSION).dylib: $(LIBRARY_OBJS) - $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ + $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ libpython$(VERSION).sl: $(LIBRARY_OBJS) Unnecessary whitespace change. Would be nice to clean up upstream, but not relevant to this patch. @@ -531,7 +533,7 @@ $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) -@$(INSTALL) -d Include - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + -$(BUILDPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) $(PGEN): $(PGENOBJS) $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) $(GRAMMAR_H) target should depend on both $(PGEN) and $(BUILDPGEN), same rationale as for python targets. Otherwise, this is looking good. Thanks for taking care of this!