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
Use autoconf variable for C preprocessor #8180
Conversation
This fixes the build when cross-compiling, where the preprocessor might be prefixed. Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
No need - I added it to the 0.7.13 patchlist. |
|
There is more needed for 0.7, though, because a similar cpp invocation is used to detect the SPL version. This check no longer exists in master since the SPL was merged. |
|
@lopsided98 ok, that's fine then if you want to do an 0.7 PR as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find. Thanks!
|
See #8183 and openzfs/spl#711. |
Codecov Report
@@ Coverage Diff @@
## master #8180 +/- ##
=========================================
- Coverage 78.46% 78.36% -0.1%
=========================================
Files 378 378
Lines 114826 114765 -61
=========================================
- Hits 90095 89933 -162
- Misses 24731 24832 +101
Continue to review full report at Codecov.
|
This fixes the build when cross-compiling, where the preprocessor might be prefixed. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com> Closes openzfs#8180
This fixes the build when cross-compiling, where the preprocessor might be prefixed. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com> Closes openzfs#8180
This fixes the build when cross-compiling, where the preprocessor might be prefixed. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com> Closes #8180
Motivation and Context
ZFS uses a hardcoded name for the C preprocessor when detecting the kernel version, which may not be available when cross-compiling in an environment without a native compiler.
Description
This PR changes the command to use the correct prefixed preprocessor that was found with autoconf.
The trailing dash is needed because autoconf will normally set
CPPtogcc -E, which requires-to read from stdin. This is not necessary, but harmless, ifCPPis set tocpp.I have a similar fix for 0.7; should I open a PR against the
zfs-0.7-releasebranch?How Has This Been Tested?
I built ZFS with this patch, both natively for x86_64 and cross compiled for aarch64.
Types of changes
Checklist:
Signed-off-by.