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

Uses $Config{cpp} instead of $Config{cpprun} #11

Closed
kentfredric opened this issue Jul 7, 2020 · 2 comments
Closed

Uses $Config{cpp} instead of $Config{cpprun} #11

kentfredric opened this issue Jul 7, 2020 · 2 comments

Comments

@kentfredric
Copy link

This is just a follow up after hitting this issue on Devel-NYTProf

Perl/perl5#17948
timbunce/devel-nytprof#139

When Perl is configured with -Dcpp=$GCC -E, the resulting $Config{cpp} is just $GCC, which is very much probably not what you want.

You probably want $Config{cpprun} which contains the arguments required for $GCC to function as a C PreProcessor.

my @lines = `$Config{cpp} -v $filename 2>&1`;

@plicease
Copy link
Member

plicease commented Jul 7, 2020

$Config{cpprun} does seem to be more correct with clang as well:

✅ starscream% perl -V:cpp
cpp='cpp';
✅ starscream% perl -V:cpprun
cpprun='clang  -E';

(/usr/bin/cpp being the Gnu C preprocessor on my Debian system)

@plicease
Copy link
Member

plicease commented Jul 7, 2020

Thanks for the suggestion. Updated and released as 0.30.

@plicease plicease closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants