Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Mar 2021 14:30:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 253942] clang -gz=zlib does not pass --compress-debug-sections to linker
Message-ID:  <bug-253942-227-6aUo0yCqEe@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-253942-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-253942-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253942

--- Comment #5 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3Dc4dbe899aa08f60b66426ecf63b1346bf=
fe25ed8

commit c4dbe899aa08f60b66426ecf63b1346bffe25ed8
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-03-03 01:35:57 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-03-09 14:28:54 +0000

    clang: Fix -gz=3Dzlib options for linker

    Clang commit ccb4124a4172bf2cb2e1cd7c253f0f1654fce294:

    Fix -gz=3Dzlib options for linker

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

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

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

    This patch fixes that.

    Clang commit 462cf39a5c180621b56f7602270ce33eb7b68d23:

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

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

    PR:             253942
    Approved by:    dim
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D29028

    (cherry picked from commit 19587d742264c5caec33d218e9cea6eb78f6c6bb)

 .../clang/lib/Driver/ToolChains/AMDGPU.cpp             |  1 +
 .../clang/lib/Driver/ToolChains/CommonArgs.cpp         | 18 ++++++++++++++=
++++
 .../clang/lib/Driver/ToolChains/CommonArgs.h           |  4 ++++
 .../clang/lib/Driver/ToolChains/FreeBSD.cpp            |  1 +
 .../llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp   |  1 +
 .../llvm-project/clang/lib/Driver/ToolChains/HIP.cpp   |  2 ++
 6 files changed, 27 insertions(+)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253942-227-6aUo0yCqEe>