The config.sub script fails to detect QNX systems. Since the expected
kernel-os result is nto-qnx it should not change the OS name from
"qnx" to "nto-qnx" (I don't know the history for the x86 exception).
Also, "qnx" is missing as an OS in the "basic system" check.

--Elad
From fbfe94838b9e1141d1e093c17131ee9e9e9489c9 Mon Sep 17 00:00:00 2001
From: Elad Lahav <ela...@qnx.com>
Date: Sun, 6 Sep 2020 13:12:22 -0400
Subject: [PATCH] Detect modern QNX systems

---
 config.sub | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/config.sub b/config.sub
index 0753e30..e7b0e35 100755
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2020-08-17'
+timestamp='2020-09-05'
 
 # 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
@@ -1367,13 +1367,7 @@ case $os in
 		os=psos
 		;;
 	qnx*)
-		case $cpu in
-		    x86 | i*86)
-			;;
-		    *)
-			os=nto-$os
-			;;
-		esac
+		os=qnx
 		;;
 	hiux*)
 		os=hiuxwe2
@@ -1722,7 +1716,7 @@ case $os in
 	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
 	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
 	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-	     | nsk* | powerunix* | genode* | zvmoe* )
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* )
 		;;
 	# This one is extra strict with allowed versions
 	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
-- 
2.25.1

Reply via email to