diff options
author | Fangrui Song <i@maskray.me> | 2022-04-06 22:41:27 -0700 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2022-05-18 20:28:53 -0700 |
commit | e70d79f1e8c0802c4039d2d66131c00590d49722 (patch) | |
tree | d63c7f8076a398c5ba99b1fe62e0b1f373f7993f | |
parent | 7a42b2fd5be3f4141bd0db3c5efa2ebb74ef658d (diff) | |
download | llvm-e70d79f1e8c0802c4039d2d66131c00590d49722.tar.gz |
[ELF] Ignore --no-add-needed
It is used by a few projects like keepassxc and mumble.
Also see https://bugzilla.redhat.com/show_bug.cgi?id=2070813 that Fedora gcc has
an (unneeded) gcc12-no-add-needed.patch which adds --no-add-needed, although
--[no-]add-needed has been deprecated in GNU ld since 2009. Adding this has low
costs and makes several folks happy.
This basically restores 8f13bef575c97db4d6c146c3bb647ac9e73a9248.
Fixes https://github.com/llvm/llvm-project/issues/54756
(cherry picked from commit c29c19cb5327624dd31fcb776f8fbe66ca1011bb)
-rw-r--r-- | lld/ELF/Options.td | 1 | ||||
-rw-r--r-- | lld/test/ELF/silent-ignore.test | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td index ca9fdcde791f..cf2013a5f820 100644 --- a/lld/ELF/Options.td +++ b/lld/ELF/Options.td @@ -695,6 +695,7 @@ def plugin_opt_eq : J<"plugin-opt=">; def: F<"detect-odr-violations">; def: Flag<["-"], "g">; def: F<"long-plt">; +def: FF<"no-add-needed">; def: F<"no-copy-dt-needed-entries">; def: F<"no-ctors-in-init-array">; def: F<"no-keep-memory">; diff --git a/lld/test/ELF/silent-ignore.test b/lld/test/ELF/silent-ignore.test index 91b57434765f..923afb2b5021 100644 --- a/lld/test/ELF/silent-ignore.test +++ b/lld/test/ELF/silent-ignore.test @@ -2,6 +2,7 @@ RUN: ld.lld --version \ RUN: -detect-odr-violations \ RUN: -g \ RUN: -long-plt \ +RUN: --no-add-needed \ RUN: -no-copy-dt-needed-entries \ RUN: -no-ctors-in-init-array \ RUN: -no-keep-memory \ |