Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 173998
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Fabian Groffen <grobian@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
wrapper.patch wrapper non-alloca patch patch Fabian Groffen 2007-04-10 12:47 0000 3.00 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 173998 depends on: Show dependency tree
Bug 173998 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-04-10 08:22 0000
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"

------- Comment #1 From SpanKY 2007-04-10 11:24:25 0000 -------
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;

------- Comment #2 From Fabian Groffen 2007-04-10 11:55:36 0000 -------
Your rewrite makes sense to me.  It's up to you.

------- Comment #3 From Fabian Groffen 2007-04-10 12:12:32 0000 -------
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?

------- Comment #4 From SpanKY 2007-04-10 12:30:45 0000 -------
feel free to post ... the worst that could happen is that i ignore it and write
it myself ;)

------- Comment #5 From Fabian Groffen 2007-04-10 12:47:52 0000 -------
Created an attachment (id=115893) [details]
wrapper non-alloca patch

Ok, I'll take that challenge :)

------- Comment #6 From SpanKY 2007-04-11 08:51:07 0000 -------
that's pretty much how i would have written it, thanks

added to gcc-config-1.3.16

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug