Jakub, please could we apply this patch to the binutils specfile?
It provides an optional %{binutils_target} macro which, when defined,
will generate a cross-binutils package. But when it's _not_ defined, as
it won't be for your builds or in the build system, it just builds a
native binutils as before.
This will make it easier for people to build cross-binutils based
exactly on the the Fedora binutils packages.
We'll then want to look at how best to get a set of cross-binutils
packages into Fedora, without adversely affecting your workflow on the
native binutils.
The naïve approach is just to _copy_ the binutils package to various new
$ARCH-binutils packages. But hopefully the the infrastructure folks can
come up with some trick in package CVS or in koji which will make it
simpler than that.
should be added everytime to allow e.g. 'strip' to work on both native
and on target binaries. This is required when building cross-rpms which
are providing target and native binaries.
Sysroot should be '/usr/%binutils_target/sys-root' (which is the value
assumed by gcc). E.g. native binaries (e.g. the cross gcc) are usually
under /usr/%binutils_target/bin and your sysroot would conflict with it.
Enrico
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
07-05-2008, 01:32 PM
David Woodhouse
cross-compilation for binutils.
On Sat, 2008-07-05 at 14:53 +0200, Enrico Scholz wrote:
> David Woodhouse <dwmw2@infradead.org> writes:
>
> > -CARGS=--enable-targets=i386-linux
> > +case %{binutils_target} in
> > + sparc*|ppc*|s390*)
> > + CARGS=--enable-64-bit-bfd
> > + ;;
> > + ia64*)
> > + CARGS=--enable-targets=i386-linux
> > + ;;
> > +esac
>
> Something like
>
> | --enable-targets=%_host
>
> should be added everytime to allow e.g. 'strip' to work on both native
> and on target binaries. This is required when building cross-rpms which
> are providing target and native binaries.
Is it really? You already have to use the appropriate compiler and
linker for native vs. target binaries -- why can't you use the
appropriate version of 'strip', too?
And even if you _do_ need it, it sounds like that's a job for a
'binutils-multi' configured with --enable-targets=all. I'm not sure
that, e.g., my i686-redhat-linux-gcc should also be able to strip native
PowerPC binaries.
>
> > + SYSROOT="--with-sysroot=/usr/%{binutils_target}"
>
> Sysroot should be '/usr/%binutils_target/sys-root' (which is the value
> assumed by gcc). E.g. native binaries (e.g. the cross gcc) are usually
> under /usr/%binutils_target/bin and your sysroot would conflict with it.
OK, I'll fix that.
--
dwmw2
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
07-05-2008, 01:35 PM
David Woodhouse
cross-compilation for binutils.
On Sat, 2008-07-05 at 14:53 +0200, Enrico Scholz wrote:
> building cross-rpms which are providing target and native binaries.
Oh, and... why in $DEITY's name would you be doing that?
--
dwmw2
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
07-05-2008, 02:10 PM
Enrico Scholz
cross-compilation for binutils.
David Woodhouse <dwmw2@infradead.org> writes:
>> Something like
>>
>> | --enable-targets=%_host
>>
>> should be added everytime to allow e.g. 'strip' to work on both native
>> and on target binaries. This is required when building cross-rpms which
>> are providing target and native binaries.
>
> Is it really? You already have to use the appropriate compiler and
> linker for native vs. target binaries -- why can't you use the
> appropriate version of 'strip', too?
rpm magic; final %__spec_install_post makes something like
and does not differ between target and native binaries.
> And even if you _do_ need it, it sounds like that's a job for a
> 'binutils-multi' configured with --enable-targets=all. I'm not sure
> that, e.g., my i686-redhat-linux-gcc should also be able to strip
> native PowerPC binaries.
There seems to be some overhead when adding 64 bit target support for 32
bit hosts
https://bugzilla.redhat.com/show_bug.cgi?id=63618
Enrico
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
07-05-2008, 02:21 PM
Enrico Scholz
cross-compilation for binutils.
David Woodhouse <dwmw2@infradead.org> writes:
>> building cross-rpms which are providing target and native binaries.
>
> Oh, and... why in $DEITY's name would you be doing that?
For the same reasons why I prefer RPM based distributions to
e.g. Gentoo. See
https://www.cvg.de/people/ensc/cross/
for a cross-rpm with full dependencies.
Enrico
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
07-05-2008, 02:52 PM
David Woodhouse
cross-compilation for binutils.
On Sat, 2008-07-05 at 16:10 +0200, Enrico Scholz wrote:
> David Woodhouse <dwmw2@infradead.org> writes:
>
> >> Something like
> >>
> >> | --enable-targets=%_host
> >>
> >> should be added everytime to allow e.g. 'strip' to work on both native
> >> and on target binaries. This is required when building cross-rpms which
> >> are providing target and native binaries.
> >
> > Is it really? You already have to use the appropriate compiler and
> > linker for native vs. target binaries -- why can't you use the
> > appropriate version of 'strip', too?
>
> rpm magic; final %__spec_install_post makes something like
>
> + /usr/lib/rpm/redhat/brp-compress
> + /usr/lib/rpm/redhat/brp-strip-static-archive arm-iwmmxt-linux-gnueabi-strip
> + /usr/lib/rpm/redhat/brp-strip-comment-note arm-iwmmxt-linux-gnueabi-strip arm-iwmmxt-linux-gnueabi-objdump
> +
>
> and does not differ between target and native binaries.
Hm, OK. I suppose it doesn't hurt much. Updated patch then...
%changelog
+* Sat Jul 5 2008 David Woodhouse <dwmw2@linux.intel.com> 2.18.50.0.6-3
+- Add %%{binutils_target} macro to support building cross-binutils
+
* Tue Apr 8 2008 Jakub Jelinek <jakub@redhat.com> 2.18.50.0.6-2
- backport .clmul -> .pclmul renaming
--
dwmw2
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
07-07-2008, 01:29 PM
Jarod Wilson
cross-compilation for binutils.
On Saturday 05 July 2008 07:47:24 am David Woodhouse wrote:
> +* Sat Jul *5 2008 David Woodhouse <david.woodhouse@intel.com>
I can hear PowerBook's the world over gently weeping...
--
Jarod Wilson
jwilson@redhat.com
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
07-07-2008, 01:48 PM
Josh Boyer
cross-compilation for binutils.
On Mon, 2008-07-07 at 09:29 -0400, Jarod Wilson wrote:
> On Saturday 05 July 2008 07:47:24 am David Woodhouse wrote:
> > +* Sat Jul 5 2008 David Woodhouse <david.woodhouse@intel.com>
>
> I can hear PowerBook's the world over gently weeping...
Those are the users you hear, not the machines. Oh, and me. Loudly.
josh
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
07-21-2008, 03:53 PM
Gary Thomas
cross-compilation for binutils.
David Woodhouse wrote:
On Sat, 2008-07-05 at 16:10 +0200, Enrico Scholz wrote:
David Woodhouse <dwmw2@infradead.org> writes:
Something like
| --enable-targets=%_host
should be added everytime to allow e.g. 'strip' to work on both native
and on target binaries. This is required when building cross-rpms which
are providing target and native binaries.
Is it really? You already have to use the appropriate compiler and
linker for native vs. target binaries -- why can't you use the
appropriate version of 'strip', too?
rpm magic; final %__spec_install_post makes something like
and does not differ between target and native binaries.
Hm, OK. I suppose it doesn't hurt much. Updated patch then...
<...snip...>
Has this work/discussion progressed at all? I'm interested in cross
tools (x86->ppc) and would
like to get involved in making these happen.
Any pointers on how I can get started (where/how to pick up the current
work, etc)?
Thanks
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list