Skip to content

Conversation

@fanquake
Copy link
Contributor

@fanquake fanquake commented Jun 5, 2023

Currently, if I build like with Clang, I'll get:

make LLVM_CONFIG=llvm-config-15 CC=clang-15 CXX=clang++-15
<snip>
[+] Everything seems to be working, ready to compile. (gcc version 12.1.0 (Ubuntu 12.1.0-2ubuntu1~22.04) )
clang-15 -O2 -D_FORTIFY_SOURCE=1 ....

Which is somewhat confusing. Fix this, and in a way that still outputs the correct version info for Clang and GCC.
Use --version, and pick the first line, as that is where they are consistent in output.
clang -v gives the version first, whereas gcc -v gives the version on the last line.

We switch to using $(CC), otherwise we also get incorrect output, and drop CCVER altogether, given this is it's only use.

Currently, if I build like with Clang, I'll get:
```bash
make LLVM_CONFIG=llvm-config-15 CC=clang-15 CXX=clang++-15
<snip>
[+] Everything seems to be working, ready to compile. (gcc version 12.1.0 (Ubuntu 12.1.0-2ubuntu1~22.04) )
clang-15 -O2 -D_FORTIFY_SOURCE=1 ....
```

Which is somewhat confusing. Fix this, and in a way that still outputs
the correct version info for Clang and GCC. Use `--version`, and pick
the first line, as that is where they are consistent in output. `clang
-v` gives the version first, whereas `gcc -v` gives the version on the
last line.

We switch to using $(CC), otherwise we also get incorrect output,
and dropping CCVER altogether, given this is it's only use.
@vanhauser-thc
Copy link
Member

ah yes that was a relict from a bug I was hunting. this change is useful though, thanks.

@vanhauser-thc vanhauser-thc merged commit 281f6c1 into AFLplusplus:dev Jun 6, 2023
@fanquake fanquake deleted the ready_to_build_use_CC branch June 6, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants