Fix build breakage on GNU/Linux AArch64
[deliverable/binutils-gdb.git] / gold / options.cc
index 276be39e47016bff3637859dab9ecc3f40ec3668..ed63b6f04feb08b1f6c75d7ada86d1d0eb1f2bdb 100644 (file)
@@ -1,6 +1,6 @@
 // options.c -- handle command line options for gold
 
-// Copyright (C) 2006-2016 Free Software Foundation, Inc.
+// Copyright (C) 2006-2017 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -998,7 +998,8 @@ General_options::General_options()
     section_starts_(),
     fix_v4bx_(FIX_V4BX_NONE),
     endianness_(ENDIANNESS_NOT_SET),
-    discard_locals_(DISCARD_SEC_MERGE)
+    discard_locals_(DISCARD_SEC_MERGE),
+    orphan_handling_enum_(ORPHAN_PLACE)
 {
   // Turn off option registration once construction is complete.
   gold::options::ready_to_register = false;
@@ -1157,6 +1158,19 @@ General_options::finalize()
       this->set_do_demangle(getenv("COLLECT_NO_DEMANGLE") == NULL);
     }
 
+  // Parse the --orphan-handling argument.
+  if (this->user_set_orphan_handling())
+    {
+      if (strcmp(this->orphan_handling(), "place") == 0)
+        this->set_orphan_handling_enum(ORPHAN_PLACE);
+      else if (strcmp(this->orphan_handling(), "discard") == 0)
+        this->set_orphan_handling_enum(ORPHAN_DISCARD);
+      else if (strcmp(this->orphan_handling(), "warn") == 0)
+        this->set_orphan_handling_enum(ORPHAN_WARN);
+      else if (strcmp(this->orphan_handling(), "error") == 0)
+        this->set_orphan_handling_enum(ORPHAN_ERROR);
+    }
+
   // -M is equivalent to "-Map -".
   if (this->print_map() && !this->user_set_Map())
     {
This page took 0.02337 seconds and 4 git commands to generate.