[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg-cross maintenance / development



Hello Nikita and Raphael,

Quoting "Nikita V. Youshchenko" <yoush@cs.msu.su>:
> > An another question. I'm playing here with dpkg-cross and my
> > modifications. I saw that dh_strip won't be replaced so native strip is
> > running for cross-compiled libraries. Without binutils-multiarch the ELF
> > file is destroyed!

I also noticed that behaviour. So that is why I have dh_stripcross_embed. I 
submitted a patch for it, but I was told it was better to use the 
binutils-multiarch package. And so the patch was rejected.
This is the relevant section. As the CROSSPREFIX is always exported it calls the 
correct strip utility (if it is in your path, which should be anyway). Other 
solution would be the $DEB_HOST_GNU_TYPE variable but that would cause trouble 
with non standard toolchains (only arch-linux would be supported, unless we 
change that)


foreach (@shared_libs) {
		# Note that all calls to strip on shared libs
		# *must* inclde the --strip-unneeded.
		doit("$ENV{CROSSPREFIX}strip","--remove-section=.comment",
			"--remove-section=.note","--strip-unneeded",$_);
	}
	
	foreach (@executables) {
		doit("$ENV{CROSSPREFIX}strip","--remove-section=.comment",
			"--remove-section=.note",$_);
	}

	foreach (@static_libs) {
		doit("strip","--strip-debug",$_);
	}
}


I made your (Nikita) dpkg-cross stuff work once and noticed it came back. So is 
the CROSSPREFIX exported correctly?

> IMHO the correct fix should go to debhelper's dh_strip: it should honour 
> $STRIP environment variable. In general, it would be good (at least for 
> EmDebian people) if debhelper and dpkg-dev scripts would honour a set of 
> environment variables to locate executables and data files. Currently 
> EmDebian's stag-addons tries to replace debhelper completely, which will 
> cause out-of-sync problems in the long term.

Well that is why I chose to make a parallel structure with all the _embed 
scripts. And that was easy enough by replacing debian by emdebian in the 
scripts. (But you noticed that already). But the fact stays it would get out of 
sync with debhelper once, but without breaking the emdebian debhelper system as 
it is completely seperate (not like the dpkg-cross package)

> A good temporary solution for the issue with dh_strip for dpkg-cross is to 
> devert it with a script that will:
> - - locate appropriate strip binary,
> - - if binary name is not "strip", create a temporary directory and a symlink
> 
> named "strip" there that will point to the strip binary,
> - - set PATH such that correct strip binary will be called
> - - execute original dh_strip
> - - remove temporary directory if one was created.

It is another solution...

regards,

Philippe


| Philippe De Swert -GNU/linux - uClinux freak-     
|     
| Stag developer http://stag.mind.be/ 
| Emdebian developer: http://www.emdebian.org 
|  
| Please do not send me documents in a closed format. (*.doc,*.xls,*.ppt)   
| Use the open alternatives. (*.pdf,*.ps,*.html,*.txt)   
| Why? http://pallieter.is-a-geek.org:7832/~johan/word/english/   

--------------------------------------------------------------------------
Gestuurd via het webmailsysteem van het De Nayer Instituut: www.denayer.be



Reply to: