From: NAKAI Y. <na...@li...> - 2014-12-19 13:36:57
|
Hi, it seems that this is related to '-Werror=missing-declarations'. At this commit (http://repo.or.cz/w/nasm.git/commit/236f7949e44434f19a3f72fa4650362f612da735), '-Werror=missing-declarations' was added to CFLAGS. When '-Werror=missing-declarations' is specified, it seems that configure defines 'inline' mistakenly. config.h when -Werror=missing-declarations is specified /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #define inline #endif config.log configure:5169: checking for inline configure:5185: x86_64-w64-mingw32-gcc -c -march=x86-64 -mtune=generic -pipe -Os -foptimize-strlen -fstack-protector-strong --param=ssp-buffer-size=4 -D__USE_MINGW_ANSI_STDIO=1 -D_FORTIFY_SOURCE=2 -W -Wall -std=c99 -pedantic -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla conftest.c>&5 conftest.c:32:14: error: no previous declaration for 'foo' [-Werror=missing-declarations] inline foo_t foo () {return 0; } ^ cc1.exe: some warnings being treated as errors configure:5185: $? = 1 On the contrary, config.h when -Werror=missing-declarations is 'not' specified /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif I think putting PA_ADD_CFLAGS([-Werror=missing-declarations]) after AC_C_INLINE in configure.in fixes this problem. Yuta >On 12/17/2014 05:01 PM, H. Peter Anvin wrote: >> There seems to be some bizarre mingw problem that is keeping the build >> robot from working. It keeps complaining about duplicate symbols, but >> all those duplicate symbols seem to come from the standard library. >> >> Trying to figure out what is going on. >> > >I can't tell for sure if this is a NASM bug or a Mingw bug. If I remove >-std=c99 from the Makefile it works, but I can't reproduce the error. > > -hpa |