public inbox for gentoo-alt@lists.gentoo.org
 help / color / mirror / Atom feed
From: Anna Vyalkova <cyber+gentoo@sysrq.in>
To: gentoo-alt@lists.gentoo.org
Subject: [gentoo-alt] [PATCH 5/7] scripts/bootstrap-prefix.sh: fix bash build on OpenBSD
Date: Sat,  4 Jun 2022 09:33:16 +0500	[thread overview]
Message-ID: <20220604043318.21900-6-cyber+gentoo@sysrq.in> (raw)
In-Reply-To: <20220604043318.21900-1-cyber+gentoo@sysrq.in>

Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
 scripts/bootstrap-prefix.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index d0f740be87..c9886b6a43 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -952,9 +952,10 @@ bootstrap_gnu() {
 	# ensure we don't read system-wide shell initialisation, it may
 	# contain cruft, bug #650284
 	[[ ${PN} == "bash" ]] && \
-		export CPPFLAGS="${CPPFLAGS} \
-			-DSYS_BASHRC=\'\"${ROOT}/etc/bash/bashrc\"\' \
-			-DSYS_BASH_LOGOUT=\'\"${ROOT}/etc/bash/bash_logout\"\'"
+		export CPPFLAGS="${CPPFLAGS} -DSYS_BASH_LOGOUT=\'\"${ROOT}/etc/bash/bash_logout\"\'"
+	# -DSYS_BASHRC causes bash to segfault on OpenBSD
+	[[ ${PN} == "bash" && ${CHOST} != *-openbsd* ]] && \
+		export CPPFLAGS="${CPPFLAGS} -DSYS_BASHRC=\'\"${ROOT}/etc/bash/bashrc\"\'"
 
 	# Don't do ACL stuff on Darwin, especially Darwin9 will make
 	# coreutils completely useless (install failing on everything)
-- 
2.35.1



  parent reply	other threads:[~2022-06-04  4:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-04  4:33 [gentoo-alt] [PATCH 0/7] scripts/bootstrap-prefix.sh: initial OpenBSD support Anna Vyalkova
2022-06-04  4:33 ` [gentoo-alt] [PATCH 1/7] scripts/bootstrap-prefix.sh: add OpenBSD CHOST detection Anna Vyalkova
2022-06-04  4:33 ` [gentoo-alt] [PATCH 2/7] scripts/bootstrap-prefix.sh: add OpenBSD toolchain Anna Vyalkova
2022-06-04  4:33 ` [gentoo-alt] [PATCH 3/7] scripts/bootstrap-prefix.sh: enable ncpu detection for OpenBSD Anna Vyalkova
2022-06-04  4:33 ` [gentoo-alt] [PATCH 4/7] scripts/bootstrap-prefix.sh: use BSD stat syntax " Anna Vyalkova
2022-06-04  4:33 ` Anna Vyalkova [this message]
2022-06-04  4:33 ` [gentoo-alt] [PATCH 6/7] scripts/bootstrap-prefix.sh: fix Python build on OpenBSD Anna Vyalkova
2022-06-04  4:33 ` [gentoo-alt] [PATCH 7/7] scripts/bootstrap-prefix.sh: use cp from GNU coreutils Anna Vyalkova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220604043318.21900-6-cyber+gentoo@sysrq.in \
    --to=cyber+gentoo@sysrq.in \
    --cc=gentoo-alt@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox