Re: [PATCH] Add phantomos targets

2021-02-02 Thread John Ericson

Would you mind adding a test for phantom-kernel too?

On 2/1/21 10:45 PM, connor horman wrote:

Hello,
This patch adds support to config.sub for the PhantomOS target, an 
operating system project which I am developing. In particular this 
adds support for two basic_os names: phantom-kernel (the target for 
building the kernel, and modules for the kernel), and phantom-user 
(which is the default and canonical userspace), as well as 
canonicalizing the name phantom into phantom-user.

It also adds a test to ensure that the target is parsed properly.

Output from make check (note: MAKEFLAGS=-j4 in environment):
cd testsuite && bash config-guess.sh && rm uname
cd testsuite && bash config-sub.sh
PASS: config.sub checks (847 tests)
PASS: config.sub idempotency checks (784 tests)
PASS: config.sub canonicalise each config.guess testcase (134 tests)
PASS: config.guess checks (134 tests)





[PATCH] Add phantomos targets

2021-02-02 Thread connor horman
Hello,
This patch adds support to config.sub for the PhantomOS target, an
operating system project which I am developing. In particular this adds
support for two basic_os names: phantom-kernel (the target for building the
kernel, and modules for the kernel), and phantom-user (which is the default
and canonical userspace), as well as canonicalizing the name phantom into
phantom-user.
It also adds a test to ensure that the target is parsed properly.

Output from make check (note: MAKEFLAGS=-j4 in environment):
cd testsuite && bash config-guess.sh && rm uname
cd testsuite && bash config-sub.sh
PASS: config.sub checks (847 tests)
PASS: config.sub idempotency checks (784 tests)
PASS: config.sub canonicalise each config.guess testcase (134 tests)
PASS: config.guess checks (134 tests)
From 14cd0f90f0b0ebcc4390315f6c373d94b4f69014 Mon Sep 17 00:00:00 2001
From: Connor 
Date: Mon, 1 Feb 2021 22:28:00 -0500
Subject: [PATCH] Add Phantom targets to config.sub

---
 config.sub| 11 +--
 testsuite/config-sub.data |  1 +
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/config.sub b/config.sub
index 63c1f1c..e207d04 100755
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2021 Free Software Foundation, Inc.
 
-timestamp='2021-01-08'
+timestamp='2021-02-01'
 
 # 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
@@ -1313,6 +1313,10 @@ EOF
 		kernel=linux
 		os=$(echo $basic_os | sed -e 's|linux|gnu|')
 		;;
+	phantom*)
+		kernel=phantom
+		os=$(echo $basic_os | sed -e 's|phantom|user|')
+		;;
 	*)
 		kernel=
 		os=$basic_os
@@ -1725,7 +1729,8 @@ case $os in
 	 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
 	 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
 	 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-	 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
+	 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* \
+		 | user* | kernel* )
 		;;
 	# This one is extra strict with allowed versions
 	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1760,6 +1765,8 @@ case $kernel-$os in
 		;;
 	os2-emx)
 		;;
+	phantom-kernel* | phantom-user*)
+		;;
 	*-eabi* | *-gnueabi*)
 		;;
 	-*)
diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data
index 1f72e4e..3cf8a69 100644
--- a/testsuite/config-sub.data
+++ b/testsuite/config-sub.data
@@ -803,6 +803,7 @@ wasm64-wasi	wasm64-unknown-wasi
 we32k		we32k-att-sysv
 x64		x86_64-pc-none
 x64-linux	x86_64-pc-linux-gnu
+x64-phantom	x86_64-pc-phantom-user
 x86		x86-unknown-none
 x86_64-cygwin	x86_64-pc-cygwin
 x86_64-dicos	x86_64-pc-dicos
-- 
2.27.0