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

Compiler wrapper symlinks naming convenction. #1926

Open
m-Vins opened this issue Dec 6, 2023 · 2 comments
Open

Compiler wrapper symlinks naming convenction. #1926

m-Vins opened this issue Dec 6, 2023 · 2 comments
Labels
discussion Discuss a strategy, feature or goal enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@m-Vins
Copy link

m-Vins commented Dec 6, 2023

In some scenarios, developers could write makefiles that enable the users to compile with the normal compiler or with the wrappers provided by AFL++.
Even though it could be done manually by setting CC & CXX to the right afl-cc symlink before running some make build, in the case we want do it within the makefile, it would have something like:

ifeq ($(ENABLE_AFLPLUSPLUS),1)
    clang_cxx = afl-clang-fast++
    gcc_cxx = afl-gcc++-fast
else
    clang_cxx = clang++
    gcc_cxx = g++
endif
CXX = $($(COMPILER)_cc)

My point here is that, moving the ++ right after the compiler name (thus afl-clang++-fast instead of afl-clang-fast++) It would enable us to write something like:

clang_cxx = clang++
gcc_cxx = g++
CXX = $($(COMPILER)_cxx)
ifeq ($(AMD_ENABLE_AFLPLUSPLUS),1)
    CXX := alf-${CXX}-fast
endif

Of course this is not an issue, but clearly makes the code more clean.
Please let me know if you agree on adding these new symlinks in the installation, if so, I can do a Pull Request.

Thank you :)

@vanhauser-thc
Copy link
Member

I understand the request, and it would make things easier. but same could be said about adding ++ at the end of the compiled, so e.g. afl-gcc-fast++. and that would add even more symlinks.

I am not against this, but on the other hand I also do not want too many symlinks there ...

for your purpose you can simply create the symlinks you need yourself.

I think this needs some more users weighting in on that if they would find that useful to have as a default.

@vanhauser-thc vanhauser-thc added enhancement New feature or request help wanted Extra attention is needed question Further information is requested discussion Discuss a strategy, feature or goal labels Dec 8, 2023
@Romain-Geissler-1A
Copy link
Contributor

Hi,

I suggested @m-Vins to raise this issue, as he is currently trying to integrate the usage of AFL++ inside our own internal toolchain. As a toolchain and build system maintainer which supports both gcc and clang, I find it slightly better to have consistent naming conventions, however on my side it's not a strong requirement either, we can live without.

So I don't know if you want to keep this open, or we close it and we just adapt our own internal logic to cope with the different naming conventions (which isn't a huge problem) ?

Cheers,
Romain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discuss a strategy, feature or goal enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants