diff --git a/kernel/src/Api/BuildNo.hpp b/kernel/src/Api/BuildNo.hpp index 43b7931..4adff58 100644 --- a/kernel/src/Api/BuildNo.hpp +++ b/kernel/src/Api/BuildNo.hpp @@ -12,4 +12,4 @@ #pragma once -#define MONTAUK_BUILD_NUMBER 6 +#define MONTAUK_BUILD_NUMBER 7 diff --git a/programs/GNUmakefile b/programs/GNUmakefile index 40ae225..4f512d5 100644 --- a/programs/GNUmakefile +++ b/programs/GNUmakefile @@ -6,50 +6,40 @@ MAKEFLAGS += -rR ARCH := x86_64 # Auto-detect cross compiler from toolchain/local/. -TOOLCHAIN_PREFIX := $(shell cd .. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) +TOOLCHAIN_PREFIX := $(shell cd .. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + CC = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) +else CXX := $(TOOLCHAIN_PREFIX)g++ CC := $(TOOLCHAIN_PREFIX)gcc -else - CXX := g++ - CC := gcc endif -# Compiler flags: freestanding, no stdlib, kernel-mode compatible. +# Compiler flags. The x86_64-montauk toolchain supplies the target ABI +# (static ET_EXEC, 4 KiB pages, no red zone) and header paths; system +# programs additionally avoid FP/SIMD and their own runtime (-nostdlib). override CXXFLAGS := \ -std=gnu++20 \ -g -O2 -pipe \ -Wall \ -Wextra \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -mno-80387 \ -mno-mmx \ -mno-sse \ -mno-sse2 \ - -mno-red-zone \ - -mcmodel=small \ - -I include \ - -isystem ../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../kernel/freestnd-cxx-hdrs/x86_64/include + -I include # Linker flags: freestanding static ELF. override LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T link.ld # Output directory. diff --git a/programs/lib/libc/Makefile b/programs/lib/libc/Makefile index 383f693..228a178 100644 --- a/programs/lib/libc/Makefile +++ b/programs/lib/libc/Makefile @@ -6,7 +6,7 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) CC := $(TOOLCHAIN_PREFIX)gcc AR := $(TOOLCHAIN_PREFIX)ar diff --git a/programs/lib/libc/obj/libc.o b/programs/lib/libc/obj/libc.o index ea40a3c..69a4160 100644 Binary files a/programs/lib/libc/obj/libc.o and b/programs/lib/libc/obj/libc.o differ diff --git a/programs/lib/libjpeg/Makefile b/programs/lib/libjpeg/Makefile index 801fa8a..7c499f0 100644 --- a/programs/lib/libjpeg/Makefile +++ b/programs/lib/libjpeg/Makefile @@ -6,7 +6,7 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) CC := $(TOOLCHAIN_PREFIX)gcc AR := $(TOOLCHAIN_PREFIX)ar diff --git a/programs/lib/libjpeg/libjpeg.a b/programs/lib/libjpeg/libjpeg.a index f1b0586..d345c68 100644 Binary files a/programs/lib/libjpeg/libjpeg.a and b/programs/lib/libjpeg/libjpeg.a differ diff --git a/programs/lib/libjpeg/obj/stb_image_impl.o b/programs/lib/libjpeg/obj/stb_image_impl.o index 6f5b5a8..a57bd24 100644 Binary files a/programs/lib/libjpeg/obj/stb_image_impl.o and b/programs/lib/libjpeg/obj/stb_image_impl.o differ diff --git a/programs/lib/libjpegwrite/Makefile b/programs/lib/libjpegwrite/Makefile index 3257aee..a2b1a7b 100644 --- a/programs/lib/libjpegwrite/Makefile +++ b/programs/lib/libjpegwrite/Makefile @@ -6,7 +6,7 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) CC := $(TOOLCHAIN_PREFIX)gcc AR := $(TOOLCHAIN_PREFIX)ar diff --git a/programs/lib/libjpegwrite/libjpegwrite.a b/programs/lib/libjpegwrite/libjpegwrite.a index bf31e48..89c9ddb 100644 Binary files a/programs/lib/libjpegwrite/libjpegwrite.a and b/programs/lib/libjpegwrite/libjpegwrite.a differ diff --git a/programs/lib/libjpegwrite/obj/stb_image_write_impl.o b/programs/lib/libjpegwrite/obj/stb_image_write_impl.o index 5a1517a..d52704d 100644 Binary files a/programs/lib/libjpegwrite/obj/stb_image_write_impl.o and b/programs/lib/libjpegwrite/obj/stb_image_write_impl.o differ diff --git a/programs/lib/tls/Makefile b/programs/lib/tls/Makefile index c9e5f5c..4a1bc5b 100644 --- a/programs/lib/tls/Makefile +++ b/programs/lib/tls/Makefile @@ -6,7 +6,7 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) CXX := $(TOOLCHAIN_PREFIX)g++ AR := $(TOOLCHAIN_PREFIX)ar diff --git a/programs/lib/tls/libtls.a b/programs/lib/tls/libtls.a index c143167..f4af39e 100644 Binary files a/programs/lib/tls/libtls.a and b/programs/lib/tls/libtls.a differ diff --git a/programs/lib/tls/obj/tls.o b/programs/lib/tls/obj/tls.o index a4ea6eb..684d4b5 100644 Binary files a/programs/lib/tls/obj/tls.o and b/programs/lib/tls/obj/tls.o differ diff --git a/programs/libs/libnetworkapplet/Makefile b/programs/libs/libnetworkapplet/Makefile index 8cfc308..890670c 100644 --- a/programs/libs/libnetworkapplet/Makefile +++ b/programs/libs/libnetworkapplet/Makefile @@ -4,7 +4,7 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) CXX := $(TOOLCHAIN_PREFIX)g++ LD := $(TOOLCHAIN_PREFIX)ld diff --git a/programs/libs/libprintersapplet/Makefile b/programs/libs/libprintersapplet/Makefile index c72d090..1bdf255 100644 --- a/programs/libs/libprintersapplet/Makefile +++ b/programs/libs/libprintersapplet/Makefile @@ -4,7 +4,7 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) CXX := $(TOOLCHAIN_PREFIX)g++ LD := $(TOOLCHAIN_PREFIX)ld diff --git a/programs/libs/libprintersapplet/obj/src/libprintersapplet.o b/programs/libs/libprintersapplet/obj/src/libprintersapplet.o index 234bbee..8b60005 100644 Binary files a/programs/libs/libprintersapplet/obj/src/libprintersapplet.o and b/programs/libs/libprintersapplet/obj/src/libprintersapplet.o differ diff --git a/programs/libs/libtimezonesapplet/Makefile b/programs/libs/libtimezonesapplet/Makefile index b1e60d2..975e003 100644 --- a/programs/libs/libtimezonesapplet/Makefile +++ b/programs/libs/libtimezonesapplet/Makefile @@ -4,7 +4,7 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) CXX := $(TOOLCHAIN_PREFIX)g++ LD := $(TOOLCHAIN_PREFIX)ld diff --git a/programs/libs/libtimezonesapplet/obj/src/libtimezonesapplet.o b/programs/libs/libtimezonesapplet/obj/src/libtimezonesapplet.o index 89c9dbb..4f10ca1 100644 Binary files a/programs/libs/libtimezonesapplet/obj/src/libtimezonesapplet.o and b/programs/libs/libtimezonesapplet/obj/src/libtimezonesapplet.o differ diff --git a/programs/src/2048/Makefile b/programs/src/2048/Makefile index a261dca..b4d35dc 100644 --- a/programs/src/2048/Makefile +++ b/programs/src/2048/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,34 +24,22 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp diff --git a/programs/src/audio/Makefile b/programs/src/audio/Makefile index 9adff0a..854a4be 100644 --- a/programs/src/audio/Makefile +++ b/programs/src/audio/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/bluetooth/Makefile b/programs/src/bluetooth/Makefile index 8650d30..2a96b53 100644 --- a/programs/src/bluetooth/Makefile +++ b/programs/src/bluetooth/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/calculator/Makefile b/programs/src/calculator/Makefile index e936c4a..a217617 100644 --- a/programs/src/calculator/Makefile +++ b/programs/src/calculator/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/charmap/Makefile b/programs/src/charmap/Makefile index b3e066a..94f4674 100644 --- a/programs/src/charmap/Makefile +++ b/programs/src/charmap/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/crashpad/Makefile b/programs/src/crashpad/Makefile index 553c90c..4039ad8 100644 --- a/programs/src/crashpad/Makefile +++ b/programs/src/crashpad/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,35 +24,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I ../../lib/bearssl/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I ../../lib/bearssl/inc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp font_data.cpp diff --git a/programs/src/desktop/Makefile b/programs/src/desktop/Makefile index bd95ceb..191b298 100644 --- a/programs/src/desktop/Makefile +++ b/programs/src/desktop/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -33,37 +33,25 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I $(BEARSSL)/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(BEARSSL)/inc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- C++ source files ---- diff --git a/programs/src/devexplorer/Makefile b/programs/src/devexplorer/Makefile index 9d28ebe..691dbd8 100644 --- a/programs/src/devexplorer/Makefile +++ b/programs/src/devexplorer/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,36 +30,24 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I ../../lib/bearssl/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I ../../lib/bearssl/inc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/dialogs/Makefile b/programs/src/dialogs/Makefile index 92a73d3..e0769a4 100644 --- a/programs/src/dialogs/Makefile +++ b/programs/src/dialogs/Makefile @@ -4,17 +4,17 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CC = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + LD = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + STRIP = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) +else CC := $(TOOLCHAIN_PREFIX)gcc CXX := $(TOOLCHAIN_PREFIX)g++ LD := $(TOOLCHAIN_PREFIX)ld STRIP := $(TOOLCHAIN_PREFIX)strip -else - CC := gcc - CXX := g++ - LD := ld - STRIP := strip endif PROG_INC := ../../include @@ -31,7 +31,6 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ @@ -41,19 +40,13 @@ CXXFLAGS := \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -DGUI_DIALOGS_LIBRARY_BUILD \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I ../../lib/bearssl/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I ../../lib/bearssl/inc LDFLAGS := \ -shared \ @@ -62,15 +55,13 @@ LDFLAGS := \ --hash-style=sysv \ -u dialogs_run_request \ -u dialogs_message_box \ - -m elf_x86_64 \ - -z max-page-size=0x1000 + -m elf_x86_64 LIBC_CFLAGS := \ -std=gnu11 \ -g -O2 -pipe \ -Wall \ -Wno-unused-parameter \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ @@ -78,12 +69,8 @@ LIBC_CFLAGS := \ -fvisibility=hidden \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -isystem $(PROG_INC)/libc \ -isystem $(GCC_INCLUDE) diff --git a/programs/src/disks/Makefile b/programs/src/disks/Makefile index 4a6d001..fef07a3 100644 --- a/programs/src/disks/Makefile +++ b/programs/src/disks/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/doom/Makefile b/programs/src/doom/Makefile index a8b2e3d..cd02322 100644 --- a/programs/src/doom/Makefile +++ b/programs/src/doom/Makefile @@ -6,15 +6,15 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CC = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + LD = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) +else CC := $(TOOLCHAIN_PREFIX)gcc CXX := $(TOOLCHAIN_PREFIX)g++ LD := $(TOOLCHAIN_PREFIX)gcc -else - CC := gcc - CXX := g++ - LD := gcc endif # ---- Paths ---- @@ -39,19 +39,13 @@ CFLAGS := \ -Wno-missing-field-initializers \ -Wno-sign-compare \ -Wno-pointer-sign \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -DNORMALUNIX \ -DLINUX \ -DFEATURE_SOUND \ @@ -66,36 +60,24 @@ CXXFLAGS := \ -g -O2 -pipe \ -Wall \ -Wno-unused-parameter \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -isystem $(LIBC_INC) \ -I . \ - -I $(PROG_INC) \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(PROG_INC) # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- DOOM source files (excluding platform-specific ports and sound backends) ---- diff --git a/programs/src/fetch/Makefile b/programs/src/fetch/Makefile index 4e9005a..7fc9a6c 100644 --- a/programs/src/fetch/Makefile +++ b/programs/src/fetch/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -32,38 +32,26 @@ CXXFLAGS := \ -Wall \ -Wextra \ -Wno-unused-parameter \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -mno-80387 \ -mno-mmx \ -mno-sse \ -mno-sse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(LIBC_INC) \ - -I $(BEARSSL)/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(BEARSSL)/inc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Libraries ---- diff --git a/programs/src/fontpreview/Makefile b/programs/src/fontpreview/Makefile index bb2b41e..000ae53 100644 --- a/programs/src/fontpreview/Makefile +++ b/programs/src/fontpreview/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,34 +30,22 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ - -I $(PROG_INC) \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(PROG_INC) # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Libraries ---- diff --git a/programs/src/imageviewer/Makefile b/programs/src/imageviewer/Makefile index b789db6..7288716 100644 --- a/programs/src/imageviewer/Makefile +++ b/programs/src/imageviewer/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -32,35 +32,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(LIBC_INC) \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(LIBC_INC) # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Libraries ---- diff --git a/programs/src/installer/Makefile b/programs/src/installer/Makefile index 1d4bdc5..a679444 100644 --- a/programs/src/installer/Makefile +++ b/programs/src/installer/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,36 +30,24 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/klog/Makefile b/programs/src/klog/Makefile index 5473d7a..76ced1b 100644 --- a/programs/src/klog/Makefile +++ b/programs/src/klog/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,33 +24,21 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp font_data.cpp diff --git a/programs/src/libloader/Makefile b/programs/src/libloader/Makefile index defcd5d..fd88028 100644 --- a/programs/src/libloader/Makefile +++ b/programs/src/libloader/Makefile @@ -2,7 +2,7 @@ ARCH := x86_64 -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- CXX := $(TOOLCHAIN_PREFIX)g++ AR := $(TOOLCHAIN_PREFIX)ar @@ -11,28 +11,20 @@ override CXXFLAGS := \ -g -O2 -pipe \ -Wall \ -Wextra \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -mno-80387 \ -mno-mmx \ -mno-sse \ -mno-sse2 \ - -mno-red-zone \ - -mcmodel=small \ -I ../../include \ -isystem ../../include/libc \ - -isystem ../../include/montauk \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem ../../include/montauk LIBDIR := ../../lib/libloader LEGACY_BINDIR := ../../bin diff --git a/programs/src/login/Makefile b/programs/src/login/Makefile index a9b9f86..ce06ec4 100644 --- a/programs/src/login/Makefile +++ b/programs/src/login/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -32,36 +32,24 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I $(BEARSSL)/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(BEARSSL)/inc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/lua/Makefile b/programs/src/lua/Makefile index 37f2429..5ae753d 100644 --- a/programs/src/lua/Makefile +++ b/programs/src/lua/Makefile @@ -1,13 +1,13 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CC = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + AR = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) +else CC := $(TOOLCHAIN_PREFIX)gcc AR := $(TOOLCHAIN_PREFIX)ar -else - CC := gcc - AR := ar endif SRCDIR := src @@ -26,19 +26,13 @@ CFLAGS := \ -Wno-sign-compare \ -Wno-misleading-indentation \ -Wno-implicit-fallthrough \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -D__MONTAUKOS__=1 \ -DLUA_COMPAT_5_3 \ -I$(SRCDIR) \ @@ -47,11 +41,7 @@ CFLAGS := \ LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T ../../link.ld CORE_SRCS := \ diff --git a/programs/src/mandelbrot/Makefile b/programs/src/mandelbrot/Makefile index b1310a7..6152939 100644 --- a/programs/src/mandelbrot/Makefile +++ b/programs/src/mandelbrot/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/music/Makefile b/programs/src/music/Makefile index 127c581..d67f3fd 100644 --- a/programs/src/music/Makefile +++ b/programs/src/music/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,36 +30,24 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -I . \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/network/Makefile b/programs/src/network/Makefile index 2260239..6774b8c 100644 --- a/programs/src/network/Makefile +++ b/programs/src/network/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,34 +24,22 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp diff --git a/programs/src/paint/Makefile b/programs/src/paint/Makefile index d976884..426ba39 100644 --- a/programs/src/paint/Makefile +++ b/programs/src/paint/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/pdfviewer/Makefile b/programs/src/pdfviewer/Makefile index 797eb2d..d96d79e 100644 --- a/programs/src/pdfviewer/Makefile +++ b/programs/src/pdfviewer/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/powermgr/Makefile b/programs/src/powermgr/Makefile index 2bcdf92..814b5af 100644 --- a/programs/src/powermgr/Makefile +++ b/programs/src/powermgr/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,34 +24,22 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp diff --git a/programs/src/printctl/Makefile b/programs/src/printctl/Makefile index acaa75d..28f6302 100644 --- a/programs/src/printctl/Makefile +++ b/programs/src/printctl/Makefile @@ -3,11 +3,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,36 +24,24 @@ CXXFLAGS := \ -Wall \ -Wextra \ -Wno-unused-parameter \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -mno-80387 \ -mno-mmx \ -mno-sse \ -mno-sse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I $(BEARSSL)/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(BEARSSL)/inc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) TARGET := $(BINDIR)/os/printctl.elf diff --git a/programs/src/printd/Makefile b/programs/src/printd/Makefile index 0f66ffe..554e1d9 100644 --- a/programs/src/printd/Makefile +++ b/programs/src/printd/Makefile @@ -3,11 +3,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -25,34 +25,22 @@ CXXFLAGS := \ -Wall \ -Wextra \ -Wno-unused-parameter \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I $(BEARSSL)/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(BEARSSL)/inc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp test_page_jpeg.cpp font_data.cpp stb_truetype_impl.cpp diff --git a/programs/src/printers/Makefile b/programs/src/printers/Makefile index 9e66697..8bd17d0 100644 --- a/programs/src/printers/Makefile +++ b/programs/src/printers/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,35 +24,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I ../../lib/bearssl/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I ../../lib/bearssl/inc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp font_data.cpp diff --git a/programs/src/procmgr/Makefile b/programs/src/procmgr/Makefile index f0db480..820be26 100644 --- a/programs/src/procmgr/Makefile +++ b/programs/src/procmgr/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,34 +24,22 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp diff --git a/programs/src/rpgdemo/Makefile b/programs/src/rpgdemo/Makefile index e033667..cf98789 100644 --- a/programs/src/rpgdemo/Makefile +++ b/programs/src/rpgdemo/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -34,37 +34,25 @@ CXXFLAGS := \ -Wno-unused-parameter \ -Wno-unused-function \ -Wno-missing-field-initializers \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ -fno-tree-loop-distribute-patterns \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -I . \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/screenshot/Makefile b/programs/src/screenshot/Makefile index 4017c0b..e9e47ad 100644 --- a/programs/src/screenshot/Makefile +++ b/programs/src/screenshot/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -34,36 +34,24 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem $(PROJECT_ROOT)/kernel/freestnd-c-hdrs/x86_64/include \ - -isystem $(PROJECT_ROOT)/kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Libraries ---- diff --git a/programs/src/shell/Makefile b/programs/src/shell/Makefile index 496861c..755098f 100644 --- a/programs/src/shell/Makefile +++ b/programs/src/shell/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -28,38 +28,26 @@ CXXFLAGS := \ -Wall \ -Wextra \ -Wno-unused-parameter \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -mno-80387 \ -mno-mmx \ -mno-sse \ -mno-sse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I . \ - -I $(PROG_INC) \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(PROG_INC) # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/spreadsheet/Makefile b/programs/src/spreadsheet/Makefile index b96fcd4..8a9469b 100644 --- a/programs/src/spreadsheet/Makefile +++ b/programs/src/spreadsheet/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/tcc/Makefile b/programs/src/tcc/Makefile index 1839dfc..e68cae0 100644 --- a/programs/src/tcc/Makefile +++ b/programs/src/tcc/Makefile @@ -6,15 +6,15 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CC = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) + AR = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) +else CC := $(TOOLCHAIN_PREFIX)gcc CXX := $(TOOLCHAIN_PREFIX)g++ AR := $(TOOLCHAIN_PREFIX)ar -else - CC := gcc - CXX := g++ - AR := ar endif # ---- Paths ---- @@ -37,19 +37,13 @@ CFLAGS := \ -Wno-implicit-fallthrough \ -Wno-stringop-truncation \ -Wno-format-truncation \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -fno-tree-loop-distribute-patterns \ -D__MONTAUKOS__=1 \ -DONE_SOURCE=0 \ @@ -61,11 +55,7 @@ CFLAGS := \ LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T ../../link.ld # ---- Sources ---- diff --git a/programs/src/terminal/Makefile b/programs/src/terminal/Makefile index ba387cd..9472b40 100644 --- a/programs/src/terminal/Makefile +++ b/programs/src/terminal/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,33 +24,21 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp font_data.cpp diff --git a/programs/src/texteditor/Makefile b/programs/src/texteditor/Makefile index d8aa5bb..bcd5832 100644 --- a/programs/src/texteditor/Makefile +++ b/programs/src/texteditor/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -30,35 +30,23 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Source files ---- diff --git a/programs/src/timezone/Makefile b/programs/src/timezone/Makefile index 0c62c9b..a1ea68d 100644 --- a/programs/src/timezone/Makefile +++ b/programs/src/timezone/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,34 +24,22 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -MMD -MP \ -I $(PROG_INC) \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp stb_truetype_impl.cpp font_data.cpp diff --git a/programs/src/video/Makefile b/programs/src/video/Makefile index bc4e254..f6c963b 100644 --- a/programs/src/video/Makefile +++ b/programs/src/video/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,34 +24,22 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -I . \ - -isystem $(PROG_INC)/libc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -isystem $(PROG_INC)/libc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp avi.cpp stb_image_impl.cpp stb_truetype_impl.cpp diff --git a/programs/src/weather/Makefile b/programs/src/weather/Makefile index 64cb967..2fc4f39 100644 --- a/programs/src/weather/Makefile +++ b/programs/src/weather/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -33,36 +33,24 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(LIBC_INC) \ - -I $(BEARSSL)/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(BEARSSL)/inc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Libraries ---- diff --git a/programs/src/wiki/Makefile b/programs/src/wiki/Makefile index 6e2ecac..8f10a39 100644 --- a/programs/src/wiki/Makefile +++ b/programs/src/wiki/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -32,38 +32,26 @@ CXXFLAGS := \ -Wall \ -Wextra \ -Wno-unused-parameter \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -mno-80387 \ -mno-mmx \ -mno-sse \ -mno-sse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(LIBC_INC) \ - -I $(BEARSSL)/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(BEARSSL)/inc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Libraries ---- diff --git a/programs/src/wikipedia/Makefile b/programs/src/wikipedia/Makefile index 0a21d5d..5e72f1f 100644 --- a/programs/src/wikipedia/Makefile +++ b/programs/src/wikipedia/Makefile @@ -6,11 +6,11 @@ MAKEFLAGS += -rR # ---- Toolchain ---- -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif # ---- Paths ---- @@ -33,36 +33,24 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(LIBC_INC) \ - -I $(BEARSSL)/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I $(BEARSSL)/inc # ---- Linker flags ---- LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) # ---- Libraries ---- diff --git a/programs/src/wordprocessor/Makefile b/programs/src/wordprocessor/Makefile index 52a24ef..ef8b33a 100644 --- a/programs/src/wordprocessor/Makefile +++ b/programs/src/wordprocessor/Makefile @@ -4,11 +4,11 @@ MAKEFLAGS += -rR .SUFFIXES: -TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf- -ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) - CXX := $(TOOLCHAIN_PREFIX)g++ +TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk- +ifeq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),) + CXX = $(error x86_64-montauk toolchain not found. Run ./toolchain/build-montauk-toolchain.sh first) else - CXX := g++ + CXX := $(TOOLCHAIN_PREFIX)g++ endif PROG_INC := ../../include @@ -24,34 +24,22 @@ CXXFLAGS := \ -Wextra \ -Wno-unused-parameter \ -Wno-unused-function \ - -nostdinc \ -ffreestanding \ -fno-stack-protector \ -fno-stack-check \ - -fno-PIC \ -fno-rtti \ -fno-exceptions \ -ffunction-sections \ -fdata-sections \ - -m64 \ - -march=x86-64 \ -msse \ -msse2 \ - -mno-red-zone \ - -mcmodel=small \ -I $(PROG_INC) \ -isystem $(PROG_INC)/libc \ - -I ../../lib/bearssl/inc \ - -isystem ../../../kernel/freestnd-c-hdrs/x86_64/include \ - -isystem ../../../kernel/freestnd-cxx-hdrs/x86_64/include + -I ../../lib/bearssl/inc LDFLAGS := \ -nostdlib \ - -static \ - -Wl,--build-id=none \ -Wl,--gc-sections \ - -Wl,-m,elf_x86_64 \ - -z max-page-size=0x1000 \ -T $(LINK_LD) SRCS := main.cpp document.cpp render.cpp input.cpp print_export.cpp stb_truetype_impl.cpp