Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Honor user set cc, cxx #6414

Closed
DorpsGek opened this issue Jan 23, 2016 · 1 comment · Fixed by #6716
Closed

[PATCH] Honor user set cc, cxx #6414

DorpsGek opened this issue Jan 23, 2016 · 1 comment · Fixed by #6716
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

woutershep2 opened the ticket and wrote:

As it stands --cc-build and --cxx-build is useless when --build is set. Same goes for CC and CXX env variables when --host is given.
Attached is a patch to address this issue, it was made against 1.5.3 but i looked at trunk and saw the same broken logic, so i set the reported version to trunk.

Actual:
./configure --build=x86_64-pc-linux-gnu --cc-build=x86_64-pc-linux-gnu-cc --cxx-build=x86_64-pc-linux-gnu-c++ ...
checking build system type... x86_64-pc-linux-gnu
checking build cc... x86_64-pc-linux-gnu-gcc
checking build c++... x86_64-pc-linux-gnu-g++

Expected:
./configure --build=x86_64-pc-linux-gnu --cc-build=x86_64-pc-linux-gnu-cc --cxx-build=x86_64-pc-linux-gnu-c++ ...
checking build system type... x86_64-pc-linux-gnu
checking build cc... x86_64-pc-linux-gnu-cc
checking build c++... x86_64-pc-linux-gnu-c++

No actual code was added/removed, the checks for the explicitly user-provided $4 and $5 where simply moved before the guessing $3 check.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6414
@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Build system patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Apr 14, 2018
@TrueBrain
Copy link
Member

I only partially agree with your patch. Moving the env higher is not what you would like, as that can lead to unexpected situations. Example:

My env has CC set to gcc, for what-ever reason. I say in ./configure that --build should be something. I do not expect the CC from the env to win.

I do fully agree with you that cc-build should win from build :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants