All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] host-m4: fix build when -std=gnu99 and inline functions are used
Date: Thu, 25 Feb 2016 23:13:52 +0100	[thread overview]
Message-ID: <56CF7CA0.7080801@mind.be> (raw)
In-Reply-To: <1456414403.4586.63.camel@synopsys.com>

On 02/25/16 16:33, Alexey Brodkin wrote:
> Hi Thomas,
> 
> On Thu, 2016-02-25 at 14:26 +0100, Thomas Petazzoni wrote:
>> Hello,
>>
>> On Thu, 25 Feb 2016 12:58:05 +0000, Lada Trimasova wrote:
>>
>>> I used CentOS 5.7, gcc 4.9.2, glibc 2.5.
[snip explanation of why this combination of gcc 4.9 with glibc 2.5 is broken]
> That's why with older host glibc we need to pass "-fgnu89-inline"
> flag to compiler.

 I think you can basically say your host toolchain is broken: it fails to
compile valid programs, because glibc doesn't satisfy the -std=gnu99 option.

> And now I think we may even consider adding it
> to the top-level HOST_CFLAGS instead of fixing problem on per-package
> basis.

 Since this is an issue with your toolchain, I think you should fix it globally
(not just for buildroot) by setting CFLAGS_FOR_BUILD=-fgnu89-inline in your
environment.


 Note: installing your own glibc (somewhere outside of /usr/lib) is possible,
but awkward.

 Regards,
 Arnout

> 
> Any thoughts?
> 
> And indeed we now have to determine last glibc version that relies on
> C89 inline semantics.
> 
> -Alexey
> 
> P.S. Just in case that article was of great help:
> http://stackoverflow.com/questions/2722276/multiple-definition-of-inline-function
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2016-02-25 22:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 11:37 [Buildroot] [PATCH 0/2] fix-build-when-std-gnu99-and-inline-functions-are-used Lada Trimasova
2016-02-25 11:37 ` [Buildroot] [PATCH 1/2] host-tar: fix build when -std=gnu99 and inline functions are used Lada Trimasova
2016-02-25 11:37 ` [Buildroot] [PATCH 2/2] host-m4: " Lada Trimasova
2016-02-25 12:54   ` Thomas Petazzoni
2016-02-25 12:58     ` Lada Trimasova
2016-02-25 13:26       ` Thomas Petazzoni
2016-02-25 15:33         ` Alexey Brodkin
2016-02-25 22:13           ` Arnout Vandecappelle [this message]
2016-02-26  7:20             ` Alexey Brodkin
2016-02-26  8:19               ` Thomas Petazzoni
2016-02-26  9:40                 ` Alexey Brodkin

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=56CF7CA0.7080801@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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.