aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-08-12 18:27:46 +0000
committerDoug Kwan <dougkwan@google.com>2010-08-12 18:27:46 +0000
commitce0d1972043ea09562ed28d2bb9cadc50a9dd29d (patch)
tree33884e17a20f184b0af11b86ec08b81bcb48ff3d
parent13ea7aae964fd349ff139916b4a512c197982456 (diff)
downloadgdb-ce0d1972043ea09562ed28d2bb9cadc50a9dd29d.zip
gdb-ce0d1972043ea09562ed28d2bb9cadc50a9dd29d.tar.gz
gdb-ce0d1972043ea09562ed28d2bb9cadc50a9dd29d.tar.bz2
Index: gold/arm.cc
=================================================================== RCS file: /cvs/src/src/gold/arm.cc,v retrieving revision 1.116 diff -u -u -p -r1.116 arm.cc --- gold/arm.cc 3 Aug 2010 14:07:12 -0000 1.116 +++ gold/arm.cc 6 Aug 2010 07:59:30 -0000 @@ -10290,11 +10290,11 @@ Target_arm<big_endian>::merge_object_att out_attr[i].set_int_value(in_attr[i].int_value()); break; case elfcpp::Tag_ABI_PCS_wchar_t: - // FIXME: Make it possible to turn off this warning. if (out_attr[i].int_value() && in_attr[i].int_value() && out_attr[i].int_value() != in_attr[i].int_value() - && parameters->options().warn_mismatch()) + && parameters->options().warn_mismatch() + && parameters->options().wchar_size_warning()) { gold_warning(_("%s uses %u-byte wchar_t yet the output is to " "use %u-byte wchar_t; use of wchar_t values " @@ -10315,10 +10315,10 @@ Target_arm<big_endian>::merge_object_att // Use whatever requirements the new object has. out_attr[i].set_int_value(in_attr[i].int_value()); } - // FIXME: Make it possible to turn off this warning. else if (in_attr[i].int_value() != elfcpp::AEABI_enum_forced_wide && out_attr[i].int_value() != in_attr[i].int_value() - && parameters->options().warn_mismatch()) + && parameters->options().warn_mismatch() + && parameters->options().enum_size_warning()) { unsigned int in_value = in_attr[i].int_value(); unsigned int out_value = out_attr[i].int_value(); Index: gold/options.h =================================================================== RCS file: /cvs/src/src/gold/options.h,v retrieving revision 1.147 diff -u -u -p -r1.147 options.h --- gold/options.h 1 Jun 2010 23:37:57 -0000 1.147 +++ gold/options.h 6 Aug 2010 07:59:30 -0000 @@ -722,6 +722,10 @@ class General_options DEFINE_special(EL, options::ONE_DASH, '\0', N_("Link little-endian objects."), NULL); + DEFINE_bool(enum_size_warning, options::TWO_DASHES, '\0', true, NULL, + N_("(ARM only) Do not warn about objects with incompatible " + "enum sizes")); + DEFINE_bool(fatal_warnings, options::TWO_DASHES, '\0', false, N_("Treat warnings as errors"), N_("Do not treat warnings as errors")); @@ -1038,6 +1042,10 @@ class General_options N_("Report unresolved symbols as errors"), NULL, true); + DEFINE_bool(wchar_size_warning, options::TWO_DASHES, '\0', true, NULL, + N_("(ARM only) Do not warn about objects with incompatible " + "wchar_t sizes")); + DEFINE_bool(whole_archive, options::TWO_DASHES, '\0', false, N_("Include all archive contents"), N_("Include only needed archive contents"));
-rw-r--r--gold/ChangeLog7
-rw-r--r--gold/arm.cc8
-rw-r--r--gold/options.h8
3 files changed, 19 insertions, 4 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index d19a5be..90510b5 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-12 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Target_arm::merge_object_attributes): Check command line
+ options --no-wchar-size-warning and --no-enum-size-warning.
+ * options.h (General_options): Add ld-compatible options
+ --no-enum-size-warning and --no-wchar-size-warning.
+
2010-08-04 Ian Lance Taylor <iant@google.com>
* x86_64.cc (Target_x86_64::Scan::local): Use
diff --git a/gold/arm.cc b/gold/arm.cc
index 5d25533..51ce38c 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -10290,11 +10290,11 @@ Target_arm<big_endian>::merge_object_attributes(
out_attr[i].set_int_value(in_attr[i].int_value());
break;
case elfcpp::Tag_ABI_PCS_wchar_t:
- // FIXME: Make it possible to turn off this warning.
if (out_attr[i].int_value()
&& in_attr[i].int_value()
&& out_attr[i].int_value() != in_attr[i].int_value()
- && parameters->options().warn_mismatch())
+ && parameters->options().warn_mismatch()
+ && parameters->options().wchar_size_warning())
{
gold_warning(_("%s uses %u-byte wchar_t yet the output is to "
"use %u-byte wchar_t; use of wchar_t values "
@@ -10315,10 +10315,10 @@ Target_arm<big_endian>::merge_object_attributes(
// Use whatever requirements the new object has.
out_attr[i].set_int_value(in_attr[i].int_value());
}
- // FIXME: Make it possible to turn off this warning.
else if (in_attr[i].int_value() != elfcpp::AEABI_enum_forced_wide
&& out_attr[i].int_value() != in_attr[i].int_value()
- && parameters->options().warn_mismatch())
+ && parameters->options().warn_mismatch()
+ && parameters->options().enum_size_warning())
{
unsigned int in_value = in_attr[i].int_value();
unsigned int out_value = out_attr[i].int_value();
diff --git a/gold/options.h b/gold/options.h
index cf1c153..efd9e90 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -722,6 +722,10 @@ class General_options
DEFINE_special(EL, options::ONE_DASH, '\0',
N_("Link little-endian objects."), NULL);
+ DEFINE_bool(enum_size_warning, options::TWO_DASHES, '\0', true, NULL,
+ N_("(ARM only) Do not warn about objects with incompatible "
+ "enum sizes"));
+
DEFINE_bool(fatal_warnings, options::TWO_DASHES, '\0', false,
N_("Treat warnings as errors"),
N_("Do not treat warnings as errors"));
@@ -1038,6 +1042,10 @@ class General_options
N_("Report unresolved symbols as errors"),
NULL, true);
+ DEFINE_bool(wchar_size_warning, options::TWO_DASHES, '\0', true, NULL,
+ N_("(ARM only) Do not warn about objects with incompatible "
+ "wchar_t sizes"));
+
DEFINE_bool(whole_archive, options::TWO_DASHES, '\0', false,
N_("Include all archive contents"),
N_("Include only needed archive contents"));