Hi, This patch recognizes Sortix in config.sub and config.guess.
I'll be releasing Sortix 1.0 this December. I've been patching these files manually in the ports tree and have about fifty patched files. I noticed an unfortunate trend where projects takes years to upgrade the files, so it's probably best to upstream my changes now. Sortix isn't using the vendor field because there is nothing to set it to and config.sub sets it to a default when software needs it. Since triplets occasionally end up in installed files, I would prefer for the default build triplet found by config.guess to match what I usually set --build to. For that reason, I made config.guess leave out the vendor field for Sortix. I couldn't find an example of config.guess leaving out the vendor field, so perhaps the interface requires it to return a fully specified triplet? But I notice configure scripts run config.sub on the config.guess result, so that isn't a problem. Perhaps there are other users of config.guess? Feel free to change it to a default -unknown- if this is a problem. I decided not to append ${UNAME_RELEASE} in config.guess because I don't need it and it is extra cruft at the end. uname -r might contain a dash at point in the future. This isn't done for Linux either, so this is fine. Jonas --- * config.sub (-sortix*): New. * config.guess (*:Sortix:*:*): New. --- ChangeLog | 5 +++++ config.guess | 5 ++++- config.sub | 4 ++-- testsuite/config-guess.data | 2 ++ testsuite/config-sub.data | 2 ++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87f7c89..778097c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-08-19 Jonas 'Sortie' Termansen <sor...@maxsi.org> + + * config.sub (-sortix*): New. + * config.guess (*:Sortix:*:*): New. + 2015-08-18 Ben Elliston <b...@gnu.org> * testsuite/config-sub.data: Sort. diff --git a/config.guess b/config.guess index fddac42..d665409 100755 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2015-07-03' +timestamp='2015-08-19' # 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 @@ -249,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) diff --git a/config.sub b/config.sub index ccc03ef..43b931f 100755 --- a/config.sub +++ b/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2015-08-18' +timestamp='2015-08-19' # 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 @@ -1379,7 +1379,7 @@ case $os in | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ diff --git a/testsuite/config-guess.data b/testsuite/config-guess.data index 8bb2222..32c38c6 100644 --- a/testsuite/config-guess.data +++ b/testsuite/config-guess.data @@ -80,3 +80,5 @@ x86_64 2.0.0(0.271/5/3) MSYS_NT-6.1 ignored ignored x86_64-pc-msys x86_64 2.6.32 Linux ignored ignored x86_64-pc-linux-gnu x86_64 2.6.32 VMkernel ignored ignored x86_64-unknown-esx xtensa 2.6.15 Linux ignored ignored xtensa-unknown-linux-gnu +i386 1.0 Sortix ignored ignored i386-sortix +x86_64 1.0 Sortix ignored ignored x86_64-sortix diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data index d7a49f2..5fff2c6 100644 --- a/testsuite/config-sub.data +++ b/testsuite/config-sub.data @@ -102,6 +102,7 @@ i386-pc-sco5v6 i386-pc-sco5v6 i386-pc-sco6 i386-pc-sco5v6 i386-plan9 i386-pc-plan9 i386-solidbsd i386-pc-solidbsd +i386-sortix i386-pc-sortix i486-elf i486-pc-elf i586-auroraux5.0 i586-pc-auroraux5.0 i586-auroraux i586-pc-auroraux @@ -321,6 +322,7 @@ visium-elf visium-unknown-elf x86_64-cygwin x86_64-pc-cygwin x86_64-dicos x86_64-pc-dicos x86_64-ericsson-dicos x86_64-ericsson-dicos +x86_64-sortix x86_64-pc-sortix xbox i686-pc-mingw32 xc16x-elf xc16x-unknown-elf xc16x xc16x-unknown-none -- 2.1.0 _______________________________________________ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches