Page MenuHomeFreeBSD

clang: Fix -gz=zlib options for linker
ClosedPublic

Authored by emaste on Mar 3 2021, 1:40 AM.
Tags
None
Referenced Files
F102358680: D29028.id.diff
Mon, Nov 11, 4:44 AM
Unknown Object (File)
Mon, Nov 11, 2:26 AM
Unknown Object (File)
Oct 2 2024, 1:25 AM
Unknown Object (File)
Sep 28 2024, 10:34 AM
Unknown Object (File)
Sep 27 2024, 3:12 AM
Unknown Object (File)
Sep 3 2024, 11:10 PM
Unknown Object (File)
Sep 2 2024, 12:56 PM
Unknown Object (File)
Sep 2 2024, 12:56 PM
Subscribers

Details

Summary

Upstream commit ccb4124a4172bf2cb2e1cd7c253f0f1654fce294

Fix -gz=zlib options for linker

gcc translates -gz=zlib to --compress-debug-options=zlib for both
assembler and linker but clang only does this for assembler.

The linker needs --compress-debug-options=zlib option to compress the
debug sections in the generated executable or shared library.

Due to this bug, -gz=zlib has no effect on the generated executable or
shared library.

This patch fixes that.

Upstream commit 462cf39a5c180621b56f7602270ce33eb7b68d23

[Driver] Fix -gz=zlib options for linker also on FreeBSD

ccb4124a4172 fixed translating -gz=zlib to --compress-debug-sections for
linker invocation for several ToolChains, but omitted FreeBSD.

PR: 253942

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable