[PATCH] cross-compilation for binutils.

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Sat Jul 5 12:53:21 UTC 2008


David Woodhouse <dwmw2 at 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.


> +   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.



Enrico




More information about the fedora-devel-list mailing list