This is the mail archive of the
mailing list for the binutils project.
Re: [RFC] 2.22 release: Compilation failure for mingw32 target with --enable-targets=all
- From: nick clifton <nickc at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: binutils at sourceware dot org
- Date: Fri, 25 Nov 2011 16:39:41 +0000
- Subject: Re: [RFC] 2.22 release: Compilation failure for mingw32 target with --enable-targets=all
- References: <firstname.lastname@example.org> <email@example.com> <001c01cb9791$bc506ab0$34f14010$@firstname.lastname@example.org> <ABA80073-29DB-4AEC-A459-7C6B8E2A5D7C@adacore.com> <001f01cb979c$33b54080$9b1fc180$@email@example.com> <001201cca92b$0e9fbfe0$2bdf3fa0$@firstname.lastname@example.org>
To be honest, I don't understand the difference between
'const char * const *' and 'char * const *' types anyway...
I get confused by this sort of thing as well. I think that correct
"const char * const *" is a fixed pointer to a fixed pointer to a byte.
"char * const *" is a fixed pointer to a modifiable pointer to a byte.
> 2: note: expected 'const char * const*' but argument is of type 'char
> * const*'
> make: *** [eelf32_spu.o] Error 1
> 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...
I guess that mingw32 is free to define system headers as it so chooses.
If however it is attempting to be POSIX compatible then it should
follow the POSIX standard for the execvp() function and prototype it as:
int execvp(const char *path, char *const argv);
Ie, the binutils are correct and mingw32 ought to be changed. I suspect
however that the mingw32 project will not want to change their header,
so the best compromise would be to fix the binutils.
You could change the cast in spu_elf_relink() to be "(void *)" but this
is rather hacky. You could add a configure time test of the prototype
of execvp() and conditionalize the cast in spu_elf_relink to match the
required poitner type. But this seems a bit heavy handed. I am not
sure what is best really.