Bug 258291 - lang/go{-devel}: Respect CC
Summary: lang/go{-devel}: Respect CC
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Guangyuan Yang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-05 16:39 UTC by Evgeniy Khramtsov
Modified: 2021-10-23 17:03 UTC (History)
2 users (show)

See Also:
evgeniy: maintainer-feedback-


Attachments
v1 (use "git am") (1.22 KB, patch)
2021-09-05 16:39 UTC, Evgeniy Khramtsov
no flags Details | Diff
v1.1 (use "git am") (1.23 KB, patch)
2021-09-25 11:24 UTC, Evgeniy Khramtsov
evgeniy: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeniy Khramtsov 2021-09-05 16:39:37 UTC
Created attachment 227687 [details]
v1 (use "git am")

lang/go(-devel) does not respect CC per https://docs.freebsd.org/en/books/porters-handbook/porting-dads/#dads-cc

Reproduce by deleting 'cc' from jail and overriding CC to another value.

Package contents did change; PORTREVISION is bumped for lang/go(-devel):

11.4/amd64: https://codeberg.org/ei/misc/commit/b7f9d4e30f1
11.4/i386:  https://codeberg.org/ei/misc/commit/f3b9c5ec157
12.2/amd64: https://codeberg.org/ei/misc/commit/040234ee1e6
12.2/i386:  https://codeberg.org/ei/misc/commit/9897cb3af0a
13.0/amd64: https://codeberg.org/ei/misc/commit/33deb678794

My 'misc' repository also contains bulk and testport logs for this change,
not adding URL links to specific commits because codeberg did not generate
log diff this time for some reason, diff between logs can also be observed
by cloning the 'misc' repository and viewing with git if needed.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-09-06 02:51:04 UTC
Are environment/user CFLAGS and other flags (LDFLAGS, etc) honoured? Honoured meaning 'appended', not just included
Comment 2 Evgeniy Khramtsov 2021-09-06 11:57:01 UTC
(In reply to Kubilay Kocak from comment #1)

> Are environment/user CFLAGS and other flags (LDFLAGS, etc) honoured?

This is not easily verifiable as lang/go build log is not verbose by default,
and I am not familiar with Go build system to verbose build log. I added
"CFLAGS" and "LDFLAGS" to Makefile to check, and it seems that Go can't
build with these passed:

=======================<phase: build          >============================
===== env: NO_DEPENDS=yes
===>  Building for go-1.17_3,1
cd /wrkdirs/usr/ports/lang/go/work/go/src ; /usr/bin/env  XDG_CACHE_HOME=/wrkdirs/usr/ports/lang/go/work  GOROOT_BOOTSTRAP=/wrkdirs/usr/ports/lang/go/work/go-freebsd-amd64-bootstrap  GOROOT=/wrkdirs/usr/ports/lang/go/work/go  GOROOT_FINAL=/usr/local/go  GOBIN=  GOOS=freebsd  GOARCH=amd64  GO386=  GOARM=  CC=cc  CFLAGS=-O2 -pipe -fstack-protector-foo  -fstack-protector-strong -fno-strict-aliasing   LDFLAGS= -fstack-protector-strong   /bin/sh make.bash -v
env: -pipe: No such file or directory
*** Error code 127

Also, this seems PR scope creep to me.
Comment 3 Evgeniy Khramtsov 2021-09-25 11:24:19 UTC
Created attachment 228168 [details]
v1.1 (use "git am")

Update to the latest ports.
Comment 4 Evgeniy Khramtsov 2021-10-23 17:03:21 UTC
ping