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

Buildrump $CC -v test fails for pcc #23

Closed
staalmannen opened this issue Jul 16, 2013 · 6 comments
Closed

Buildrump $CC -v test fails for pcc #23

staalmannen opened this issue Jul 16, 2013 · 6 comments

Comments

@staalmannen
Copy link
Member

The output if CC=pcc is:

ERROR:
Cannot run "pcc -v". Check that "pcc" is a compiler

trying pcc -v gives the following output:

$ pcc -v
pcc 1.0.0.RELEASE 20110221 for x86_64-unknown-linux-gnu, jens@Krypton
no input files

on my machine.

@anttikantee
Copy link
Member

Does "pcc -dumpmachine" output anything sensible?

@staalmannen
Copy link
Member Author

nope... unfortunately not:

$ pcc -dumpmachine
no input files
$ pcc -dumpspecs
no input files

@anttikantee
Copy link
Member

Looks like it just needs to detect that "cc -v" comes from pcc and use an alternative parser to determine the target.

@staalmannen
Copy link
Member Author

with this modification I get further in the build (pcc is nicely faster than both gcc and clang)

https://github.com/staalmannen/buildrump.sh/commit/82da03ed1106b902748011d534b235bf717fb36c

I keep this sepparate in an experimental branch for now. My solutions are most likely sub-optimal...

@anttikantee
Copy link
Member

This might be a simpler expression for parsing the target: sed -n '/^pcc/s/.*for \([^,]*\).*/\1/p'

btw, test(1) can do string comparison, e.g. [ "a" = "b" ] returns false. But you probably want to check if the compiler thinks it's pcc (cc -v), not if the binary name is pcc.

@justincormack
Copy link
Member

I think all these parsing issues are fixed, but there are some issues with pcc still referenced in #66 and alas Jens' fork seems to have disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants