Skip to content

Build doesn't honour CFG_CC/CFG_CXX. #40295

Closed
@vext01

Description

@vext01

Hi,

CC @semarie

I notice that the rust build doesn't pass down the gcc/g++ binary chosen at configure time down to the later stages of the build.

$ CFG_CC=egcc CFG_CXX=eg++ ./configure --prefix=`pwd`/inst --enable-local-rust --local-rust-root=...
...
configure: CFG_CC               := egcc
configure: CFG_CXX              := eg++
...

Which suggests I successfully chose an alternative compiler.

$ egcc --version
egcc (GCC) 4.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ eg++ --version
eg++ (GCC) 4.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gmake
...
CMake Error at cmake/modules/CheckCompilerVersion.cmake:12 (message):         
  Host GCC version must be at least 4.7!

So I think it has incorrectly used gcc instead of egcc:

$ gcc --version
gcc (GCC) 4.2.1 20070719 

A workaround is to make symlinks to egcc and eg++ and put the dir in the path first.

System is OpenBSD. Today's rust master.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions