Rename i486-sortix platform to i686-sortix.

This commit is contained in:
Jonas 'Sortie' Termansen 2016-03-06 15:29:15 +01:00
parent 6aa063a247
commit cadef6fedb
8 changed files with 61 additions and 50 deletions

View File

@ -274,35 +274,35 @@ everything: most-things
.PHONY: sysroot-base-headers-all-archs .PHONY: sysroot-base-headers-all-archs
sysroot-base-headers-all-archs: sysroot-base-headers-all-archs:
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) sysroot-base-headers HOST=i486-sortix $(MAKE) sysroot-base-headers HOST=i686-sortix
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) sysroot-base-headers HOST=x86_64-sortix $(MAKE) sysroot-base-headers HOST=x86_64-sortix
.PHONY: all-archs .PHONY: all-archs
all-archs: all-archs:
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) all HOST=i486-sortix $(MAKE) all HOST=i686-sortix
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) all HOST=x86_64-sortix $(MAKE) all HOST=x86_64-sortix
.PHONY: most-things-all-archs .PHONY: most-things-all-archs
most-things-all-archs: most-things-all-archs:
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) most-things HOST=i486-sortix $(MAKE) most-things HOST=i686-sortix
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) most-things HOST=x86_64-sortix $(MAKE) most-things HOST=x86_64-sortix
.PHONY: everything-all-archs .PHONY: everything-all-archs
everything-all-archs: everything-all-archs:
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) everything HOST=i486-sortix $(MAKE) everything HOST=i686-sortix
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) everything HOST=x86_64-sortix $(MAKE) everything HOST=x86_64-sortix
.PHONY: release-all-archs .PHONY: release-all-archs
release-all-archs: release-all-archs:
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) release HOST=i486-sortix $(MAKE) release HOST=i686-sortix
$(MAKE) clean clean-sysroot $(MAKE) clean clean-sysroot
$(MAKE) release HOST=x86_64-sortix $(MAKE) release HOST=x86_64-sortix

View File

@ -31,7 +31,7 @@ ifeq ($(HOST_IS_SORTIX),0)
software_meant_for_sortix: software_meant_for_sortix:
@echo This software is meant to work under Sortix, not $(HOST) @echo This software is meant to work under Sortix, not $(HOST)
@echo Attempt was $(MAKE) $(MAKEFLAGS) @echo Attempt was $(MAKE) $(MAKEFLAGS)
@echo Try: $(MAKE) $(MAKEFLAGS) HOST=$(UNAME_PLATFORM)-sortix @echo Try: $(MAKE) $(MAKEFLAGS) HOST=$(UNAME_MACHINE)-sortix
@exit 1 @exit 1
endif endif
endif endif
@ -40,10 +40,22 @@ endif
is_unset_or_default = $(filter undefined default,$(origin $(1))) is_unset_or_default = $(filter undefined default,$(origin $(1)))
# Provide deprecated CPU variable so makefiles can select CPU-specific dirs. # Provide deprecated CPU variable so makefiles can select CPU-specific dirs.
ifeq ($(HOST),i386-sortix)
MACHINE:=i386
CPU:=x86
endif
ifeq ($(HOST),i486-sortix) ifeq ($(HOST),i486-sortix)
MACHINE:=i486 MACHINE:=i486
CPU:=x86 CPU:=x86
endif endif
ifeq ($(HOST),i586-sortix)
MACHINE:=i586
CPU:=x86
endif
ifeq ($(HOST),i686-sortix)
MACHINE:=i686
CPU:=x86
endif
ifeq ($(HOST),x86_64-sortix) ifeq ($(HOST),x86_64-sortix)
MACHINE:=x86_64 MACHINE:=x86_64
CPU:=x64 CPU:=x64

View File

@ -1,42 +1,8 @@
UNAME_OS:=$(shell uname -o) UNAME_OS:=$(shell uname -s | tr '[:upper:]' '[:lower:]' | sed 's,^linux$$,linux-gnu,g')
UNAME_PLATFORM:=$(shell uname -i) UNAME_MACHINE:=$(shell uname -m)
# Detect the platform that the software is being built on. # Detect the platform that the software is being built on.
ifndef BUILD BUILD?=$(UNAME_MACHINE)-$(UNAME_OS)
# If the software is being built on Sortix.
ifeq ($(UNAME_OS),Sortix)
ifeq ($(MAKEFILE_NOT_MEANT_FOR_SORTIX), 1)
makefile_not_meant_for_sortix:
@echo This makefile isn\'t meant to work under Sortix
@exit 1
endif
ifeq ($(UNAME_PLATFORM),i386)
BUILD:=i486-sortix
endif
ifeq ($(UNAME_PLATFORM),x86_64)
BUILD:=x86_64-sortix
endif
# If the software is not built on Sortix.
else
ifeq ($(MEANT_FOR_SORTIX), 1)
makefile_meant_for_sortix:
@echo This makefile isn\'t meant to work under $(UNAME_OS)
@exit 1
endif
endif
ifeq ($(UNAME_OS),GNU/Linux)
ifeq ($(UNAME_PLATFORM),i386)
BUILD:=i386-linux-gnu
endif
ifeq ($(UNAME_PLATFORM),x86_64)
BUILD:=x86_64-linux-gnu
endif
endif
endif
# Determine the platform the software will run on. # Determine the platform the software will run on.
HOST?=$(BUILD) HOST?=$(BUILD)
@ -45,6 +11,21 @@ HOST_MACHINE:=$(shell expr x$(HOST) : 'x\([^-]*\).*')
# Determine the platform the software will target. # Determine the platform the software will target.
TARGET?=$(HOST) TARGET?=$(HOST)
BUILD_IS_SORTIX:=$(if $(shell echo $(BUILD) | grep sortix$),1,0) BUILD_IS_SORTIX:=$(if $(shell echo $(BUILD) | grep -- -sortix),1,0)
HOST_IS_SORTIX:=$(if $(shell echo $(HOST) | grep sortix$),1,0) HOST_IS_SORTIX:=$(if $(shell echo $(HOST) | grep -- -sortix),1,0)
TARGET_IS_SORTIX:=$(if $(shell echo $(TARGET) | grep sortix$),1,0) TARGET_IS_SORTIX:=$(if $(shell echo $(TARGET) | grep -- -sortix),1,0)
# If the software is being built on Sortix.
ifeq ($(UNAME_OS),sortix)
ifeq ($(MAKEFILE_NOT_MEANT_FOR_SORTIX), 1)
makefile_not_meant_for_sortix:
@echo This makefile isn\'t meant to work under Sortix
@exit 1
endif
# If the software is not built on Sortix.
else ifeq ($(MEANT_FOR_SORTIX), 1)
makefile_meant_for_sortix:
@echo This makefile isn\'t meant to work under $(uname -s)
@exit 1
endif

View File

@ -71,7 +71,7 @@ The following sections describe these variables in detail.
.Ss Target Platform .Ss Target Platform
You need to decide what the platform your final Sortix system will run on. You You need to decide what the platform your final Sortix system will run on. You
can currently decide between can currently decide between
.Sy i486-sortix .Sy i686-sortix
and and
.Sy x86_64-sortix . .Sy x86_64-sortix .
In this guide we will refer to that platform triplet as In this guide we will refer to that platform triplet as

View File

@ -133,7 +133,7 @@ Specifies platform on which the compiled code will run. This defaults to the
current machine and operating system. This is used when cross-compiling the current machine and operating system. This is used when cross-compiling the
operating system. When cross-compiling the operating system, it must be set to operating system. When cross-compiling the operating system, it must be set to
one of one of
.Sy i486-sortix .Sy i686-sortix
and and
.Sy x86_64-sortix . .Sy x86_64-sortix .
This must be unset when building the build tools as they run on the current This must be unset when building the build tools as they run on the current

View File

@ -25,7 +25,7 @@ A computer meeting the system requirements.
.Ss System Requirements .Ss System Requirements
.Bl -bullet -compact .Bl -bullet -compact
.It .It
32-bit x86 CPU with SSE (i486 release), or 64-bit x86 CPU (x86_64 release). 32-bit x86 CPU with SSE (i686 release), or 64-bit x86 CPU (x86_64 release).
.It .It
1 GiB RAM (recommended) to run iso live environment (including installer) with 1 GiB RAM (recommended) to run iso live environment (including installer) with
all ports loaded, or significantly less if unimportant ports are not loaded. An all ports loaded, or significantly less if unimportant ports are not loaded. An

View File

@ -732,6 +732,16 @@ int main(void)
if ( upgrade_pid == 0 ) if ( upgrade_pid == 0 )
{ {
umask(0022); umask(0022);
// TODO: Remove after releasing Sortix 1.0.
if ( target_release->version_major == 1 &&
target_release->version_minor == 0 &&
target_release->version_dev &&
strcmp(uts.machine, "i686") == 0 )
{
system("sed -i 's/i486-sortix/i686-sortix/g' tix/collection.conf");
if ( access_or_die("tix/tixinfo", F_OK) == 0 )
system("sed -i 's/i486-sortix/i686-sortix/g' tix/tixinfo/*");
}
// TODO: Use an upgrade manifest system that notices files that are now // TODO: Use an upgrade manifest system that notices files that are now
// untracked or moved from one manifest to another. // untracked or moved from one manifest to another.
if ( conf.system ) if ( conf.system )

View File

@ -456,7 +456,15 @@ static void compact_arguments(int* argc, char*** argv)
char* GetBuildTriplet(void) char* GetBuildTriplet(void)
{ {
#if defined(__sortix__) && defined(__i386__) #if defined(__sortix__) && defined(__i386__)
return strdup("i486-sortix"); #if defined(__i686__)
return "i686-sortix";
#elif defined(__i586__)
return "i586-sortix";
#elif defined(__i486__)
return "i486-sortix";
#else
return "i386-sortix";
#endif
#elif defined(__sortix__) && defined(__x86_64__) #elif defined(__sortix__) && defined(__x86_64__)
return strdup("x86_64-sortix"); return strdup("x86_64-sortix");
#elif defined(__sortix__) #elif defined(__sortix__)