From 6c5532f3452456b6288b390d7fd1d3c56731fc7f Mon Sep 17 00:00:00 2001
From: Purple Rain <purplerain@secbsd.org>
Date: Fri, 16 Apr 2021 22:26:32 +0000
Subject: [PATCH] config.guess: add SecBSD support

* config.guess (*:SecBSD:*:*): Recognize.
* doc/config.guess.1: Regenerate.
* testsuite/config-guess.data: Add a test case.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 config.guess                | 6 +++++-
 doc/config.guess.1          | 2 +-
 testsuite/config-guess.data | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/config.guess b/config.guess
index 1972fda..15b97ce 100755
--- a/config.guess
+++ b/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2021 Free Software Foundation, Inc.
 
-timestamp='2021-01-25'
+timestamp='2021-04-16'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -261,6 +261,10 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')
 	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
 	exit ;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=$(arch | sed 's/SecBSD.//')
+	echo "$UNAME_MACHINE_ARCH"-unknown-secbsd"$UNAME_RELEASE"
+	exit ;;
     *:LibertyBSD:*:*)
 	UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')
 	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
diff --git a/doc/config.guess.1 b/doc/config.guess.1
index 75fbb23..4a28bd3 100644
--- a/doc/config.guess.1
+++ b/doc/config.guess.1
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.16.
-.TH CONFIG.GUESS "1" "January 2021" "GNU config.guess (2021-01-25)" "User Commands"
+.TH CONFIG.GUESS "1" "April 2021" "GNU config.guess (2021-04-16)" "User Commands"
 .SH NAME
 config.guess \- guess the build system triplet
 .SH SYNOPSIS
diff --git a/testsuite/config-guess.data b/testsuite/config-guess.data
index f240e9c..b5282af 100644
--- a/testsuite/config-guess.data
+++ b/testsuite/config-guess.data
@@ -26,6 +26,7 @@ SX-8R | 1.0 | SUPER-UX | ignored | ignored | sx8r-nec-superux1.0
 SX-ACE | 1.0 | SUPER-UX | ignored | ignored | sxace-nec-superux1.0
 aarch64 | ignored | Linux | ignored | ignored | aarch64-unknown-linux-gnu
 aarch64_be | ignored | Linux | ignored | ignored | aarch64_be-unknown-linux-gnu
+amd64 | 1.0 | SecBSD | ignored | x86_64 | x86_64-unknown-secbsd1.0
 amd64 | 1.5.12(0.116/4/2) | CYGWIN_NT-5.2 | ignored | ignored | x86_64-pc-cygwin
 amd64 | 6.1.4 | NetBSD | ignored | x86_64 | x86_64-unknown-netbsd6.1
 amd64 | 6.1.5_PATCH | NetBSD | ignored | x86_64 | x86_64-unknown-netbsd6.1