configure: add --with-bash option for cross-compilation#40
Open
skirmess wants to merge 1 commit intocorosync:mainfrom
Open
configure: add --with-bash option for cross-compilation#40skirmess wants to merge 1 commit intocorosync:mainfrom
skirmess wants to merge 1 commit intocorosync:mainfrom
Conversation
AC_PATH_PROG finds bash on the build host, which differs from the target system path in cross-compilation environments. Add --with-bash=PATH to allow explicitly specifying the bash path on the target system. When not specified, the existing auto-detection behaviour is unchanged. Signed-off-by: Sven Kirmess <sven.kirmess@kzone.ch>
|
Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/corosync-qdevice/job/corosync-qdevice-pipeline/job/PR-40/1/input |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
AC_PATH_PROG([BASHPATH], [bash])finds bash on the build host andsubstitutes that path into shell scripts via
@BASHPATH@. Whencross-compiling, the build host path (e.g.
/usr/bin/bashonFedora) differs from the target system path (e.g.
/bin/bashonOpenWrt,
/usr/local/bin/bashon FreeBSD), resulting in scriptswith a broken shebang on the target.
Solution
Add a
--with-bash=PATHconfigure option that allows explicitlyspecifying the bash path on the target system. When not specified,
the existing
AC_PATH_PROGauto-detection behaviour is unchanged,so this is a fully backwards-compatible change.
Cross-compilation packagers can then set the correct target path:
Testing