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

"cpp -P" breaks with clang-12 #6

Closed
yurivict opened this issue Aug 21, 2021 · 2 comments
Closed

"cpp -P" breaks with clang-12 #6

yurivict opened this issue Aug 21, 2021 · 2 comments

Comments

@yurivict
Copy link

Due to -Werror we are getting these errors:

cpp: error: cpp: error: argument unused during compilation: '-P' [-Werror,-Wunused-command-line-argument]

Log: http://beefy18.nyi.freebsd.org/data/main-amd64-default/pd83453f82622_sd5c1296234/logs/elpa-2019.05.002_2.log (IPv6 URL)

@marekandreas
Copy link
Owner

Hello,

first note that we do officially not support the compilation of ELPA with clang.
Nevertheless, the "-P" flag is automatically added to the preprocessor by the autoconf macros to set up the CC, FC compiler. This also makes sense since (from man cpp):
"-P Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers."
Since we do not add the "-P" flag but it is set internally by configure, it will take some time to find why this is also happening with the clang compiler, but then clang does supposedly not use this flag.

@marekandreas
Copy link
Owner

Can you please provide the complete configure command line you are using when you encounter this problem?
When I run the configure with CC=clang-12 and CFLAGS="-Werror -Wunused-command-line-argument" the compilation does not abort with the above error

@marekandreas marekandreas closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
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

No branches or pull requests

2 participants