lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] odd/fixups 45e7da7 1/4: Replace literal "gcc" wi


From: Greg Chicares
Subject: Re: [lmi] [lmi-commits] odd/fixups 45e7da7 1/4: Replace literal "gcc" with $LMI_COMPILER
Date: Mon, 6 May 2019 23:29:07 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 2019-05-06 23:18, Vadim Zeitlin wrote:
> On Mon,  6 May 2019 19:06:58 -0400 (EDT) Greg Chicares <address@hidden> wrote:
> 
> GC> branch: odd/fixups
> GC> commit 45e7da7a2560f6c2e5642354bbd2e1e9ef8754b2
> GC> Author: Gregory W. Chicares <address@hidden>
> GC> Commit: Gregory W. Chicares <address@hidden>
> GC> 
> GC>     Replace literal "gcc" with $LMI_COMPILER
> GC>     
> GC>     This change seems necessary to allow building with a different 
> compiler.
> GC> ---
> GC>  install_wx.sh | 4 ++--
> GC>  1 file changed, 2 insertions(+), 2 deletions(-)
> GC> 
> GC> diff --git a/install_wx.sh b/install_wx.sh
> GC> index 294da80..ab8f54b 100755
> GC> --- a/install_wx.sh
> GC> +++ b/install_wx.sh
> GC> @@ -89,7 +89,7 @@ case "$build_type" in
> GC>  esac
> GC>  
> GC>  # Distinguish wx dll by host type, compiler version, and wx SHA1.
> GC> -gcc_version=$(${mingw_bin_dir}${LMI_TRIPLET}-gcc -dumpversion|tr -d '\r')
> GC> +gcc_version=$(${mingw_bin_dir}${LMI_TRIPLET}-$LMI_COMPILER 
> -dumpversion|tr -d '\r')
> GC>  vendor=${LMI_TRIPLET}-$gcc_version-$wx_commit_sha
> GC>  
> GC>  # Configuration reference:
> GC> @@ -135,7 +135,7 @@ config_options="
> GC>  
> GC>  [ -n "$mingw_bin_dir" ] && export PATH="$mingw_bin_dir:${PATH}"
> GC>  
> GC> -build_dir="$prefix"/../wx-ad_hoc/lmi-gcc-$gcc_version
> GC> +build_dir="$prefix"/../wx-ad_hoc/lmi-$LMI_COMPILER-$gcc_version
> 
>  This is just cosmetic, but shouldn't we rename gcc_version to
> compiler_version too, after doing this?

Yes. But then there are probably other instances in other scripts
and makefiles that should be changed as well--and, actually, some
that shouldn't be changed, but that's tricky.

For now, I think we want this odd/fixup change in order to
prevent clang (e.g.) from creating a wx dll with the same
name as a gcc-build version.

>  Also, more serious, but also more difficult to do anything about, issue is
> that few compilers seem likely to have a "-dumpversion" option and even
> though clang does provide it, it returns nonsensical values:
> 
> % for v in 5.0 6.0 7; echo "clang $v identifies as `clang++-$v -dumpversion`"
> clang 5.0 identifies as 4.2.1
> clang 6.0 identifies as 4.2.1
> clang 7 identifies as 4.2.1

All I can say is that I'm glad you told me, because it would have
been really frustrating to stumble over it myself.

> (clang does have a working "--version" option working similarly to g++
> option with the same name).

If it's really similar to 'gcc --version', then it spews out line
after line of stuff we don't want. But we'll cross that bridge
when we come to it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]