From d7753c7c8d07b347014b9bbb1be75c0eac27280c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 22 Feb 2019 14:43:12 +0100 Subject: Move over to building all of userspace with i686-pc-serenity-g++. --- .gitignore | 1 + AK/Types.h | 2 +- Applications/About/Makefile | 12 +++++------- Applications/FileManager/Makefile | 12 +++++------- Applications/FontEditor/Makefile | 14 ++++++-------- Applications/Launcher/Makefile | 14 ++++++-------- Applications/Terminal/Makefile | 14 ++++++-------- LibC/Makefile | 13 +++++-------- LibC/install-headers.sh | 5 +++++ LibC/sys/types.h | 2 +- LibGUI/Makefile | 12 +++++------- Userland/Makefile | 12 +++++------- WindowServer/Makefile | 12 +++++------- 13 files changed, 56 insertions(+), 69 deletions(-) create mode 100755 LibC/install-headers.sh diff --git a/.gitignore b/.gitignore index 4a1cdea223..8f9bf9259c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ *.cflags *.cxxflags Patches +Root diff --git a/AK/Types.h b/AK/Types.h index bfba6136b8..39f9fa5284 100644 --- a/AK/Types.h +++ b/AK/Types.h @@ -17,7 +17,7 @@ typedef signed_dword ssize_t; static_assert(sizeof(size_t) == sizeof(dword)); static_assert(sizeof(ssize_t) == sizeof(signed_dword)); -typedef signed_dword ptrdiff_t; +typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef byte uint8_t; typedef word uint16_t; diff --git a/Applications/About/Makefile b/Applications/About/Makefile index 96f4fae787..d7fb296ca9 100644 --- a/Applications/About/Makefile +++ b/Applications/About/Makefile @@ -3,8 +3,7 @@ OBJS = \ APP = About -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os @@ -12,11 +11,10 @@ INCLUDE_FLAGS = -I../.. -I. -I../../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = -static +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-ar all: $(APP) diff --git a/Applications/FileManager/Makefile b/Applications/FileManager/Makefile index 981cfe430b..867cb0a8b2 100644 --- a/Applications/FileManager/Makefile +++ b/Applications/FileManager/Makefile @@ -4,8 +4,7 @@ OBJS = \ APP = FileManager -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os @@ -13,11 +12,10 @@ INCLUDE_FLAGS = -I../.. -I. -I../../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = -static +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-ar all: $(APP) diff --git a/Applications/FontEditor/Makefile b/Applications/FontEditor/Makefile index 70722ae8cc..88ef5cc354 100644 --- a/Applications/FontEditor/Makefile +++ b/Applications/FontEditor/Makefile @@ -4,20 +4,18 @@ OBJS = \ APP = FontEditor -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -FLAVOR_FLAGS = -march=i686 -m32 -fno-exceptions -fno-rtti +FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os INCLUDE_FLAGS = -I../.. -I. -I../../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = -static +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-ar all: $(APP) diff --git a/Applications/Launcher/Makefile b/Applications/Launcher/Makefile index e8c5644c2f..960e9c985c 100644 --- a/Applications/Launcher/Makefile +++ b/Applications/Launcher/Makefile @@ -3,20 +3,18 @@ OBJS = \ APP = Launcher -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -FLAVOR_FLAGS = -march=i686 -m32 -fno-exceptions -fno-rtti +FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os INCLUDE_FLAGS = -I../.. -I. -I../../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = -static +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-ar all: $(APP) diff --git a/Applications/Terminal/Makefile b/Applications/Terminal/Makefile index e14dcf5554..c8c0ca7455 100644 --- a/Applications/Terminal/Makefile +++ b/Applications/Terminal/Makefile @@ -4,20 +4,18 @@ OBJS = \ APP = Terminal -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -FLAVOR_FLAGS = -march=i686 -m32 -fno-exceptions -fno-rtti +FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os INCLUDE_FLAGS = -I../.. -I. -I../../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = -static +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-ar all: $(APP) diff --git a/LibC/Makefile b/LibC/Makefile index a40dbe87d5..1bc12669c8 100644 --- a/LibC/Makefile +++ b/LibC/Makefile @@ -44,9 +44,7 @@ ASM_OBJS = setjmp.no CPP_OBJS = $(AK_OBJS) $(WIDGETS_OBJS) $(LIBC_OBJS) LIBRARY = LibC.a -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc -LIBC_FLAGS = +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os @@ -54,11 +52,10 @@ INCLUDE_FLAGS = -I.. -I. DEFINES = -DSERENITY -DUSERLAND -DSANITIZE_PTRS -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(LIBC_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = -T linker.ld +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-ar all: $(LIBRARY) diff --git a/LibC/install-headers.sh b/LibC/install-headers.sh new file mode 100755 index 0000000000..0609c37541 --- /dev/null +++ b/LibC/install-headers.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +mkdir -p ../Root/usr/include/sys/ +cp *.h ../Root/usr/include/ +cp sys/*.h ../Root/usr/include/sys/ diff --git a/LibC/sys/types.h b/LibC/sys/types.h index 17e87cf1b0..6230f2177e 100644 --- a/LibC/sys/types.h +++ b/LibC/sys/types.h @@ -7,7 +7,7 @@ __BEGIN_DECLS typedef unsigned int u_int; typedef unsigned long u_long; -typedef int ptrdiff_t; +typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef unsigned long int __uintmax_t; typedef __uintmax_t uintmax_t; typedef long int __intmax_t; diff --git a/LibGUI/Makefile b/LibGUI/Makefile index 629436e7f3..671c7a396a 100644 --- a/LibGUI/Makefile +++ b/LibGUI/Makefile @@ -35,8 +35,7 @@ OBJS = $(SHAREDGRAPHICS_OBJS) $(LIBGUI_OBJS) LIBS = ../LibC/LibC.a LIBRARY = LibGUI.a -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os @@ -44,11 +43,10 @@ INCLUDE_FLAGS = -I../LibC -I.. -I. DEFINES = -DSERENITY -DUSERLAND -DSANITIZE_PTRS -DLIBGUI -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-ar all: $(LIBRARY) diff --git a/Userland/Makefile b/Userland/Makefile index e49e488b7a..ce01ce4da0 100644 --- a/Userland/Makefile +++ b/Userland/Makefile @@ -70,8 +70,7 @@ APPS = \ rm ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc -USERLAND_FLAGS = +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os @@ -79,11 +78,10 @@ INCLUDE_FLAGS = -I.. -I. -I../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = -static -e _start +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-r all: $(OBJS) $(APPS) diff --git a/WindowServer/Makefile b/WindowServer/Makefile index 86798c082c..0b9c0e5ed3 100644 --- a/WindowServer/Makefile +++ b/WindowServer/Makefile @@ -22,8 +22,7 @@ WINDOWSERVER_OBJS = \ APP = WindowServer OBJS = $(SHAREDGRAPHICS_OBJS) $(WINDOWSERVER_OBJS) -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc +STANDARD_FLAGS = -std=c++17 WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough FLAVOR_FLAGS = -fno-exceptions -fno-rtti OPTIMIZATION_FLAGS = -Os @@ -31,11 +30,10 @@ INCLUDE_FLAGS = -I.. -I. -I../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = i686-elf-g++ -LD = i686-elf-ld -AR = ar -LDFLAGS = -static --strip-debug -melf_i386 -e _start --gc-sections +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXX = i686-pc-serenity-g++ +LD = i686-pc-serenity-ld +AR = i686-pc-serenity-ar all: $(APP) -- cgit v1.2.3