* [Buildroot] [PATCH] argp-standalone: fix build with > GCC5.1 @ 2017-10-31 6:18 Matt Weber 2017-10-31 12:51 ` Thomas Petazzoni 2017-11-01 19:58 ` Thomas Petazzoni 0 siblings, 2 replies; 5+ messages in thread From: Matt Weber @ 2017-10-31 6:18 UTC (permalink / raw) To: buildroot 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. Similar issue: https://www.mail-archive.com/ptxdist at pengutronix.de/msg09746.html Fixes: http://autobuild.buildroot.net/results/a9c/a9cedc54829b7bd2dd7ae6ff2bd6c6db242f1c35// Tested via test-pkg with the following cfg BR2_PACKAGE_ARGP_STANDALONE=y Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> --- package/argp-standalone/argp-standalone.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/argp-standalone/argp-standalone.mk b/package/argp-standalone/argp-standalone.mk index 7a7028c..977b954 100644 --- a/package/argp-standalone/argp-standalone.mk +++ b/package/argp-standalone/argp-standalone.mk @@ -10,7 +10,7 @@ ARGP_STANDALONE_INSTALL_STAGING = YES ARGP_STANDALONE_LICENSE = LGPL-2.0+ ARGP_STANDALONE_CONF_ENV = \ - CFLAGS="$(TARGET_CFLAGS) -fPIC" + CFLAGS="$(TARGET_CFLAGS) -fPIC -fgnu89-inline" define ARGP_STANDALONE_INSTALL_STAGING_CMDS $(INSTALL) -D $(@D)/libargp.a $(STAGING_DIR)/usr/lib/libargp.a -- 2.7.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] argp-standalone: fix build with > GCC5.1 2017-10-31 6:18 [Buildroot] [PATCH] argp-standalone: fix build with > GCC5.1 Matt Weber @ 2017-10-31 12:51 ` Thomas Petazzoni 2017-11-01 19:58 ` Thomas Petazzoni 1 sibling, 0 replies; 5+ messages in thread From: Thomas Petazzoni @ 2017-10-31 12:51 UTC (permalink / raw) To: buildroot Hello, On Tue, 31 Oct 2017 01:18:34 -0500, Matt Weber wrote: > 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. > > Similar issue: > https://www.mail-archive.com/ptxdist at pengutronix.de/msg09746.html > > Fixes: > http://autobuild.buildroot.net/results/a9c/a9cedc54829b7bd2dd7ae6ff2bd6c6db242f1c35// > > Tested via test-pkg with the following cfg > BR2_PACKAGE_ARGP_STANDALONE=y > > Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Thanks for looking into this. A few questions though: - Why does this happen only on ARC ? - Why are we seeing this issue only now, while we have started to use gcc 5.x a long, long time ago ? Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] argp-standalone: fix build with > GCC5.1 2017-10-31 6:18 [Buildroot] [PATCH] argp-standalone: fix build with > GCC5.1 Matt Weber 2017-10-31 12:51 ` Thomas Petazzoni @ 2017-11-01 19:58 ` Thomas Petazzoni 2017-11-01 20:10 ` Matthew Weber 2017-11-26 9:17 ` Peter Korsgaard 1 sibling, 2 replies; 5+ messages in thread From: Thomas Petazzoni @ 2017-11-01 19:58 UTC (permalink / raw) To: buildroot Hello, On Tue, 31 Oct 2017 01:18:34 -0500, Matt Weber wrote: > 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. > > Similar issue: > https://www.mail-archive.com/ptxdist at pengutronix.de/msg09746.html > > Fixes: > http://autobuild.buildroot.net/results/a9c/a9cedc54829b7bd2dd7ae6ff2bd6c6db242f1c35// > > Tested via test-pkg with the following cfg > BR2_PACKAGE_ARGP_STANDALONE=y > > Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> So, I've applied, but with those tweaks. Indeed, your patch could definitely not be fixing an issue with gcc >= 5.x, because we have been using gcc 5.x for a while, and this build error was not popping up with anything but gcc 7.x. So, what happened is that in commit a662ff7e79630ca0875dd8529fe54db27a275007, we added a patch that fixes the build with C99 compilers (in fact this means gcc 5.x, which uses C99 inline semantics). This changed "extern inline" to just "inline". But that broke again with gcc 7.x, and causes the problem we're seeing now. So instead, I've dropped the chunk of the patch that changed from extern inline to inline, and passsed -fgnu89-inline as you suggested. I updated the commit log accordingly. See https://git.buildroot.org/buildroot/commit/?id=f0b65bd90ce4429d6b7e952ce7de2d5f92a2dd26 for more details. Thanks for all your research behind this issue! Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] argp-standalone: fix build with > GCC5.1 2017-11-01 19:58 ` Thomas Petazzoni @ 2017-11-01 20:10 ` Matthew Weber 2017-11-26 9:17 ` Peter Korsgaard 1 sibling, 0 replies; 5+ messages in thread From: Matthew Weber @ 2017-11-01 20:10 UTC (permalink / raw) To: buildroot Thomas, On Wed, Nov 1, 2017 at 2:58 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > > Hello, > > On Tue, 31 Oct 2017 01:18:34 -0500, Matt Weber wrote: > > 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. > > > > Similar issue: > > https://www.mail-archive.com/ptxdist at pengutronix.de/msg09746.html > > > > Fixes: > > http://autobuild.buildroot.net/results/a9c/a9cedc54829b7bd2dd7ae6ff2bd6c6db242f1c35// > > > > Tested via test-pkg with the following cfg > > BR2_PACKAGE_ARGP_STANDALONE=y > > > > Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> > > So, I've applied, but with those tweaks. Indeed, your patch could > definitely not be fixing an issue with gcc >= 5.x, because we have been > using gcc 5.x for a while, and this build error was not popping up with > anything but gcc 7.x. > > So, what happened is that in commit > a662ff7e79630ca0875dd8529fe54db27a275007, we added a patch that fixes > the build with C99 compilers (in fact this means gcc 5.x, which uses > C99 inline semantics). This changed "extern inline" to just "inline". > But that broke again with gcc 7.x, and causes the problem we're seeing > now. > > So instead, I've dropped the chunk of the patch that changed from > extern inline to inline, and passsed -fgnu89-inline as you suggested. I > updated the commit log accordingly. > > See > https://git.buildroot.org/buildroot/commit/?id=f0b65bd90ce4429d6b7e952ce7de2d5f92a2dd26 > for more details. > > Thanks for all your research behind this issue! > NP, appreciate the follow-up and now the details make a lot more sense. Plus it's good to see that it indirectly found a toolchain coverage issue with the test-pkg. Matt ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] argp-standalone: fix build with > GCC5.1 2017-11-01 19:58 ` Thomas Petazzoni 2017-11-01 20:10 ` Matthew Weber @ 2017-11-26 9:17 ` Peter Korsgaard 1 sibling, 0 replies; 5+ messages in thread From: Peter Korsgaard @ 2017-11-26 9:17 UTC (permalink / raw) To: buildroot >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > Hello, > On Tue, 31 Oct 2017 01:18:34 -0500, Matt Weber wrote: >> 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. >> >> Similar issue: >> https://www.mail-archive.com/ptxdist at pengutronix.de/msg09746.html >> >> Fixes: >> http://autobuild.buildroot.net/results/a9c/a9cedc54829b7bd2dd7ae6ff2bd6c6db242f1c35// >> >> Tested via test-pkg with the following cfg >> BR2_PACKAGE_ARGP_STANDALONE=y >> >> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> > So, I've applied, but with those tweaks. Indeed, your patch could > definitely not be fixing an issue with gcc >= 5.x, because we have been > using gcc 5.x for a while, and this build error was not popping up with > anything but gcc 7.x. > So, what happened is that in commit > a662ff7e79630ca0875dd8529fe54db27a275007, we added a patch that fixes > the build with C99 compilers (in fact this means gcc 5.x, which uses > C99 inline semantics). This changed "extern inline" to just "inline". > But that broke again with gcc 7.x, and causes the problem we're seeing > now. > So instead, I've dropped the chunk of the patch that changed from > extern inline to inline, and passsed -fgnu89-inline as you suggested. I > updated the commit log accordingly. > See > https://git.buildroot.org/buildroot/commit/?id=f0b65bd90ce4429d6b7e952ce7de2d5f92a2dd26 > for more details. Committed the revised patch to 2017.02.x and 2017.08.x, thanks both! -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-26 9:17 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-31 6:18 [Buildroot] [PATCH] argp-standalone: fix build with > GCC5.1 Matt Weber 2017-10-31 12:51 ` Thomas Petazzoni 2017-11-01 19:58 ` Thomas Petazzoni 2017-11-01 20:10 ` Matthew Weber 2017-11-26 9:17 ` Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox