-
Notifications
You must be signed in to change notification settings - Fork 788
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 #2751
Use CPP, CC and flags in dep check scripts #2751
Conversation
Thanks @mbargull |
Changes LGTM, but this needs a rebase. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mbargull, rhatdan 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 |
Signed-off-by: Marcel Bargull <[email protected]>
a2c06b6
to
c219669
Compare
Done. |
LGTM |
/lgtm |
/hold cancel |
What type of PR is this?
/kind other
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
.Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?