[Buildroot] [git commit branch/2017.08.x] argp-standalone: fix build with gcc 7.x

Peter Korsgaard peter at korsgaard.com
Sun Nov 26 09:16:23 UTC 2017


commit: https://git.buildroot.net/buildroot/commit/?id=3e4634157ffa7fac20f64b2ad3a2480a187ba547
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.08.x

Back in commit a662ff7e79630ca0875dd8529fe54db27a275007
("package/argp-standalone: Fix build with c99 compilers"), we fixed
the build of argp-standalone with compilers defaulting to C99 inline
semantics, i.e starting from gcc 5.x.

This was done as part of a patch that used "inline" instead of "extern
inline". However, using "inline" once again broke the build with gcc
7.x. To fix this, revert back to using just "extern inline" (hence
removing a patch of patch 0003-fix_build_with_c99_compilers.patch) and
instead use -fgnu89-inline in the CFLAGS.

See https://gcc.gnu.org/gcc-5/porting_to.html for more details.

Fixes:

  http://autobuild.buildroot.net/results/a9cedc54829b7bd2dd7ae6ff2bd6c6db242f1c35/

Signed-off-by: Matthew Weber <matthew.weber at rockwellcollins.com>
[Thomas: also drop the patch of
0003-fix_build_with_c99_compilers.patch that is no longer needed.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>

(cherry picked from commit f0b65bd90ce4429d6b7e952ce7de2d5f92a2dd26)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 .../argp-standalone/0003-fix_build_with_c99_compilers.patch  | 12 ------------
 package/argp-standalone/argp-standalone.mk                   |  2 +-
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/package/argp-standalone/0003-fix_build_with_c99_compilers.patch b/package/argp-standalone/0003-fix_build_with_c99_compilers.patch
index bfa0bb5..56b753b 100644
--- a/package/argp-standalone/0003-fix_build_with_c99_compilers.patch
+++ b/package/argp-standalone/0003-fix_build_with_c99_compilers.patch
@@ -66,15 +66,3 @@ index e797b11..828f435 100644
  
  /* Internal routines.  */
  extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
-@@ -216,7 +220,11 @@
- #endif
- 
- #ifndef ARGP_FS_EI
-+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
- #define ARGP_FS_EI extern inline
-+#else
-+#define ARGP_FS_EI inline
-+#endif
- #endif
- 
- ARGP_FS_EI size_t
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


More information about the buildroot mailing list