ports/lang/compcert/patches/patch-configure

72 lines
2.5 KiB
Text

Add configuration support for macppc and aarch64 on OpenBSD
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-linux (ARM, EABI, little endian)
arm-eabihf (ARM, EABI using hardware FP registers, little endian)
@@ -60,6 +61,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)
@@ -68,7 +70,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)
@@ -233,7 +235,7 @@ clinker_options=""
clinker_needs_no_pie=true
cprepro="${toolprefix}gcc"
cprepro_options="-E"
-archiver="${toolprefix}ar rcs"
+archiver="ar rcs"
libmath="-lm"
responsefile="gnu"
@@ -266,7 +268,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
@@ -298,6 +300,11 @@ if test "$arch" = "powerpc"; then
system="diab"
responsefile="diab"
;;
+ bsd)
+ casmruntime="${toolprefix}gcc -c -Wa,-mregnames"
+ cprepro_options="-std=c99 -U__GNUC__ -E"
+ system="bsd"
+ ;;
*)
casmruntime="${toolprefix}gcc -c -Wa,-mregnames"
cprepro_options="-U__GNUC__ -E"
@@ -410,6 +417,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"