Bug 263851 - devel/tbb: Check CC and COMPILER_TYPE at time of applying the post-extract tgt
Summary: devel/tbb: Check CC and COMPILER_TYPE at time of applying the post-extract tgt
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: Ganael LAPLANCHE
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-05-07 19:06 UTC by Sean Champ
Modified: 2022-05-23 10:14 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (martymac)
koobs: merge-quarterly?


Attachments
comparing CC:T and COMPILER_TYPE for those variable's values when the tgt shell cmds are evaluated (662 bytes, patch)
2022-05-07 19:06 UTC, Sean Champ
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Champ 2022-05-07 19:06:37 UTC
Created attachment 233798 [details]
comparing CC:T and COMPILER_TYPE for those variable's values when the tgt shell cmds are evaluated

This patch draws the test for comparison of CC basename and COMPILER_TYPE in post-extract for devel/tbb into the shell environment at the time when the post-extract tgt will have been applied. For most build environments, this may result in a post-extract behavior equivalent to that with the original Makefile.

Rationale:

When either CC (e.g 'cc') or COMPILER_TYPE (e.g 'clang') is modified under local /usr/ports/Makefile.inc then each variable's value at the time of applying the post-extract tgt may not be equivalent to the value as at the time when the port Makefile is evaluated.

For build environments that modify CC or COMPILER_TYPE under /usr/ports/Makefile.inc such that the values of ${CC:T} and ${COMPILER_TYPE} are not equivalent before Makefile.inc and that the values are equivalent after Makefile.inc, then this changeset may serve to prevent the creation of a self-referential symbolic link in post-extract for devel/tbb
Comment 1 commit-hook freebsd_committer 2022-05-12 10:38:21 UTC
A commit in branch main references this bug:

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

commit b5e26678495d795d8596874e19790076e09c1c91
Author:     Sean Champ <lab+bsd@thinkum.space>
AuthorDate: 2022-05-12 10:33:23 +0000
Commit:     Ganael LAPLANCHE <martymac@FreeBSD.org>
CommitDate: 2022-05-12 10:33:23 +0000

    devel/tbb: Fix symlink creation during build

    Temporary variable CC_BASENAME may not reflect actual COMPILER_TYPE on
    environments that modify CC or COMPILER_TYPE through included files,
    leading to creating a wrong symlink.

    Evaluating CC in the post-extract target ensures it is up to date and
    in line with COMPILER_TYPE.

    PR:     263851
    Reported by:    Sean Champ <lab+bsd@thinkum.space>
    MFH:    2022Q2

 devel/tbb/Makefile | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Comment 2 Ganael LAPLANCHE freebsd_committer 2022-05-12 10:41:08 UTC
Committed, thanks!

As I could not test many ARCHs (only i386 and amd64), I'll MFH within a week if nothing breaks.

Best regards,

Ganael.
Comment 3 commit-hook freebsd_committer 2022-05-23 10:14:23 UTC
A commit in branch 2022Q2 references this bug:

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

commit 60acf80710f375941e4a7598858a5e97a97728d9
Author:     Sean Champ <lab+bsd@thinkum.space>
AuthorDate: 2022-05-12 10:33:23 +0000
Commit:     Ganael LAPLANCHE <martymac@FreeBSD.org>
CommitDate: 2022-05-23 10:12:44 +0000

    devel/tbb: Fix symlink creation during build

    Temporary variable CC_BASENAME may not reflect actual COMPILER_TYPE on
    environments that modify CC or COMPILER_TYPE through included files,
    leading to creating a wrong symlink.

    Evaluating CC in the post-extract target ensures it is up to date and
    in line with COMPILER_TYPE.

    PR:     263851
    Reported by:    Sean Champ <lab+bsd@thinkum.space>
    MFH:    2022Q2

    (cherry picked from commit b5e26678495d795d8596874e19790076e09c1c91)

 devel/tbb/Makefile | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Comment 4 Ganael LAPLANCHE freebsd_committer 2022-05-23 10:14:55 UTC
MFH done, thanks for your report!