aboutsummaryrefslogtreecommitdiff
path: root/gold/options.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2008-10-07 23:40:21 +0000
committerCary Coutant <ccoutant@google.com>2008-10-07 23:40:21 +0000
commit4e1e25e084aa25b58cc1d6bd24d820af94d5af78 (patch)
tree8db4763b4deb3973e3749c9c535c749a46d3921f /gold/options.cc
parentc289427b7dcbeb9d5ee0ad4d177bc36c9d8990f5 (diff)
downloadfsf-binutils-gdb-4e1e25e084aa25b58cc1d6bd24d820af94d5af78.zip
fsf-binutils-gdb-4e1e25e084aa25b58cc1d6bd24d820af94d5af78.tar.gz
fsf-binutils-gdb-4e1e25e084aa25b58cc1d6bd24d820af94d5af78.tar.bz2
* options.c (General_options::finalize): Add check for -static and
-shared. * gold.cc (queue_middle_tasks): Assert that list of dynamic objects is not empty.
Diffstat (limited to 'gold/options.cc')
-rw-r--r--gold/options.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gold/options.cc b/gold/options.cc
index 08b67fd..069c138 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -792,6 +792,9 @@ General_options::finalize()
this->add_sysroot();
// Now that we've normalized the options, check for contradictory ones.
+ if (this->shared() && this->is_static())
+ gold_fatal(_("-shared and -static are incompatible"));
+
if (this->shared() && this->relocatable())
gold_fatal(_("-shared and -r are incompatible"));