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 #8260

Merged

Conversation

mbargull
Copy link
Contributor

@mbargull mbargull commented Nov 6, 2020

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 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.

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]>
@mbargull mbargull force-pushed the check-scripts-env-cc branch from 676df0a to b1ff6d3 Compare November 6, 2020 09:47
@mbargull
Copy link
Contributor Author

mbargull commented Nov 6, 2020

(Force pushed to include a description in the initial commit message.)

@mbargull
Copy link
Contributor Author

mbargull commented Nov 6, 2020

This comment for the second commit got lost due to the rebase/push --force:

This changes vendored sources. I assume we don't want that, correct?
I only added it for completeness' sake, but made it a separate commit so it can be easily removed.

@mbargull
Copy link
Contributor Author

mbargull commented Nov 6, 2020

This changes vendored sources. I assume we don't want that, correct?
I only added it for completeness' sake, but made it a separate commit so it can be easily removed.

tree is dirty, please sync the vendor.conf and commit all changes.

Ah, perfect, you have CI tests for that ^^. I'll remove that commit.

@mbargull mbargull force-pushed the check-scripts-env-cc branch from b1ff6d3 to 06d2d0c Compare November 6, 2020 12:34
@mheon
Copy link
Member

mheon commented Nov 6, 2020

/approve

@openshift-ci-robot
Copy link
Collaborator

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 6, 2020
@mheon
Copy link
Member

mheon commented Nov 6, 2020

LGTM
@containers/podman-maintainers PTAL

Copy link
Contributor

@QiWang19 QiWang19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhatdan
Copy link
Member

rhatdan commented Nov 6, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2020
@openshift-merge-robot openshift-merge-robot merged commit 47a1c96 into containers:master Nov 6, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants