-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 CPP, CC and flags in dep check scripts #8260
Use CPP, CC and flags in dep check scripts #8260
Conversation
Allow build systems without standard cc to successfully run the dependency checking helper scripts from the Makefile. This supports custom compilers specified by the common CC environment variable, preprocessors given as CPP and additional preprocessor flags from CPPFLAGS. Additional flags from CFLAGS and LDFLAGS are considered for compiling/linking. Overall, this facilitates cross-compilation and similar setups. Signed-off-by: Marcel Bargull <[email protected]>
676df0a
to
b1ff6d3
Compare
(Force pushed to include a description in the initial commit message.) |
This comment for the second commit got lost due to the
|
Ah, perfect, you have CI tests for that ^^. I'll remove that commit. |
b1ff6d3
to
06d2d0c
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mbargull, mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
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.
LGTM
/lgtm |
Similar to containers/buildah#2751:
What this PR does / why we need it:
Allow build system without standard
cc
to successfully run the dependency checking helper scripts from the Makefile.This supports custom compilers specified by the common
CC
environment variable, preprocessors given asCPP
and additional preprocessor flags fromCPPFLAGS
.Additionally, additional flags from
CFLAGS
andLDFLAGS
are considered for compiling/linking.Overall, this facilitates cross-compilation and similar setups (e.g., for building Conda packages at https://gitub.com/conda-forge).
How to verify it
Temporarily remove
cc
fromPATH
and pointCC
/CPP
to a different compiler.Install header files, e.g.,
btrfs/ioctl.h
, in a custom location and setCPPFLAGS=-I/custom/location
.Add
-Wl,--as-needed
toLDFLAGS
(which makes library order important (again) while linking) to confirm the order of the inputs-
and-ldevmapper
is correct inlibdm_tag.sh
.