Bug 236205 - [CMake] REGRESSION(r288994): Linker does not get passed --disable-new-dtags
Summary: [CMake] REGRESSION(r288994): Linker does not get passed --disable-new-dtags
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-06 12:00 PST by Adrian Perez
Modified: 2022-02-07 07:29 PST (History)
11 users (show)

See Also:


Attachments
Patch (4.17 KB, patch)
2022-02-06 12:05 PST, Adrian Perez
no flags Details | Formatted Diff | Diff
Patch v2 (4.15 KB, patch)
2022-02-07 03:39 PST, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2022-02-06 12:00:56 PST
After switching from ld.gold to ld.bfd in r288994, the --disable-new-dtags
option is no longer passed to the linker. This can be an issue because without
it ELF headers will contain a DT_RUNPATH entry instead of a DT_RPATH one. The
issue is that DT_RUNPATH can be overriden by the LD_LIBRARY_PATH environment
variable, which can easily result in running binaries straight from the build
directory accidentally using libraries from outside the build directory if
the variable is defined. With DT_RPATH libraries from the lib/ subdirectory
will be used, which is desirable during testing.
Comment 1 Adrian Perez 2022-02-06 12:01:42 PST
CC'd Alex, who first noticed the issue and found the offending commit
(thanks!)
Comment 2 Adrian Perez 2022-02-06 12:05:04 PST
Created attachment 451046 [details]
Patch
Comment 3 Alejandro G. Castro 2022-02-07 02:17:39 PST
Comment on attachment 451046 [details]
Patch

Looks good! Thanks for fixing this! Compilation issues do not seem related?
Comment 4 Adrian Perez 2022-02-07 03:39:55 PST
Created attachment 451075 [details]
Patch v2
Comment 5 Adrian Perez 2022-02-07 03:43:59 PST
(In reply to Alejandro G. Castro from comment #3)
> Comment on attachment 451046 [details]
> Patch
> 
> Looks good! Thanks for fixing this! Compilation issues do not seem related?

One of them (from the i386 32-bit builder) was actually related, I have
uploaded a second version of the patch which avoids using list(POP_BACK)
which is not available in older CMake versions. I am currently chatting
with Angelos to try and understand the other failure to make sure it's
either unrelated or this patch changed to avoid it if needed.
Comment 6 EWS 2022-02-07 07:28:27 PST
Committed r289218 (246903@main): <https://commits.webkit.org/246903@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 451075 [details].
Comment 7 Radar WebKit Bug Importer 2022-02-07 07:29:18 PST
<rdar://problem/88570928>