Skip to content

crash: Cross-compiling go-sqlite3 to openbsd/arm64 #68616

Open
@dekimsey

Description

@dekimsey

Summary

This build attempts to cross-compile the go-sqlite3's _example/simple Go project from a linux/amd64 host to an openbsd/arm64 target. However, clang appears to crash on the generated generated _cgo-exports.c at Running pass 'Post-RA pseudo instruction expansion pass' on function '@callbackTrampoline'.

It wasn't clear to me if this is a Go issue or an LLVM issue, but I figured I'd start here since the toolchain asked :). Thank you!

Versions:

  • Ubuntu 22.04
  • clang (14.0.0-1ubuntu1.1)
  • OpenBSD 7.2 target sysroot
  • go-sqlite (v1.14.17)
  • Go 1.21.1 (patched to pass -Wl,--no-pie flag correctly)

Build

Environment:

CC=clang-14
CGO_CFLAGS=-O2 -g -v -target aarch64-openbsd --sysroot=/opt/openbsd.arm64
CGO_ENABLED=1
CGO_LDFLAGS=-v -target aarch64-openbsd -fuse-ld=lld --sysroot=/opt/openbsd.arm64
GOOS=openbsd
GOARCH=arm64

Build Log:

go build -a -v .

root@2158d02123a7:/src/src/go-sqlite3/_example/simple# go build -a -v .
internal/unsafeheader
internal/coverage/rtcov
internal/goarch
internal/cpu
internal/godebugs
internal/abi
internal/goexperiment
internal/goos
runtime/internal/math
runtime/internal/sys
internal/race
internal/bytealg
runtime/internal/atomic
sync/atomic
unicode/utf8
unicode
internal/itoa
math/bits
crypto/internal/alias
crypto/subtle
math
crypto/internal/boring/sig
log/internal
runtime
internal/reflectlite
sync
internal/testlog
runtime/cgo
errors
sort
io
internal/oserror
syscall
strconv
bytes
internal/safefilepath
path
hash
strings
reflect
crypto
internal/syscall/unix
time
internal/syscall/execenv
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name _cgo_export.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/tmp/go-build408674212/b061 -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/tmp/go-build408674212/b061 -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x001.o -x c _cgo_export.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cgo.cgo2.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/tmp/go-build408674212/b061 -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/tmp/go-build408674212/b061 -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x002.o -x c cgo.cgo2.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_context.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x003.o -x c gcc_context.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_libinit.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x004.o -x c gcc_libinit.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_openbsd_arm64.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x005.o -x c gcc_openbsd_arm64.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_setenv.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x006.o -x c gcc_setenv.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_stack_unix.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x007.o -x c gcc_stack_unix.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_util.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x008.o -x c gcc_util.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -E -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_arm64.S -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/gcc_arm64-546e6b.s -x assembler-with-cpp gcc_arm64.S
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
 "/usr/lib/llvm-14/bin/clang" -cc1as -triple aarch64-unknown-openbsd -filetype obj -main-file-name gcc_arm64.S -target-cpu generic -target-feature +neon -target-feature +v8a -target-feature +strict-align -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -dwarf-debug-producer "Ubuntu clang version 14.0.0-1ubuntu1.1" -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -debug-info-kind=constructor -dwarf-version=2 -mrelocation-model pic --mrelax-relocations -object-file-name=/tmp/go-build408674212/b061/_x009.o -o $WORK/b061/_x009.o /tmp/gcc_arm64-546e6b.s
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name _cgo_main.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/tmp/go-build408674212/b061 -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/tmp/go-build408674212/b061 -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_cgo_main.o -x c _cgo_main.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
context
internal/poll
io/fs
os
encoding/binary
internal/fmtsort
crypto/cipher
fmt
crypto/internal/boring
crypto/sha512
crypto/sha256
crypto/sha1
net/url
log
database/sql/driver
database/sql
github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name _cgo_export.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/tmp/go-build408674212/b047 -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I ../.. -I $WORK/b047/ -D SQLITE_ENABLE_RTREE -D SQLITE_THREADSAFE=1 -D HAVE_USLEEP=1 -D SQLITE_ENABLE_FTS3 -D SQLITE_ENABLE_FTS3_PARENTHESIS -D SQLITE_TRACE_SIZE_LIMIT=15 -D SQLITE_OMIT_DEPRECATED -D SQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -D SQLITE_ENABLE_UPDATE_DELETE_LIMIT -I /usr/local/include -I ../.. -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wno-deprecated-declarations -std=gnu99 -fdebug-compilation-dir=/tmp/go-build408674212/b047 -ferror-limiencoding/binary
 /usr/local/go.nopie/src/runtime/cgo                                                                                                                                                              [94/1851]
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_s
tack_unix.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -
Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-k
ind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/
cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-
dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x007.o -x c
gcc_stack_unix.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu                                                                                                                        #include "..." search starts here:                                                                                                                                                                         #include <...> search starts here:                                                                                                                                                                          /usr/local/go.nopie/src/runtime/cgo                                                                                                                                                                        $WORK/b061                                                                                                                                                                                                 /usr/lib/llvm-14/lib/clang/14.0.0/include                                                                                                                                                                  /opt/openbsd.arm64/usr/include                                                                                                                                                                            End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_u
til.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunali
gned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=co
nstructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I
 $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/u
sr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_x008.o -x c gcc_ut
il.c                                                                                                                                                                                                       clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu                                                                                                                        #include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
# runtime/cgo
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -E -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gcc_arm64.S -mrelocation-model pi
c -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature
 +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation
-dir=/usr/local/go.nopie/src/runtime/cgo -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm
-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -ferror-limit 19 -pthread -fno-signed-c
har -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/gcc_arm64-546e6b.s -x assembler-with-cpp gcc_arm64.S
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu                                                                                                                        #include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
 "/usr/lib/llvm-14/bin/clang" -cc1as -triple aarch64-unknown-openbsd -filetype obj -main-file-name gcc_arm64.S -target-cpu generic -target-feature +neon -target-feature +v8a -target-feature +strict-align
 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/b061/ -fdebug-compilation-dir=/usr/local/go.nopie/src/runtime/cgo -dwarf-debug-producer "Ubuntu clang version 14.0.0-1ubuntu1.1" -I /usr/local/go.nopie/sr
c/runtime/cgo -I $WORK/b061/ -debug-info-kind=constructor -dwarf-version=2 -mrelocation-model pic --mrelax-relocations -object-file-name=/tmp/go-build408674212/b061/_x009.o -o $WORK/b061/_x009.o /tmp/gcc
_arm64-546e6b.s
# runtime/cgo                                                                                                                                                                                              Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name _cgo_
main.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunal
igned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=c
onstructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/tmp/go-build408674212/b061 -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I /usr/local/go.nopie/src/runtime/cgo -I $WORK/
b061/ -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wall -Werror -fdebug-compilation-dir=/tmp/go-b
uild408674212/b061 -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b061/_cgo_main.o -x c _cgo_main.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/go.nopie/src/runtime/cgo
 $WORK/b061
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
context
internal/poll
io/fs
os
encoding/binary
internal/fmtsort
crypto/cipher
fmt
crypto/internal/boring
crypto/sha512
crypto/sha256
crypto/sha1
net/url
log
database/sql/driver
database/sql
github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/lib/llvm-14/bin/clang" -cc1 -triple aarch64-unknown-openbsd -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name _cgo_export.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -Wunaligned-access -target-feature +neon -target-feature +v8a -target-feature +strict-align -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=2 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/tmp/go-build408674212/b047 -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -I ../.. -I $WORK/b047/ -D SQLITE_ENABLE_RTREE -D SQLITE_THREADSAFE=1 -D HAVE_USLEEP=1 -D SQLITE_ENABLE_FTS3 -D SQLITE_ENABLE_FTS3_PARENTHESIS -D SQLITE_TRACE_SIZE_LIMIT=15 -D SQLITE_OMIT_DEPRECATED -D SQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -D SQLITE_ENABLE_UPDATE_DELETE_LIMIT -I /usr/local/include -I ../.. -isysroot /opt/openbsd.arm64 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.0/include -internal-externc-isystem /opt/openbsd.arm64/usr/include -O2 -Wno-deprecated-declarations -std=gnu99 -fdebug-compilation-dir=/tmp/go-build408674212/b047 -ferror-limit 19 -pthread -stack-protector 2 -fno-signed-char -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b047/_x001.o -x c _cgo_export.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-pc-linux-gnu
ignoring duplicate directory "/src/src/go-sqlite3"
#include "..." search starts here:
#include <...> search starts here:
 ../..
 $WORK/b047
 /usr/local/include
 /usr/lib/llvm-14/lib/clang/14.0.0/include
 /opt/openbsd.arm64/usr/include
End of search list.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/bin/clang-14 -I ../.. -fPIC -pthread -fmessage-length=0 -I $WORK/b047/ -O2 -g -v -target aarch64-openbsd --sysroot=/opt/openbsd.arm64 -std=gnu99 -DSQLITE_ENABLE_RTREE -DSQLITE_THREADSAFE=1 -DHAVE_USLEEP=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_TRACE_SIZE_LIMIT=15 -DSQLITE_OMIT_DEPRECATED -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT -Wno-deprecated-declarations -I/usr/local/include -I/src/src/go-sql
ite3 -o $WORK/b047/_x001.o -c _cgo_export.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '_cgo_export.c'.
4.      Running pass 'Post-RA pseudo instruction expansion pass' on function '@callbackTrampoline'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x31)[0x7fc8ccd24d01]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x7fc8ccd22a3e]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0xfb)[0x7fc8ccd240ab]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(+0xd6bdff)[0x7fc8ccc50dff]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fc8cb9cc520]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(+0x29d2880)[0x7fc8ce8b7880]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(+0x10b81bb)[0x7fc8ccf9d1bb]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x12e)[0x7fc8cd0ab28e]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x3a0)[0x7fc8cce5f390]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x7fc8cce66983]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x946)[0x7fc8cce5ff36]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsEN4llvm9StringRefEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISK_EE+0xbc1)[0x7fc8d400e201]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(+0x1b7c855)[0x7fc8d4333855]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang8ParseASTERNS_4SemaEbb+0x244)[0x7fc8d31bb824]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang13CodeGenAction13ExecuteActionEv+0xb1)[0x7fc8d432fb71]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang14FrontendAction7ExecuteEv+0x67)[0x7fc8d4ccbb57]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x336)[0x7fc8d4c233a6]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x29b)[0x7fc8d4d4545b]
/usr/bin/clang-14(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x99b)[0x41328b]
/usr/bin/clang-14[0x4114bc]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(+0x20eaed2)[0x7fc8d48a1ed2]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0xdd)[0x7fc8ccc50b6d]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEEEEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x140)[0x7fc8d48a19c0]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3_+0x3f3)[0x7fc8d486c183]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x8a)[0x7fc8d486c40a]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x1a7)[0x7fc8d4886507]
/usr/bin/clang-14(main+0x2816)[0x410f26]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7fc8cb9b3d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7fc8cb9b3e40]
/usr/bin/clang-14(_start+0x25)[0x40e3b5]
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-openbsd
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/_cgo_export-fa0dd7.c
clang: note: diagnostic msg: /tmp/_cgo_export-fa0dd7.sh
clang: note: diagnostic msg:

********************

Reproduction Steps:

These instructions are written using the below Dockerfile to make reproduction easier. Please let me know if more information is needed.

$ podman build -f ~/Dockerfile --tag crash
$ podman run --rm -it crash
# pushd go-sqlite3-1.14.17/_example/simple/
# go build -a -v .
Dockerfile

FROM ubuntu:22.04 as base
RUN apt-get update \
        && apt-get install -y curl
WORKDIR /src

FROM base as go-patch

ARG GO_VERSION=1.21.1
RUN curl -LO https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \
    && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \
    && rm -vf go${GO_VERSION}.linux-amd64.tar.gz \
    && mkdir -p /src

RUN apt-get install -y git gcc &&\
    git clone --single-branch --depth=1 --branch test-nopie-support-in-clang https://github.com/dekimsey/go.git /usr/local/go.nopie &&\
    cd /usr/local/go.nopie/src >/dev/null &&\
    PATH="$PATH:/usr/local/go/bin" ./make.bash

FROM base
ARG OPENBSD_RELEASE=7.2
ARG OPENBSD_RELEASE_SUFFIX=72

COPY --from=go-patch /usr/local/go.nopie /usr/local/go.nopie
ENV PATH="${PATH}:/usr/local/go.nopie/bin"

RUN apt-get install -y clang-14 lld-14

ENV openbsd_root_arm64=/opt/openbsd.arm64
RUN mkdir -p $openbsd_root_arm64 &&\
    curl -sSfLO https://cdn.openbsd.org/pub/OpenBSD/${OPENBSD_RELEASE}/arm64/base${OPENBSD_RELEASE_SUFFIX}.tgz &&\
    curl -sSfLO https://cdn.openbsd.org/pub/OpenBSD/${OPENBSD_RELEASE}/arm64/comp${OPENBSD_RELEASE_SUFFIX}.tgz &&\
    for f in *.tgz ; do echo "### $f ###" > $openbsd_root_arm64/$f.index; tar -tvf $f > $openbsd_root_arm64/$f.index ; done &&\
    tar -C ${openbsd_root_arm64} -xvf base${OPENBSD_RELEASE_SUFFIX}.tgz ./usr/lib ./usr/include &&\
    tar -C ${openbsd_root_arm64} -xvf comp${OPENBSD_RELEASE_SUFFIX}.tgz ./usr/lib ./usr/include &&\
    rm -vf *.tgz

WORKDIR /src

RUN curl -sSfLO https://github.com/mattn/go-sqlite3/archive/refs/tags/v1.14.17.tar.gz &&\
    tar -xf v1.14.17.tar.gz

ENV GOOS=openbsd \
    GOARCH=goarm \
    CGO_ENABLED=1 \
    CC=clang-14 \
    CGO_CFLAGS="-O2 -g -v -target aarch64-openbsd --sysroot=$openbsd_root_arm64" \
    CGO_LDFLAGS="-v -target aarch64-openbsd -fuse-ld=lld --sysroot=$openbsd_root_arm64"

Diagnostics:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions