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
{
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"),
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_; }