Skip to content

configure: add --with-bash option for cross-compilation#40

Open
skirmess wants to merge 1 commit intocorosync:mainfrom
skirmess:add-with-bash-option
Open

configure: add --with-bash option for cross-compilation#40
skirmess wants to merge 1 commit intocorosync:mainfrom
skirmess:add-with-bash-option

Conversation

@skirmess
Copy link
Copy Markdown

@skirmess skirmess commented May 8, 2026

Problem

AC_PATH_PROG([BASHPATH], [bash]) finds bash on the build host and
substitutes that path into shell scripts via @BASHPATH@. When
cross-compiling, the build host path (e.g. /usr/bin/bash on
Fedora) differs from the target system path (e.g. /bin/bash on
OpenWrt, /usr/local/bin/bash on FreeBSD), resulting in scripts
with a broken shebang on the target.

Solution

Add a --with-bash=PATH configure option that allows explicitly
specifying the bash path on the target system. When not specified,
the existing AC_PATH_PROG auto-detection behaviour is unchanged,
so this is a fully backwards-compatible change.

Cross-compilation packagers can then set the correct target path:

./configure --with-bash=/bin/bash

Testing

# explicit path
./configure --with-bash=/bin/bash   # BASHPATH='/bin/bash'

# auto-detect (unchanged behaviour)
./configure                          # checking for bash... /usr/bin/bash

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>
@knet-jenkins
Copy link
Copy Markdown

knet-jenkins Bot commented May 8, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant