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

Re: Bug#772665: produces broken cross compiler packages for mips64el

On Wed, Dec 10, 2014 at 09:54:01AM +0100, Matthias Klose wrote:
> I can't remember. please ask the Debian mips maintainers. I assume, extending
> the expression to entirely remove empty fields should work around this for now.

I did X-Debbugs-Cc the submission to debian-mips@l.d.o. So now I did
some archeology:

 * The affected code was inserted in the gcc-4.4 era.
 * It is inserted in SVN revision 4707.
 * The commit message closes #594540.

Unfortunately the bug report is rather scarce on details, but it appears
to be talking about library packages. So I went ahead and restricted the
match to lib$biarch. The immediate effect is that it no longer matches
"mips64el" and thus leaves the Recommends on libc alone. Thus the stage1
becomes installable. I did not notice any excess dependencies.

I could not verify further stages as the stage2 build fails linking the
n32 libc.so, because it insists on linking the 64 one. The latter may be
an error in my build environment.

Nevertheless, I am attaching a patch for what I believe to be the
correct solution.

diff -u gcc-4.9-4.9.2/debian/rules.defs gcc-4.9-4.9.2/debian/rules.defs
--- gcc-4.9-4.9.2/debian/rules.defs
+++ gcc-4.9-4.9.2/debian/rules.defs
@@ -1759,8 +1759,8 @@
 ifneq (,$(filter $(DEB_TARGET_ARCH), mips mipsel mips64 mips64el mipsn32 mipsn32el))
   define cross_mangle_control
-	$(if $(findstring lib64,$(1)),sed -i -r '/^(Dep|Rec|Sug)/s/[a-z0-9-]+32[^$(COMMA)]+($(COMMA) *|$$)//g;/^(Dep|Rec|Sug)/s/$(p_lgcc)/$(p_l64gcc)/;/^(Dep|Rec|Sug)/s/ *$(COMMA) *$$//' debian/$(1)/DEBIAN/control,@:)
-	$(if $(findstring libn32,$(1)),sed -i -r '/^(Dep|Rec|Sug)/s/[a-z0-9-]+64[^$(COMMA)]+($(COMMA) *|$$)//g;/^(Dep|Rec|Sug)/s/$(p_lgcc)/$(p_ln32gcc)/;/^(Dep|Rec|Sug)/s/ *$(COMMA) *$$//' debian/$(1)/DEBIAN/control,@:)
+	$(if $(findstring lib64,$(1)),sed -i -r '/^(Dep|Rec|Sug)/s/libn?32[^$(COMMA)]+($(COMMA) *|$$)//g;/^(Dep|Rec|Sug)/s/$(p_lgcc)/$(p_l64gcc)/;/^(Dep|Rec|Sug)/s/ *$(COMMA) *$$//' debian/$(1)/DEBIAN/control,@:)
+	$(if $(findstring libn32,$(1)),sed -i -r '/^(Dep|Rec|Sug)/s/lib64[^$(COMMA)]+($(COMMA) *|$$)//g;/^(Dep|Rec|Sug)/s/$(p_lgcc)/$(p_ln32gcc)/;/^(Dep|Rec|Sug)/s/ *$(COMMA) *$$//' debian/$(1)/DEBIAN/control,@:)
   define cross_mangle_control

Reply to: