Implement -Bstatic/-Bdynamic.
authorIan Lance Taylor <iant@google.com>
Mon, 22 Oct 2007 18:04:43 +0000 (18:04 +0000)
committerIan Lance Taylor <iant@google.com>
Mon, 22 Oct 2007 18:04:43 +0000 (18:04 +0000)
gold/fileread.cc
gold/options.cc
gold/options.h

index c4145de5cdbc9e4af343817630b8ff7fa85e4530..1e3b4638f68d255a4d67190ce7dce13deda37f3a 100644 (file)
@@ -428,7 +428,8 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath)
       std::string n1("lib");
       n1 += this->input_argument_->name();
       std::string n2;
-      if (options.is_static())
+      if (options.is_static()
+         || this->input_argument_->options().do_static_search())
        n1 += ".a";
       else
        {
index 9513f15188d153620e699c0851cba07961686335..4e74dcefa8a33e661a1913e44c117b21648e7baf 100644 (file)
@@ -312,6 +312,14 @@ options::Command_line_options::options[] =
   POSDEP_NOARG('\0', "no-as-needed",
               N_("Always DT_NEEDED for dynamic libs (default)"),
               NULL, TWO_DASHES, &Position_dependent_options::clear_as_needed),
+  POSDEP_NOARG('\0', "Bdynamic",
+              N_("-l searches for shared libraries"),
+              NULL, ONE_DASH,
+              &Position_dependent_options::set_dynamic_search),
+  POSDEP_NOARG('\0', "Bstatic",
+              N_("-l does not search for shared libraries"),
+              NULL, ONE_DASH,
+              &Position_dependent_options::set_static_search),
   GENERAL_NOARG('\0', "Bsymbolic", N_("Bind defined symbols locally"),
                NULL, ONE_DASH, &General_options::set_symbolic),
   GENERAL_NOARG('E', "export-dynamic", N_("Export all dynamic symbols"),
index 701aa9c6a046bb2675d1acb3770e34c3220317c4..f9782cc9991e8093e9892e29918bbe3783020d30 100644 (file)
@@ -397,8 +397,8 @@ class Position_dependent_options
  public:
   Position_dependent_options();
 
-  // -Bstatic: Whether we are searching for a static archive rather
-  // than a shared object.
+  // -Bdynamic/-Bstatic: Whether we are searching for a static archive
+  // -rather than a shared object.
   bool
   do_static_search() const
   { return this->do_static_search_; }
This page took 0.025778 seconds and 4 git commands to generate.