Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Setting CC variable results in weird option names #1797
commit 9e71ec and commit e6081d introduced the usage of the CC variable to get the compiler, which is a good idea, however the way it's currently implemented I get some odd behavior.
After the aforementioned commits, I get an error that this option is unknown.
The attached patch fixes this by reordering the entries at the downside that (as far as I understood) it probes for gcc first and then tries $CC, so if you have gcc but $CC points somewhere else you would have to set it manually using --gcc=$CC, which should be ok.
On another note, the problem mentioned above also leads to another issue, actually failing the configure, if you set both --cross and --gcc (or whatever option $CC creates). Note that x86_64-pc-linux-gnu is a valid cross host:
Same if you set CC to only the program name and not an absolute path. If you unset $CC, then it works properly.