[Driver][Gnu] Delete unneeded -Bstatic dispatch for arm/thumb
authorFangrui Song <i@maskray.me>
Tue, 19 Oct 2021 22:24:07 +0000 (15:24 -0700)
committerFangrui Song <i@maskray.me>
Tue, 19 Oct 2021 22:24:07 +0000 (15:24 -0700)
Historically -static and -Bstatic are synonym.
gold made the semantics of -static slightly stronger but that does not matter.

clang/lib/Driver/ToolChains/Gnu.cpp

index 2b5c34b..e599f5d 100644 (file)
@@ -477,11 +477,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("-shared");
 
   if (IsStatic) {
-    if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb ||
-        Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb)
-      CmdArgs.push_back("-Bstatic");
-    else
-      CmdArgs.push_back("-static");
+    CmdArgs.push_back("-static");
   } else {
     if (Args.hasArg(options::OPT_rdynamic))
       CmdArgs.push_back("-export-dynamic");