On Thu, Jun 22, 2017 at 12:39 AM, Ian Lance Taylor <i...@golang.org> wrote:
> On Tue, Jun 20, 2017 at 12:46 PM, Uros Bizjak <ubiz...@gmail.com> wrote:
>> This patch inroduces applyRelocationsALPHA to solve:
>>
>> FAIL: TestCgoConsistentResults
>> FAIL: TestCgoPkgConfig
>> FAIL: TestCgoHandlesWlORIGIN
>>
>> gotools errors.
>>
>> Bootstrapped and regression tested on alphaev68-linux-gnu.
>
> Thanks!  Committed to mainline.

Thanks!

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.

Uros.

Reply via email to