This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFC] 2.22 release: Compilation failure for mingw32 target with --enable-targets=all
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <binutils at sourceware dot org>
- Date: Tue, 22 Nov 2011 16:26:07 +0100
- Subject: [RFC] 2.22 release: Compilation failure for mingw32 target with --enable-targets=all
- References: <48683.3413750448$1288971470@news.gmane.org> <g48w17znxm.fsf@richards-desktop.stglab.manchester.uk.ibm.com> <001c01cb9791$bc506ab0$34f14010$@muller@ics-cnrs.unistra.fr> <ABA80073-29DB-4AEC-A459-7C6B8E2A5D7C@adacore.com> <001f01cb979c$33b54080$9b1fc180$@muller@ics-cnrs.unistra.fr>
This problem is still present in binutis-2.22 sources
compilation with --enable-targets=all for mingw32 target fails
due to a warning:
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.22/ld -I.
-I../../binutils-2.22/ld -
I../bfd -I../../binutils-2.22/ld/../bfd -I../../binutils-2.22/ld/../include
-g
-O0 -D__USE_MINGW_ACCESS -DENABLE_PLUGINS
-DLOCALEDIR="\"/usr/local/share/locale
\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format
-Wer
ror -g -O0 -D__USE_MINGW_ACCESS -MT eelf32_spu.o -MD -MP -MF
.deps/eelf32_spu.Tp
o -c -o eelf32_spu.o \
-DEMBEDSPU="\"`echo embedspu | sed 's/^ld-new$/ld.bfd/;s,y,y,'`\""
eel
f32_spu.c
cc1.exe: warnings being treated as errors
eelf32_spu.c: In function 'spu_elf_relink':
eelf32_spu.c:594:3: error: passing argument 2 of 'execvp' from incompatible
poin
ter type
e:\msys\mingw32\bin\../lib/gcc/mingw32/4.5.2/../../../../include/process.h:1
20:4
2: note: expected 'const char * const*' but argument is of type 'char *
const*'
make[3]: *** [eelf32_spu.o] Error 1
>From http://sourceware.org/ml/binutils/2010-12/msg00337.html
> I got one second problem for compilation of ld
> for mingw with --enable-targets=all
> also in emultempl/spuelf.em
> about the type of execvp argument #2
> (char *const *)
> type is given line 399, but
> mingw process.h header
> gives
> (const char *const *)
>
> which results in a warning, turned into an error
> because -Werror is the default.
>
> I tried to look up what the correct type should be,
> but didn't find any real unambiguous definition of that
> function.
>
> Pierre Muller
I got no comment on that part of the email back then, and I still don't
know if this should be considered as an error in mingw32 declarations
or if it should be fixed in Binutils sources.
I would like to know if this warning should be corrected or not...
To be honest, I don't understand the difference between
'const char * const *' and 'char * const *' types anyway...
Pierre Muller
GDB pascal language maintainer