On Thu, Jun 22, 2017 at 12:13 AM, Uros Bizjak wrote: > > However, there is one another issue with zdefaultcc.go generation. On > my system, the default gccgo, gcc and g++ are installed in: > > $ which gccgo > /usr/bin/gccgo > $ which gcc > /usr/bin/gcc > > but gotools Makefile uses $(bindir) to derive absolute path to the binaries: > > echo 'package main' > zdefaultcc.go.tmp > echo 'const defaultGCCGO = "$(bindir)/$(GCCGO_INSTALL_NAME)"' >>> zdefaultcc.go.tmp > echo 'const defaultCC = "$(bindir)/$(GCC_INSTALL_NAME)"' >> > zdefaultcc.go.tmp > echo 'const defaultCXX = "$(bindir)/$(GXX_INSTALL_NAME)"' >> > zdefaultcc.go.tmp > echo 'const defaultPkgConfig = "pkg-config"' >> zdefaultcc.go.tmp > > However, since $prefix (by default) points to /usr/local, $bindir > points to /usr/local/bin. Consequently, zdefaultcc.go reads: > > package main > const defaultGCCGO = "/usr/local/bin/gccgo" > const defaultCC = "/usr/local/bin/gcc" > const defaultCXX = "/usr/local/bin/g++" > const defaultPkgConfig = "pkg-config" > > The absolute path is wrong, since - as mentioned above - the system > compiler is installed in /usr/bin. > > Probably we just need to remove $bindir and assume that these binaries > exist in $PATH. I did that for defaultCC and defaultCXX, as appended. Ian 2017-06-26 Ian Lance Taylor * Makefile.am (s-zdefaultcc): Don't record $(bindir) for defaultCC or defaultCXX. * Makefile.in: Rebuild.