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

Use CPP, CC and flags in dep check scripts #2751

Merged

Conversation

mbargull
Copy link
Contributor

@mbargull mbargull commented Nov 6, 2020

What type of PR is this?

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

/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 as CPP and additional preprocessor flags from CPPFLAGS.
Additionally, additional flags from CFLAGS and LDFLAGS 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 from PATH and point CC/CPP to a different compiler.
Install header files, e.g., btrfs/ioctl.h, in a custom location and set CPPFLAGS=-I/custom/location.
Add -Wl,--as-needed to LDFLAGS (which makes library order important (again) while linking) to confirm the order of the inputs - and -ldevmapper is correct in libdm_tag.sh.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@rhatdan
Copy link
Member

rhatdan commented Nov 6, 2020

Thanks @mbargull
/approve
LGTM
@containers/podman-maintainers PTAL

@TomSweeneyRedHat
Copy link
Member

Changes LGTM, but this needs a rebase.

@rhatdan
Copy link
Member

rhatdan commented Nov 6, 2020

/approve
/lgtm

@openshift-ci-robot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mbargull
Copy link
Contributor Author

mbargull commented Nov 6, 2020

Changes LGTM, but this needs a rebase.

Done.

@TomSweeneyRedHat
Copy link
Member

LGTM

@rhatdan
Copy link
Member

rhatdan commented Nov 6, 2020

/lgtm
/hold

@rhatdan
Copy link
Member

rhatdan commented Nov 6, 2020

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit c7ed3ca into containers:master Nov 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants