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
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(-)
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.
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(-)
MFH done, thanks for your report!