Skip to content

Commit e70d79f

Browse files
MaskRaytstellar
authored andcommitted
[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 8f13bef. Fixes #54756 (cherry picked from commit c29c19c)
1 parent 7a42b2f commit e70d79f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lld/ELF/Options.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ def plugin_opt_eq : J<"plugin-opt=">;
695695
def: F<"detect-odr-violations">;
696696
def: Flag<["-"], "g">;
697697
def: F<"long-plt">;
698+
def: FF<"no-add-needed">;
698699
def: F<"no-copy-dt-needed-entries">;
699700
def: F<"no-ctors-in-init-array">;
700701
def: F<"no-keep-memory">;

lld/test/ELF/silent-ignore.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ RUN: ld.lld --version \
22
RUN: -detect-odr-violations \
33
RUN: -g \
44
RUN: -long-plt \
5+
RUN: --no-add-needed \
56
RUN: -no-copy-dt-needed-entries \
67
RUN: -no-ctors-in-init-array \
78
RUN: -no-keep-memory \

0 commit comments

Comments
 (0)