aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2011-07-24 19:22:41 -0400
committerSandra Loosemore <sandra@gcc.gnu.org>2011-07-24 19:22:41 -0400
commitdf45fc34aa658555c252eee36a059d753d859610 (patch)
treeff68b0982803322915f57a7bfc275d261083dd9d /gcc
parent73645647f97029a05b08bdb5077d5da1592e088e (diff)
downloadgcc-df45fc34aa658555c252eee36a059d753d859610.zip
gcc-df45fc34aa658555c252eee36a059d753d859610.tar.gz
gcc-df45fc34aa658555c252eee36a059d753d859610.tar.bz2
configure.ac (demangler_in_ld): Default to yes.
2011-07-24 Sandra Loosemore <sandra@codesourcery.com> gcc/ * configure.ac (demangler_in_ld): Default to yes. * configure: Regenerated. * collect2.c (main): When HAVE_LD_DEMANGLE is defined, don't mess with COLLECT_NO_DEMANGLE, and just pass --demangle and --no-demangle options straight through to ld. When HAVE_LD_DEMANGLE is not defined, set COLLECT_NO_DEMANGLE in a way that has the intended effect on Windows. From-SVN: r176720
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/collect2.c18
-rwxr-xr-xgcc/configure2
-rw-r--r--gcc/configure.ac2
4 files changed, 19 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5913e21..207b097 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2011-07-24 Sandra Loosemore <sandra@codesourcery.com>
+
+ * configure.ac (demangler_in_ld): Default to yes.
+ * configure: Regenerated.
+ * collect2.c (main): When HAVE_LD_DEMANGLE is defined, don't
+ mess with COLLECT_NO_DEMANGLE, and just pass --demangle and
+ --no-demangle options straight through to ld. When
+ HAVE_LD_DEMANGLE is not defined, set COLLECT_NO_DEMANGLE in a
+ way that has the intended effect on Windows.
+
2011-07-23 Richard Henderson <rth@redhat.com>
* dwarf2cfi.c: Include basic-block.h.
diff --git a/gcc/collect2.c b/gcc/collect2.c
index dadf82d..cd0fad7 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -1112,10 +1112,12 @@ main (int argc, char **argv)
num_c_args = argc + 9;
+#ifndef HAVE_LD_DEMANGLE
no_demangle = !! getenv ("COLLECT_NO_DEMANGLE");
/* Suppress demangling by the real linker, which may be broken. */
- putenv (xstrdup ("COLLECT_NO_DEMANGLE="));
+ putenv (xstrdup ("COLLECT_NO_DEMANGLE=1"));
+#endif
#if defined (COLLECT2_HOST_INITIALIZATION)
/* Perform system dependent initialization, if necessary. */
@@ -1405,12 +1407,6 @@ main (int argc, char **argv)
/* After the first file, put in the c++ rt0. */
first_file = 1;
-#ifdef HAVE_LD_DEMANGLE
- if (!demangle_flag && !no_demangle)
- demangle_flag = "--demangle";
- if (demangle_flag)
- *ld1++ = *ld2++ = demangle_flag;
-#endif
while ((arg = *++argv) != (char *) 0)
{
*ld1++ = *ld2++ = arg;
@@ -1514,16 +1510,16 @@ main (int argc, char **argv)
case '-':
if (strcmp (arg, "--no-demangle") == 0)
{
- demangle_flag = arg;
+#ifndef HAVE_LD_DEMANGLE
no_demangle = 1;
ld1--;
ld2--;
+#endif
}
else if (strncmp (arg, "--demangle", 10) == 0)
{
- demangle_flag = arg;
- no_demangle = 0;
#ifndef HAVE_LD_DEMANGLE
+ no_demangle = 0;
if (arg[10] == '=')
{
enum demangling_styles style
@@ -1533,9 +1529,9 @@ main (int argc, char **argv)
else
current_demangling_style = style;
}
-#endif
ld1--;
ld2--;
+#endif
}
else if (strncmp (arg, "--sysroot=", 10) == 0)
target_system_root = arg + 10;
diff --git a/gcc/configure b/gcc/configure
index e33fc1b..1a4c1b7 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -3413,7 +3413,7 @@ fi
if test "${with_demangler_in_ld+set}" = set; then :
withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld"
else
- demangler_in_ld=no
+ demangler_in_ld=yes
fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index fb243272..9d7bb66 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -222,7 +222,7 @@ fi
AC_ARG_WITH(demangler-in-ld,
[AS_HELP_STRING([--with-demangler-in-ld], [try to use demangler in GNU ld])],
demangler_in_ld="$with_demangler_in_ld",
-demangler_in_ld=no)
+demangler_in_ld=yes)
# ----------------------
# Find default assembler