Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lada Trimasova <Lada.Trimasova@synopsys.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] host-tar: fix build when -std=gnu99 and inline functions are used
Date: Thu, 25 Feb 2016 14:37:09 +0300	[thread overview]
Message-ID: <1456400230-4187-2-git-send-email-ltrimas@synopsys.com> (raw)
In-Reply-To: <1456400230-4187-1-git-send-email-ltrimas@synopsys.com>

A lot of the glibc header files use extern inline, which causes
GCC to emit a symbol for each extern inline functions and it causes
functions multiple definition error when "-std=gnu99" is used.
To fix this problem it's necessary to use "-fgnu89-inline" option, which
tells GCC to use the traditional GNU semantics for inline functions when
in C99 mode.

Signed-off-by: Lada Trimasova <ltrimas@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 package/tar/tar.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/tar/tar.mk b/package/tar/tar.mk
index 2b47e33..e59aedb 100644
--- a/package/tar/tar.mk
+++ b/package/tar/tar.mk
@@ -38,6 +38,7 @@ $(eval $(autotools-package))
 # host-tar: use cpio.gz instead of tar.gz to prevent chicken-egg problem
 # of needing tar to build tar.
 HOST_TAR_SOURCE = tar-$(TAR_VERSION).cpio.gz
+HOST_TAR_MAKE_OPTS = CFLAGS="-fgnu89-inline"
 define HOST_TAR_EXTRACT_CMDS
 	mkdir -p $(@D)
 	cd $(@D) && \
-- 
2.5.0

  reply	other threads:[~2016-02-25 11:37 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 ` Lada Trimasova [this message]
2016-02-25 11:37 ` [Buildroot] [PATCH 2/2] host-m4: fix build when -std=gnu99 and inline functions are used 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
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=1456400230-4187-2-git-send-email-ltrimas@synopsys.com \
    --to=lada.trimasova@synopsys.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox