The build of host-mtd-utils fails with link errors: | ..../mkfs.ubifs/hashtable/hashtable_itr.o: | In function `hashtable_iterator_key': | ..../mkfs.ubifs/hashtable/hashtable_itr.c:43: | multiple definition of `hashtable_iterator_key' | ..../mkfs.ubifs/devtable.o:.../mkfs.ubifs/hashtable/hashtable_itr.h:34: | first defined here | ..../mkfs.ubifs/hashtable/hashtable_itr.o: | In function `hashtable_iterator_key': | ..../mkfs.ubifs/hashtable/hashtable_itr.c:43: | multiple definition of `hashtable_iterator_value' | ..../mkfs.ubifs/devtable.o:..../mkfs.ubifs/devtable.c:64: | first defined here
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 <[email protected]> --- rules/host-mtd-utils.make | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules/host-mtd-utils.make b/rules/host-mtd-utils.make index 64a0468..e6a57c3 100644 --- a/rules/host-mtd-utils.make +++ b/rules/host-mtd-utils.make @@ -25,7 +25,8 @@ HOST_MTD_UTILS_DIR = $(HOST_BUILDDIR)/$(MTD_UTILS) HOST_MTD_UTILS_COMPILE_ENV := \ $(HOST_ENV) \ - WITHOUT_XATTR=1 + WITHOUT_XATTR=1 \ + CFLAGS="-fgnu89-inline -g -O2" # don't use := here HOST_MTD_UTILS_MAKEVARS = \ -- 2.3.7 -- ptxdist mailing list [email protected]
