compiling gcc-config on Solaris gives a warning of an implicitly defined function `alloca' conflicts with built-in function. This is simply resolved by including <alloc.h>. I haven't found any repercussions of this include on Linux, Darwin and AIX. (inlining patch because it's trivial) Index: files/wrapper-1.4.7.c =================================================================== --- files/wrapper-1.4.7.c (revision 5251) +++ files/wrapper-1.4.7.c (working copy) @@ -20,6 +20,7 @@ #include <string.h> #include <stdarg.h> #include <errno.h> +#include <alloca.h> #define GCC_CONFIG "/usr/bin/gcc-config" #define ENVD_BASE "/etc/env.d/05gcc"
i dont like the sound of that at all ... why not just remove the usage of alloca() after all, this seems pretty frivolous: int main(int argc, char *argv[]) { struct wrapper_data *data; data = alloca(sizeof(*data)); might as well just write it: int main(int argc, char *argv[]) { struct wrapper_data data;
Your rewrite makes sense to me. It's up to you.
I just patched ldwrapper (which is based on (gcc) wrapper), do you want me to come up with a patch which punts the alloca usage?
feel free to post ... the worst that could happen is that i ignore it and write it myself ;)
Created attachment 115893 [details, diff] wrapper non-alloca patch Ok, I'll take that challenge :)
that's pretty much how i would have written it, thanks added to gcc-config-1.3.16