This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, alpha, go]: Introduce applyRelocationsALPHA


On Thu, Jun 22, 2017 at 12:13 AM, Uros Bizjak <ubizjak@gmail.com> 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  <iant@golang.org>

* Makefile.am (s-zdefaultcc): Don't record $(bindir) for defaultCC
or defaultCXX.
* Makefile.in: Rebuild.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]