linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: segher@kernel.crashing.org (Segher Boessenkool)
To: linux-arm-kernel@lists.infradead.org
Subject: gcc 4.9 build warnings (was: Re: next build: 2674 warnings 1 failures (next/next-20141022))
Date: Thu, 13 Nov 2014 08:19:50 -0600	[thread overview]
Message-ID: <20141113141950.GA17287@gate.crashing.org> (raw)
In-Reply-To: <2480226.26bJjjL2fl@wuerfel>

On Tue, Nov 11, 2014 at 10:32:23PM +0100, Arnd Bergmann wrote:
> I've decided to investigate it further. It seems that your change to
> 'arm-linux-eabi' did not have the intended effect.

"It worked for me", i.e., it did build kernels.  I don't build arm terribly
often, does it show?

> I got it to work with this patch:

> -	arm)		TARGET=arm-linux-eabi ;;
> +	arm)		TARGET=arm-linux-gnueabi ;;

That looks right (and Olof says it works :-) ).  I'll apply the patch.

> What happens in gcc apparently is that the configuration logic gets confused
> and uses this entry in gcc/config.gcc:
> 
> arm*-*-eabi*)
>         default_use_cxa_atexit=yes
>         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
>         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
>         tm_file="$tm_file newlib-stdint.h"
>         tmake_file="${tmake_file} arm/t-bpabi"
>         use_gcc_stdint=wrap
>         tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h"
>         ;;
> 
> instead of this one:
> 
> arm*-*-linux-*)                 # ARM GNU/Linux with ELF

That one would match arm-unknown-linux-eabi (as it does
arm-unknown-linux-gnueabi), not arm-linux-eabi.  "triples" ;-)

arm-linux-eabi canonicalises to arm-linux-eabi;
arm-linux-gnueabi canonicalises to arm-unknown-linux-gnueabi.

>         tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
>         extra_options="${extra_options} linux-android.opt"
>         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
>         tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h"
>         # The EABI requires the use of __cxa_atexit.
>         default_use_cxa_atexit=yes
>         with_tls=${with_tls:-gnu}
>         ;;
> 
> so among other things, we are missing linux.h and glibc-stdint.h.

Right.  The kernel should not depend on anything about userland (i.e., the
linux.h header); but the stdint thing is needed to get the ABI you expect it
seems.

Great that you managed to figure out the mess,


Segher

  parent reply	other threads:[~2014-11-13 14:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5447442c.a9ca440a.2060.5e09@mx.google.com>
2014-10-22 22:38 ` gcc 4.9 build warnings (was: Re: next build: 2674 warnings 1 failures (next/next-20141022)) Russell King - ARM Linux
2014-10-23 13:57   ` Arnd Bergmann
2014-10-23 14:14     ` Russell King - ARM Linux
2014-10-23 15:33       ` Arnd Bergmann
2014-10-23 16:12         ` Russell King - ARM Linux
2014-10-23 20:31           ` Arnd Bergmann
2014-10-23 20:33             ` Olof Johansson
2014-10-24  9:13               ` Arnd Bergmann
2014-10-24  9:34                 ` Arnd Bergmann
2014-10-24  9:44                 ` Russell King - ARM Linux
2014-10-24 10:27                   ` Arnd Bergmann
2014-10-24 18:25                   ` Segher Boessenkool
2014-10-24 18:33                     ` Russell King - ARM Linux
2014-10-24 21:47                     ` Olof Johansson
2014-11-11 21:32                     ` Arnd Bergmann
2014-11-12  1:34                       ` Olof Johansson
2014-11-12 10:48                         ` Russell King - ARM Linux
2014-11-13 14:19                       ` Segher Boessenkool [this message]
2014-11-13 14:30                         ` Arnd Bergmann
2014-10-23 22:03             ` Ard Biesheuvel
2014-10-23 22:26             ` Russell King - ARM Linux
2014-10-24 21:47               ` Olof Johansson
2014-10-24 21:56                 ` Russell King - ARM Linux
2014-10-24 22:22                   ` Olof Johansson

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=20141113141950.GA17287@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).