commit:     507f08372cb0fb882be36712f81111658591722a
Author:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jun  4 04:22:54 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 29 16:28:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=507f0837

scripts/bootstrap-prefix.sh: fix Python build on OpenBSD

Signed-off-by: Anna Vyalkova <cyber+gentoo <AT> sysrq.in>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 1ab204b0e9..629fb6e3b3 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1109,6 +1109,13 @@ bootstrap_python() {
                        -e "/Unexpected output of 'arch' on OSX/d" \
                        configure
                ;;
+       (*-openbsd*)
+               # OpenBSD is not a multilib system
+               sed -i \
+                       -e '0,/#if defined(__ANDROID__)/{s/ANDROID/OpenBSD/}' \
+                       -e '0,/MULTIARCH=/{s/\(MULTIARCH\)=.*/\1=""/}' \
+                       configure
+               ;;
        esac
 
        case ${CHOST} in
@@ -1165,6 +1172,10 @@ bootstrap_python() {
                        LDFLAGS="${LDFLAGS} -Wl,-rpath,${ROOT}/tmp/usr/lib 
${libdir}"
                        LDFLAGS="${LDFLAGS} -Wl,-rpath,${libdir#-L}"
                ;;
+               *-openbsd*)
+                       # LLD
+                       LDFLAGS="${LDFLAGS} -Wl,-rpath,${ROOT}/tmp/usr/lib"
+               ;;
                *-solaris*)
                        # Sun ld
                        LDFLAGS="${LDFLAGS} -R${ROOT}/tmp/usr/lib ${libdir}"

Reply via email to