mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bernhard Walle <bernhard@bwalle.de>
To: ptxdist@pengutronix.de
Cc: Bernhard Walle <bernhard@bwalle.de>
Subject: [ptxdist] [PATCH 2/3] host-localedef: Fix build with gcc 5.1
Date: Sat,  2 May 2015 14:42:40 +0200	[thread overview]
Message-ID: <1430570561-19891-3-git-send-email-bernhard@bwalle.de> (raw)
In-Reply-To: <1430570561-19891-1-git-send-email-bernhard@bwalle.de>

The build of host-localedef fails with lots of argp-related link errors:

| argp-help.o: In function `indent_to':
| argp-help.c:(.text+0x1335): undefined reference to `argp_fmtstream_point'
| argp-help.c:(.text+0x1352): undefined reference to `argp_fmtstream_putc'
| argp-help.o: In function `space':
| argp-help.c:(.text+0x137d): undefined reference to `argp_fmtstream_point'
| argp-help.c:(.text+0x13a5): undefined reference to `argp_fmtstream_putc'
| argp-help.c:(.text+0x13b8): undefined reference to `argp_fmtstream_putc'
| argp-help.o: In function `print_header':
| argp-help.c:(.text+0x1549): undefined reference to `argp_fmtstream_putc'
| argp-help.c:(.text+0x157f): undefined reference to `argp_fmtstream_set_lmargin'
| argp-help.c:(.text+0x159b): undefined reference to `argp_fmtstream_set_wmargin'
| argp-help.c:(.text+0x15b2): undefined reference to `argp_fmtstream_puts'
| argp-help.c:(.text+0x15c7): undefined reference to `argp_fmtstream_set_lmargin'
| argp-help.c:(.text+0x15dc): undefined reference to `argp_fmtstream_putc'
| argp-help.o: In function `comma':
| argp-help.c:(.text+0x167f): undefined reference to `argp_fmtstream_putc'
| argp-help.c:(.text+0x171e): undefined reference to `argp_fmtstream_set_wmargin'
| [...]

The problem is the change of the default C standard from gnu89 to gnu11
which changes the semantics of 'inline'. The issue is described in the
Porting guide at https://gcc.gnu.org/gcc-5/porting_to.html. Adding the
'-fgnu89-inline' option fixes the issue.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/host-localedef.make | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rules/host-localedef.make b/rules/host-localedef.make
index f3ccb87..29022e8 100644
--- a/rules/host-localedef.make
+++ b/rules/host-localedef.make
@@ -30,7 +30,8 @@ HOST_LOCALEDEF_DIR	:= $(HOST_BUILDDIR)/$(HOST_LOCALEDEF)
 # ----------------------------------------------------------------------------
 
 HOST_LOCALEDEF_PATH	:= PATH=$(HOST_PATH)
-HOST_LOCALEDEF_ENV 	:= $(HOST_ENV)
+HOST_LOCALEDEF_ENV 	:= $(HOST_ENV) \
+	CFLAGS="-fgnu89-inline -g -O2"
 
 #
 # autoconf
-- 
2.3.7


-- 
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2015-05-02 12:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-02 12:42 [ptxdist] gcc 5.1 fixes Bernhard Walle
2015-05-02 12:42 ` [ptxdist] [PATCH 1/3] host-ncurses: Fix build with gcc 5.1 Bernhard Walle
2015-05-02 12:42 ` Bernhard Walle [this message]
2015-05-02 12:42 ` [ptxdist] [PATCH 3/3] host-mtd-utils: " Bernhard Walle
2015-05-04  8:49 ` [ptxdist] gcc 5.1 fixes Michael Olbrich

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=1430570561-19891-3-git-send-email-bernhard@bwalle.de \
    --to=bernhard@bwalle.de \
    --cc=ptxdist@pengutronix.de \
    /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