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
Add missing CFLAGS, CPPFLAGS and LDFLAGS for some examples/tests #462
Conversation
This patch ensures that CFLAGS, CPPFLAGS and LDFLAGS settings are respected when compiling/linking (lib)sotest, pivot_root and userns.
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.
Thanks Peter!
I'd also be open to a PR adding blhc
to the test suite. Do you think that's a good idea?
@@ -10,4 +10,4 @@ clean: | |||
$(BINS): Makefile | |||
|
|||
%: %.c | |||
gcc $(CFLAGS) $< -o $@ | |||
gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ |
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.
These are C programs, so do we really want $CPPFLAGS
?
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.
Since the C compiler uses the C preprocessor, I think that it makes sense to also include C preprocessor flags.
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.
Oops, I'm sorry. I thought CPPFLAGS
was for C++.
So far I have no experience with using
So in summary, I feel uncertain how easy or difficult it is to integrate it in the Charliecloud test suite. |
OK. This part of the code doesn't change too much, and it sounds like you would catch it eventually in the Debian package, so that seems like a low priority to add it upstream? |
This patch ensures that CFLAGS, CPPFLAGS and LDFLAGS settings are
respected when compiling/linking (lib)sotest, pivot_root and userns.
I was kindly made aware of this issue by the blhc tool.