[GCC-11,committed] libphobos: Add power*-*-freebsd* as supported target

Message ID 20211221162034.3470498-1-ibuclaw@gdcproject.org
State Committed
Headers
Series [GCC-11,committed] libphobos: Add power*-*-freebsd* as supported target |

Commit Message

Iain Buclaw Dec. 21, 2021, 4:20 p.m. UTC
  This patch backports the change in mainline that adds power*-*-freebsd*
as supported targets for libphobos, which soft depends on another change
in mainline that adds FreeBSD_13 support for the bindings.

Regression tested on powerpc64-portbld-freebsd13.0, and committed to the
releases/gcc-11 branch.

Regards,
Iain.

libphobos/ChangeLog:

	* configure.tgt: Add power*-*-freebsd* as a supported target.
	* libdruntime/core/sys/freebsd/config.d: Define
	  __FreeBSD_version for FreeBSD_13 targets.

(cherry picked from commit 0c3fc06c300f5b71f299812c7fcac82b0236e5ac)
---
 libphobos/configure.tgt                         | 3 +++
 libphobos/libdruntime/core/sys/freebsd/config.d | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
  

Patch

diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
index 88c027d0c28..0643daeb613 100644
--- a/libphobos/configure.tgt
+++ b/libphobos/configure.tgt
@@ -39,6 +39,9 @@  case "${target}" in
   mips*-*-linux*)
 	LIBPHOBOS_SUPPORTED=yes
 	;;
+  power*-*-freebsd*)
+	LIBPHOBOS_SUPPORTED=yes
+	;;
   power*-*-linux*)
 	LIBPHOBOS_SUPPORTED=yes
 	LIBDRUNTIME_ONLY=yes
diff --git a/libphobos/libdruntime/core/sys/freebsd/config.d b/libphobos/libdruntime/core/sys/freebsd/config.d
index 4eda066b293..ead941c0e67 100644
--- a/libphobos/libdruntime/core/sys/freebsd/config.d
+++ b/libphobos/libdruntime/core/sys/freebsd/config.d
@@ -13,7 +13,8 @@  public import core.sys.posix.config;
 // __FreeBSD_version numbers are documented in the Porter's Handbook.
 // NOTE: When adding newer versions of FreeBSD, verify all current versioned
 // bindings are still compatible with the release.
-     version (FreeBSD_12) enum __FreeBSD_version = 1202000;
+     version (FreeBSD_13) enum __FreeBSD_version = 1300000;
+else version (FreeBSD_12) enum __FreeBSD_version = 1202000;
 else version (FreeBSD_11) enum __FreeBSD_version = 1104000;
 else version (FreeBSD_10) enum __FreeBSD_version = 1004000;
 else version (FreeBSD_9)  enum __FreeBSD_version = 903000;