changeset 1792:23cb10ca9797 draft

If somebody feeds in -W,-elf2flt to set the stack size, don't feed the elf2flt flag in twice.
author Rob Landley <rob@landley.net>
date Mon, 21 Sep 2015 21:32:22 -0500
parents 884724c280fc
children d461b345c3c9
files sources/toys/ccwrap.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sources/toys/ccwrap.c	Wed Sep 16 17:10:34 2015 -0500
+++ b/sources/toys/ccwrap.c	Mon Sep 21 21:32:22 2015 -0500
@@ -404,6 +404,10 @@
       SET_FLAG(Cverbose);
       printf("ccwrap: %s\n", topdir);
     } else if (!strncmp(c, "Wl,", 3)) {
+#ifdef ELF2FLT
+      // If user feeds in -Wl,-elf2flt= to set stack size, leave it to them
+      if (strstr(c, ",-elf2flt")) SET_FLAG(Cmelf);
+#endif
       temp = strstr(c, ",-static");
       if (temp && (!temp[8] || temp[8]==',')) {
         SET_FLAG(Cstatic);