Add configuration support for macppc and aarch64 on OpenBSD

Add support for BTCFI

Index: configure
--- configure.orig
+++ configure
@@ -43,6 +43,7 @@ Supported targets:
   ppc-eabi             (PowerPC, EABI with GNU/Unix tools)
   ppc-eabi-diab        (PowerPC, EABI with Diab tools)
   ppc-linux            (PowerPC, Linux)
+  ppc-bsd              (PowerPC, BSD)
   arm-eabi             (ARM, EABI, little endian)
   arm-eabihf           (ARM, EABI using hardware FP registers, little endian)
   arm-linux            (ARM, EABI using hardware FP registers, little endian)
@@ -58,6 +59,7 @@ Supported targets:
   rv32-linux           (RISC-V 32 bits, Linux)
   rv64-linux           (RISC-V 64 bits, Linux)
   aarch64-linux        (AArch64, i.e. ARMv8 in 64-bit mode, Linux)
+  aarch64-bsd          (AArch64, i.e. ARMv8 in 64-bit mode, BSD)
   aarch64-macos        (AArch64, i.e. Apple silicon, MacOS)
   manual               (edit configuration file by hand)
 
@@ -66,7 +68,7 @@ For x86 targets, the "x86_64-" prefix can also be writ
 For AArch64 targets, the "aarch64-" prefix can also be written "arm64-".
 For RISC-V targets, the "rv32-" or "rv64-" prefix can also be written "riscv32-" or "riscv64-".
 
-For PowerPC targets, the "ppc-" prefix can be refined into:
+For PowerPC targets, the "ppc-" prefix can also be written "powerpc-" and can be refined into:
   ppc64-               PowerPC 64 bits
   e5500-               Freescale e5500 core (PowerPC 64 bit, EREF extensions)
 
@@ -264,7 +266,7 @@ fi
 if test "$arch" = "powerpc"; then
 
   case "$target" in
-    eabi|eabi-diab|linux)
+    eabi|eabi-diab|linux|bsd)
         ;;
     *)
         echo "Error: invalid eabi/system '$target' for architecture PowerPC." 1>&2
@@ -296,6 +298,11 @@ if test "$arch" = "powerpc"; then
         system="diab"
         responsefile="diab"
         ;;
+    bsd)
+        casmruntime="${toolprefix}cc -c -Wa,-mregnames"
+        cprepro_options="-std=c99 -U__GNUC__ -E"
+        system="bsd"
+        ;;
     *)
         casmruntime="${toolprefix}gcc -c -Wa,-mregnames"
         cprepro_options="-U__GNUC__ -E"
@@ -351,7 +358,7 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
         casm="${toolprefix}cc"
         casm_options="-m64 -c"
         clinker="${toolprefix}cc"
-        clinker_options="-m64"
+        clinker_options="-m64 -z nobtcfi"
         cprepro="${toolprefix}cc"
         cprepro_options="-m64 -U__GNUC__ -U__SIZEOF_INT128__ -E"
         system="bsd"
@@ -416,6 +423,11 @@ if test "$arch" = "aarch64"; then
         abi="standard"
         cprepro_options="-U__GNUC__ -E"
         system="linux";;
+    bsd)
+        abi="standard"
+        cprepro_options="-std=c99 -U__GNUC__ -E"
+        system="bsd"
+        ;;
     macos|macosx)
         abi="apple"
         casm="${toolprefix}cc"
@@ -477,6 +489,7 @@ testfun:
   .file 1 "testfun.c"
   .loc 1 1
   .cfi_startproc
+    endbr64
   .cfi_adjust_cfa_offset 16
   .cfi_endproc
 EOF
