Hi Collin, > > +# Avoid error "CC environment variable is relative; must be absolute path" > > +# on native Windows. Cf. > > +# > > <https://github.com/golang/go/commit/aa161e799df7e1eba99d2be10271e76b6f758142> > > +unset CC > > +unset CXX > > The CC and CXX variable are used to determine what C and C++ compiler to > use when writing code using the "C" psuedo-package [1].
Yes, you are right. > It should still build using the system's default compiler, but if > someone set CC and CXX in their environment this would be undesired. > > Not sure if it is worth the complexity of adding OS detection and > absolute path checking to this script, but I figured it was worth > mentioning. The primary goal of this script are pure Go programs. Therefore, at least for now, it's not worth the added complexity to support 'cgo'. ('cgo' was more important in the first years of Go. Meanwhile it is less important.) Bruno 2025-03-24 Bruno Haible <br...@clisp.org> gocomp-script: Improve comments. Reported by Collin Funk in <https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00094.html>. * build-aux/gocomp.sh.in: Mention limitation in comments. diff --git a/build-aux/gocomp.sh.in b/build-aux/gocomp.sh.in index 360f27f316..e403840006 100644 --- a/build-aux/gocomp.sh.in +++ b/build-aux/gocomp.sh.in @@ -18,6 +18,9 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # Usage: /bin/sh gocomp.sh [OPTION] SOURCE.go ... +# +# Limitation: Go programs that make use of the C to Go interface ('cgo') are +# unsupported. # Avoid error "CC environment variable is relative; must be absolute path" # on native Windows. Cf.