I now have a replacement shell "library" (it's only 60 lines) that replicates the functions of the dpkg-buildpackage diversion script from dpkg-cross (which was perl) and with a few more tests I will be able to submit this as a patch to the dpkg-buildpackage script in dpkg-dev. With other changes to dpkg-shlibdeps to merge that into dpkg-dev, I anticipate this construction: 1. dpkg-dev does not need to depend on dpkg-cross 2. dpkg-cross Enhances: dpkg-dev, Depends: dpkg-dev (>= 1.15) 3. This code (or something quite like it) in dpkg-buildpackage from dpkg-dev (somewhere around line 87-ish): DPKGCROSSENABLE=0 if [ -f /usr/share/dpkg-cross/buildcross ]; then . /usr/share/dpkg-cross/buildcross DPKGCROSSENABLE=1 fi function enhance_cross { if [ $DPKGCROSSENABLE -gt 0 ]; then setup_cross fi } The '-a' switch to dpkg-buildpackage then calls a new function, patched into dpkg-dev: ... -a*) targetarch="$value"; checkbuilddep=false; enhance_cross ;; ... setup_cross comes from the new dpkg-cross file and basically implements the path and environment changes within the dpkg-dev version of dpkg-buildpackage to access /usr/share/dpkg-cross/bin/gccross and cross-config.$arch files. gccross rewrites the @ARGV during the build to ensure that the cross-compiler locates the correct headers and shared object files. cross-config.$arch provides common cached values for ./configure on the requested arch. This way, the patch to dpkg-dev is trivial and debian-embedded can update all the relevant files as often as needed without affecting dpkg. (We don't need to bug you for future updates!) It's so trivial, it could almost go in as-is - I just need to finish the dpkg-shlibdeps code. The remaining changes are in gccross and porting the dpkg-cross dpkg-shlibdeps diversion code into the dpkg-dev version (both are perl) to use the binutils-mulitarch versions of objdump and strip. dpkg-cross can then remove the dpkg-buildpackage and dpkg-shlibdeps diversions and relocate the scripts into /usr/share/dpkg-cross alongside the old versions of objcopy, objdump and strip for reference / trouble-shooting. The final dpkg-cross 2.0.0 release will remove the files completely. Only dpkg-cross goes into /usr/bin/. I'm thinking that we could have a /usr/share/dpkg-cross/bin/gccross so that there is no chance of the old scripts being called accidentally. It seems strange to have a bin/ below share/ but I'm not sure what else to call it at the moment. The only file on my system in a similar location is /usr/share/openoffice/bin/openoffice-xlate-lang which is also a perl script. This will be in dpkg-cross 1.99+2.0.0pre2 (experimental) - although pre1 is yet to leave NEW. :-( -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/ -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
pgpo8ym8cxNk0.pgp
Description: PGP signature