Bug 259446 - devel/binutils: configure with --enable-new-dtags
Summary: devel/binutils: configure with --enable-new-dtags
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-25 21:33 UTC by Tijl Coosemans
Modified: 2021-11-20 19:34 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jflopezfernandez)
tijl: merge-quarterly+


Attachments
patch (1.09 KB, patch)
2021-10-25 21:33 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tijl Coosemans freebsd_committer freebsd_triage 2021-10-25 21:33:18 UTC
Created attachment 229031 [details]
patch

Binutils ld currently doesn't use new dtags by default, unlike LLVM ld.  This patch adds the --enable-new-dtags configure flag for FreeBSD targets.  This makes binutils ld use DT_RUNPATH instead of DT_RPATH by default.  The difference between the two is explained in the rtld man page.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-10-25 22:35:33 UTC
Should this be merged to quarterly branch? Does it need or would an exp-run be handy?

^Triage: Reporter is committer, assign accordingly
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-11-11 21:19:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dea411ca0ce1f3152bad6609868146f383b720c6

commit dea411ca0ce1f3152bad6609868146f383b720c6
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2021-10-25 16:33:09 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2021-11-11 21:18:12 +0000

    devel/binutils: configure with --enable-new-dtags

    This makes binutils ld use DT_RUNPATH instead of DT_RPATH by default
    for FreeBSD targets and brings it in line with LLVM ld.

    The difference between the two is that DT_RUNPATH has a lower priority
    than the LD_LIBRARY_PATH environment variable.  This variable is used
    by libtool to override DT_RUNPATH when running programs directly from
    the build directory (e.g. during make test).

    PR:             259446
    Approved by:    maintainer timeout (2 weeks)

 devel/binutils/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-11-20 19:32:20 UTC
A commit in branch 2021Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=06072fa94da786cb7c20f5a3eb9e8144bcb87fa5

commit 06072fa94da786cb7c20f5a3eb9e8144bcb87fa5
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2021-10-25 16:33:09 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2021-11-20 19:30:02 +0000

    devel/binutils: configure with --enable-new-dtags

    This makes binutils ld use DT_RUNPATH instead of DT_RPATH by default
    for FreeBSD targets and brings it in line with LLVM ld.

    The difference between the two is that DT_RUNPATH has a lower priority
    than the LD_LIBRARY_PATH environment variable.  This variable is used
    by libtool to override DT_RUNPATH when running programs directly from
    the build directory (e.g. during make test).

    PR:             259446
    Approved by:    maintainer timeout (2 weeks)

    (cherry picked from commit dea411ca0ce1f3152bad6609868146f383b720c6)

 devel/binutils/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)