All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "ksummit-discuss@lists.linuxfoundation.org"
	<ksummit-discuss@lists.linuxfoundation.org>
Subject: Re: [Ksummit-discuss] [CORE TOPIC] More useful types in the linux kernel
Date: Fri, 22 Jul 2016 14:26:49 +0100	[thread overview]
Message-ID: <22235.1469194009@warthog.procyon.org.uk> (raw)
In-Reply-To: <CACRpkdZGaY2zCYMufsqextP=izu-iYMNC3JJwtV4ZNQM7V8MEQ@mail.gmail.com>

Linus Walleij <linus.walleij@linaro.org> wrote:

> So it works, but still of course this thing is there:
> 
> rpm -ql gcc-arm-linux-gnu-6.1.1-1.fc24.x86_64
> (...)
> /usr/lib/gcc/arm-linux-gnueabi/6.1.1/libgcc.a

Some people really wanted libgcc libraries.  Even some kernel arches require
them.

> I suspect these things are implicitly compiled for one and only one ISA?
> I honestly don't know how to even check which one. Does it use
> hardfloat? Or has this problem of targetting several ISAs with a .a
> file been fixes since I looked at it last?
> 
> I need to cross-compile ARMv4, ARMv5, ARMv6, ARMv7 and
> ARMv8 for my systems. (Sorry for all old crap I'm keeping it's just
> my job...)

The arm- compiler is built with:

	CONFIG_FLAGS="--with-tune=cortex-a8 --with-arch=armv7-a \
		--with-float=hard --with-fpu=vfpv3-d16 --with-abi=aapcs-linux"

I can probably add a --with-multilib-list= option to build multiple variants
as I do for sh and sh64:

	sh-*)
	    CONFIG_FLAGS=--with-multilib-list=m1,m2,m2e,m2a,m2a-single,m4,m4-single,m4-single-only,m4-nofpu
	    ;;
	sh4-*)
	    CONFIG_FLAGS=--with-multilib-list=m4,m4-single,m4-single-only,m4-nofpu
	    ;;

if someone tells me what they'd like to see on there.  In the sh case, this
gives me all of:

	/usr/lib/gcc/sh-linux-gnu/5.3.1/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/m2/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/m2e/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/m4-nofpu/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/m4-single-only/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/m4-single/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/m4/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/m2/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/m2a-single/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/m2a/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/m2e/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/m4-nofpu/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/m4-single-only/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/m4-single/libgcc.a
	/usr/lib/gcc/sh-linux-gnu/5.3.1/mb/m4/libgcc.a

> That ABI problem is then manifolded if I would want to do anything
> userspace, so I keep a whole range of tailored cross compilers and
> prebuilt C libraries around that I know "just work", but I guess will
> grow increasingly hard to maintain and it feels pretty unelegant at
> times.

Yeah.  It's made more fun by the fact that if I want to do a general compiler
SRPM that covers all the arches fully bootstrapped with C libraries, not every
arch is supported by glibc, so I have to include uClibc as well for those
arches.

Take sh as mentioned above, that has at least 16 different potential
userspaces by the libgcc count.

> Is there a way for a distribution to provide a proper set of
> ISA-specific stuff alongside a crosscompiler, if the crosscompiler
> supports several different ISAs, like the ARMvN variants do?

It *ought* to be possible to build C libraries separately, given an available
cross-compiler - except that the gcc build wants stuff from the C library
you're using.  Having talked to some gcc people about this before, IIRC, it's
something that could be managed without - if someone's willing to do the work
to make gcc no longer require it.

David

  parent reply	other threads:[~2016-07-22 13:26 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 15:32 [Ksummit-discuss] [CORE TOPIC] More useful types in the linux kernel Eric W. Biederman
2016-07-19 17:31 ` Mark Brown
2016-07-19 18:52   ` Jiri Kosina
2016-07-19 20:39     ` Eric W. Biederman
2016-07-20 15:53     ` Mark Brown
2016-07-20 17:04       ` [Ksummit-discuss] [CORE TOPIC] [TECH TOPIC] Support (or move towards to) LLVM Jiri Kosina
2016-07-20 18:35         ` Alexey Dobriyan
2016-07-20 18:52           ` Mark Brown
2016-07-21  9:54         ` David Woodhouse
2016-07-21 13:41           ` Shuah Khan
2016-07-21 14:02             ` David Woodhouse
2016-07-21 16:21               ` Mark Brown
2016-07-23  3:28                 ` Behan Webster
2016-07-21 18:38           ` Jiri Kosina
2016-07-21 20:47             ` Paul Turner
2016-07-26 11:22             ` David Woodhouse
2016-07-19 21:08 ` [Ksummit-discuss] [CORE TOPIC] More useful types in the linux kernel James Bottomley
2016-07-20  0:08   ` Eric W. Biederman
2016-07-20  7:32     ` Julia Lawall
2016-07-20 12:11     ` Jan Kara
2016-07-28  3:33       ` Steven Rostedt
2016-07-19 21:26 ` Josh Triplett
2016-07-20  2:36   ` Eric W. Biederman
2016-07-30 18:03   ` Eric W. Biederman
2016-07-30 18:49     ` Josh Triplett
2016-07-30 19:34       ` Eric W. Biederman
2016-07-30 20:56         ` Josh Triplett
2016-07-30 22:21           ` Eric W. Biederman
2016-07-21 15:05 ` David Howells
2016-07-21 23:33   ` Dmitry Torokhov
2016-07-22  6:00   ` Hannes Reinecke
2016-07-22  6:14     ` Julia Lawall
2016-07-22 13:57       ` Hannes Reinecke
2016-07-22 14:40         ` Julia Lawall
2016-07-22 19:12         ` Arnd Bergmann
2016-07-26 11:48         ` David Woodhouse
2016-07-26 12:53           ` Hannes Reinecke
2016-07-26 13:59             ` Alexey Dobriyan
2016-07-26 13:53           ` Alexey Dobriyan
2016-07-27 12:40           ` Julia Lawall
2016-07-27 13:25             ` James Bottomley
2016-07-27 13:33               ` David Woodhouse
2016-07-27 17:21                 ` Bird, Timothy
2016-08-01 22:17                   ` Rob Herring
2016-08-12  1:29                     ` Stephen Boyd
2016-08-11 15:44         ` Dan Carpenter
2016-08-12  0:38           ` NeilBrown
2016-08-12 20:56             ` Dan Carpenter
2016-08-12  3:51           ` Matthew Wilcox
2016-08-12  4:01             ` Josh Triplett
2016-08-12  4:07               ` Matthew Wilcox
2016-08-12  5:29                 ` Alexey Dobriyan
2016-08-12  5:38                   ` Michael S. Tsirkin
2016-08-12  6:04                     ` Julia Lawall
2016-08-12  6:09                       ` Michael S. Tsirkin
2016-08-12  6:23                         ` Matthew Wilcox
2016-08-12  6:37                         ` Julia Lawall
2016-08-12  5:50                   ` Matthew Wilcox
2016-08-04  7:15       ` NeilBrown
2016-08-04 11:19         ` Julia Lawall
2016-07-22  7:03   ` David Howells
2016-07-22 10:10     ` Alexey Dobriyan
2016-07-22 10:13     ` David Howells
2016-07-22 10:22       ` Alexey Dobriyan
2016-07-22 10:53         ` Vlastimil Babka
2016-07-22 11:05         ` David Howells
2016-07-22 17:18           ` Julia Lawall
2016-07-22 18:19     ` Dmitry Torokhov
2016-07-22 19:43       ` Guenter Roeck
2016-07-28  3:40   ` Steven Rostedt
2016-07-28  7:12   ` David Howells
2016-08-02 10:48   ` Jani Nikula
2016-08-04 11:31     ` David Woodhouse
2016-08-04 12:07       ` Jani Nikula
2016-07-22 11:19 ` David Howells
2016-07-22 12:44   ` Linus Walleij
2016-07-22 13:26   ` David Howells [this message]
2016-08-12  4:42 ` Michael S. Tsirkin
     [not found]   ` <871t1ulfvz.fsf@notabene.neil.brown.name>
2016-08-12  5:34     ` Michael S. Tsirkin
2016-08-12  6:23       ` NeilBrown
     [not found]       ` <87y442jytb.fsf@notabene.neil.brown.name>
2016-08-15 23:26         ` Michael S. Tsirkin
2016-08-12  6:23   ` NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22235.1469194009@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.