merge cross build into "binary" target

Bug #587851 reported by Marcin Juszkiewicz
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: binutils

Host system: Ubuntu lucid x86-64 with some updates from maverick (binutils is one of them)

binutils: 2.20.51.20100527-1ubuntu1 (maverick)

As part of my work on cross compiler packages I had to merge "binary-cross" target into "binary". Reason is simple - make building of cross binutils even simpler then it is now.

"TARGET=arm dpkg-buildpackage -b -uc -us" or "echo arm >debian/target; dpkg-buildpackage -b -uc -us" is enough. No need to remember which make target to call.

Patch maybe is not ideal but it does what has to do. Please review and comment.

Tags: patch

Related branches

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

An updated version after review.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package binutils - 2.20.51.20100604-0ubuntu1

---------------
binutils (2.20.51.20100604-0ubuntu1) maverick; urgency=low

  * Snapshot, taken from the trunk 20100604.
  * Merge 'binary-cross' target into 'binary' one (Marcin Juszkiewicz).
    LP: #587851.
 -- Matthias Klose <email address hidden> Fri, 04 Jun 2010 13:55:50 +0200

Changed in binutils (Ubuntu):
status: New → Fix Released
Revision history for this message
Hector Oron (zumbi) wrote :

Hello,

  While ``binary-cross`` target exists for historical reason on deciding which way to go for cross tools:
  1) ``binary-cross`` make target
  2) environment variables (as gcc does) DEB_CROSS=yes
  It would also be great to set a common way to build all cross packages, as binutils uses TARGET= and gcc uses GCC_TARGET=

  When posible it would be great to keep old way to do things, for backwards compatibility, and not just remove features and add new ones.

  Justin, thanks very much for the update, I attach a patch for updating documentation.

  Please notice I have uploaded to Debian/experimental ``buildcross`` tool which aims to get cross built toolchains. It should be very easy know try to built a full set for all arches. So, please, submit bugs/patches to ``buildcross`` when updating cross builds.

  Thanks again. :-)

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

binutils (2.20.51.20100604-0ubuntu1) maverick; urgency=low

  * Snapshot, taken from the trunk 20100604.
  * Merge 'binary-cross' target into 'binary' one (Marcin Juszkiewicz).
    LP: #587851.

 -- Matthias Klose <email address hidden> Fri, 04 Jun 2010 13:55:50 +0200

Code from this bug was not merged only binutils code got updated.

Changed in binutils (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package binutils - 2.20.51.20100608-0ubuntu1

---------------
binutils (2.20.51.20100608-0ubuntu1) maverick; urgency=low

  * Snapshot, taken from the trunk 20100608.
  * Merge 'binary-cross' target into 'binary' one (Marcin Juszkiewicz).
    LP: #587851.
  * debian/copyright: Update to GFDL 1.3.
 -- Matthias Klose <email address hidden> Tue, 08 Jun 2010 13:26:49 +0200

Changed in binutils (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

Why is there still a binary-cross target in the current package? if it's old code, please remove it and point at the new code instead, e.g.:

binary-cross: binary

or:
binary-cross:
        @echo "Please use dpkg-buildpackage instead of calling binary-cross directly; see README.cross"
        @false

Revision history for this message
Loïc Minier (lool) wrote :

Trying to cross-build maverick's binutils under lucid, I get:
dpkg-genchanges: error: package binutils-arm-linux-gnueabi has priority optional in control file but extra in files list

Is this a known limitation?

Revision history for this message
Loïc Minier (lool) wrote :

Looks like the issue is that nothing moves debian/control.arm-linux-gnueabi to debian/control in clean when TARGET is set.

Revision history for this message
Loïc Minier (lool) wrote :

Ok, the build passes -c to dpkg-gencontrol to override the default control file, but dpkg-genchanges is called from dpkg-buildpackage and cannot receive this flag from the build. I can't think of any other option than moving the debian/control.$(TARGET) file in place of control after its generation.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Attached patch does few cleanups:

- clean-cross merged into clean
- binary-cross changed to issue note

Requires merging of patch from Hector Oron.

Revision history for this message
Loïc Minier (lool) wrote :

Patch looks good, except for the part in clean: where it uses commands with $(TARGET) while this might be empty; also, {configure,build,install}-cross-stamp is a bashism and might be against Debian Policy, it's not your code, but it would be best to avoid the {,} construct.

Thanks!

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

"dpkg-genchanges: error: package binutils-arm-linux-gnueabi has priority optional in control file but extra in files list" is covered by bug #612629 and patch is provided.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.