diff --git a/cpp.mk b/cpp.mk index 81520978..da3d870b 100644 --- a/cpp.mk +++ b/cpp.mk @@ -4,7 +4,7 @@ OC=x86_64-elf-objcopy AR=x86_64-elf-ar WARNING_FLAGS=-Wall -Wextra -pedantic -Wold-style-cast -Wshadow -COMMON_CPP_FLAGS=-masm=intel -Iinclude/ -nostdlib -g -Os -std=c++11 -fno-stack-protector -fno-exceptions -funsigned-char -fno-rtti -ffreestanding -fomit-frame-pointer -mno-red-zone -mno-3dnow -mno-mmx -fno-asynchronous-unwind-tables +COMMON_CPP_FLAGS=-masm=intel -I../../tstl/include/ -I../tstl/include/ -Iinclude/ -nostdlib -g -Os -std=c++11 -fno-stack-protector -fno-exceptions -funsigned-char -fno-rtti -ffreestanding -fomit-frame-pointer -mno-red-zone -mno-3dnow -mno-mmx -fno-asynchronous-unwind-tables CPP_FLAGS_LOW=-march=i386 -m32 -fno-strict-aliasing -fno-pic -fno-toplevel-reorder -mno-sse -mno-sse2 -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 diff --git a/kernel/include/ata.hpp b/kernel/include/ata.hpp index eff9f297..30805175 100644 --- a/kernel/include/ata.hpp +++ b/kernel/include/ata.hpp @@ -8,8 +8,8 @@ #ifndef ATA_H #define ATA_H -#include "stl/types.hpp" -#include "stl/string.hpp" +#include +#include namespace ata { diff --git a/kernel/include/buddy_allocator.hpp b/kernel/include/buddy_allocator.hpp index 22dbe45d..2e8b51ce 100644 --- a/kernel/include/buddy_allocator.hpp +++ b/kernel/include/buddy_allocator.hpp @@ -8,7 +8,7 @@ #ifndef BUDDY_ALLOCATOR_H #define BUDDY_ALLOCATOR_H -#include "stl/array.hpp" +#include #include "bitmap.hpp" diff --git a/kernel/include/console.hpp b/kernel/include/console.hpp index 4a3a0fb3..8f6852c4 100644 --- a/kernel/include/console.hpp +++ b/kernel/include/console.hpp @@ -8,9 +8,9 @@ #ifndef CONSOLE_H #define CONSOLE_H -#include "stl/types.hpp" -#include "stl/enable_if.hpp" -#include "stl/string.hpp" +#include +#include +#include void init_console(); diff --git a/kernel/include/datetime.hpp b/kernel/include/datetime.hpp index 96fa3135..c589679d 100644 --- a/kernel/include/datetime.hpp +++ b/kernel/include/datetime.hpp @@ -8,7 +8,7 @@ #ifndef DATETIME_H #define DATETIME_H -#include "stl/types.hpp" +#include struct datetime { uint8_t year; diff --git a/kernel/include/disks.hpp b/kernel/include/disks.hpp index b473801f..bb95b1a6 100644 --- a/kernel/include/disks.hpp +++ b/kernel/include/disks.hpp @@ -10,10 +10,10 @@ #include "datetime.hpp" -#include "stl/types.hpp" -#include "stl/array.hpp" -#include "stl/vector.hpp" -#include "stl/string.hpp" +#include +#include +#include +#include namespace disks { diff --git a/kernel/include/e820.hpp b/kernel/include/e820.hpp index 29c969fe..6962b14e 100644 --- a/kernel/include/e820.hpp +++ b/kernel/include/e820.hpp @@ -11,7 +11,7 @@ * mode. */ -#include "stl/types.hpp" +#include #ifndef E820_HPP #define E820_HPP diff --git a/kernel/include/elf.hpp b/kernel/include/elf.hpp index 841da2dc..1733e9eb 100644 --- a/kernel/include/elf.hpp +++ b/kernel/include/elf.hpp @@ -8,8 +8,8 @@ #ifndef ELF_H #define ELF_H -#include "stl/types.hpp" -#include "stl/string.hpp" +#include +#include namespace elf { diff --git a/kernel/include/fat32.hpp b/kernel/include/fat32.hpp index e69a670b..477d72c4 100644 --- a/kernel/include/fat32.hpp +++ b/kernel/include/fat32.hpp @@ -8,10 +8,10 @@ #ifndef FAT32_H #define FAT32_H -#include "disks.hpp" +#include +#include -#include "stl/vector.hpp" -#include "stl/string.hpp" +#include "disks.hpp" namespace fat32 { diff --git a/kernel/include/gdt.hpp b/kernel/include/gdt.hpp index bd294ab8..9c2b9561 100644 --- a/kernel/include/gdt.hpp +++ b/kernel/include/gdt.hpp @@ -8,7 +8,7 @@ #ifndef GDT_H #define GDT_H -#include "stl/types.hpp" +#include namespace gdt { diff --git a/kernel/include/interrupts.hpp b/kernel/include/interrupts.hpp index 413336b9..ccc6c6d0 100644 --- a/kernel/include/interrupts.hpp +++ b/kernel/include/interrupts.hpp @@ -8,7 +8,7 @@ #ifndef INTERRUPTS_H #define INTERRUPTS_H -#include "stl/types.hpp" +#include namespace interrupt { diff --git a/kernel/include/kernel_utils.hpp b/kernel/include/kernel_utils.hpp index 31f81ad9..79091027 100644 --- a/kernel/include/kernel_utils.hpp +++ b/kernel/include/kernel_utils.hpp @@ -8,7 +8,7 @@ #ifndef KERNEL_UTILS_H #define KERNEL_UTILS_H -#include "stl/types.hpp" +#include uint8_t in_byte(uint16_t _port); void out_byte(uint16_t _port, uint8_t _data); diff --git a/kernel/include/keyboard.hpp b/kernel/include/keyboard.hpp index 14db4d98..dbfd7417 100644 --- a/kernel/include/keyboard.hpp +++ b/kernel/include/keyboard.hpp @@ -8,7 +8,7 @@ #ifndef KEYBOARD_H #define KEYBOARD_H -#include "stl/types.hpp" +#include namespace keyboard { diff --git a/kernel/include/malloc.hpp b/kernel/include/malloc.hpp index fb9c8797..27c08146 100644 --- a/kernel/include/malloc.hpp +++ b/kernel/include/malloc.hpp @@ -8,7 +8,7 @@ #ifndef MALLOC_H #define MALLOC_H -#include "stl/types.hpp" +#include namespace malloc { diff --git a/kernel/include/paging.hpp b/kernel/include/paging.hpp index b027662a..c58246c9 100644 --- a/kernel/include/paging.hpp +++ b/kernel/include/paging.hpp @@ -8,8 +8,8 @@ #ifndef PAGING_H #define PAGING_H -#include "stl/types.hpp" -#include "stl/literals.hpp" +#include +#include #include "virtual_allocator.hpp" diff --git a/kernel/include/physical_allocator.hpp b/kernel/include/physical_allocator.hpp index 5232f329..9bee5b41 100644 --- a/kernel/include/physical_allocator.hpp +++ b/kernel/include/physical_allocator.hpp @@ -8,7 +8,7 @@ #ifndef PHYSICAL_ALLOCATOR_H #define PHYSICAL_ALLOCATOR_H -#include "stl/types.hpp" +#include namespace physical_allocator { diff --git a/kernel/include/process.hpp b/kernel/include/process.hpp index 06bc5d76..b73821ff 100644 --- a/kernel/include/process.hpp +++ b/kernel/include/process.hpp @@ -8,8 +8,8 @@ #ifndef PROCESS_H #define PROCESS_H -#include "stl/types.hpp" -#include "stl/vector.hpp" +#include +#include #include "paging.hpp" #include "interrupts.hpp" diff --git a/kernel/include/rtc.hpp b/kernel/include/rtc.hpp index 6d345ff0..6dfc43d2 100644 --- a/kernel/include/rtc.hpp +++ b/kernel/include/rtc.hpp @@ -8,7 +8,7 @@ #ifndef RTC_H #define RTC_H -#include "stl/types.hpp" +#include namespace rtc { diff --git a/kernel/include/scheduler.hpp b/kernel/include/scheduler.hpp index b388ba9a..5a8dad54 100644 --- a/kernel/include/scheduler.hpp +++ b/kernel/include/scheduler.hpp @@ -8,7 +8,7 @@ #ifndef SCHEDULER_H #define SCHEDULER_H -#include "stl/string.hpp" +#include #include "process.hpp" diff --git a/kernel/include/semaphore.hpp b/kernel/include/semaphore.hpp index ac1454d4..c3d805be 100644 --- a/kernel/include/semaphore.hpp +++ b/kernel/include/semaphore.hpp @@ -8,8 +8,8 @@ #ifndef SEMAPHORE_H #define SEMAPHORE_H -#include "stl/queue.hpp" -#include "stl/lock_guard.hpp" +#include +#include #include "spinlock.hpp" #include "scheduler.hpp" diff --git a/kernel/include/sleep_queue.hpp b/kernel/include/sleep_queue.hpp index f60c6c03..a35e367b 100644 --- a/kernel/include/sleep_queue.hpp +++ b/kernel/include/sleep_queue.hpp @@ -8,8 +8,8 @@ #ifndef SLEEP_QUEUE_H #define SLEEP_QUEUE_H -#include "stl/queue.hpp" -#include "stl/lock_guard.hpp" +#include +#include #include "spinlock.hpp" #include "scheduler.hpp" diff --git a/kernel/include/sysinfo.hpp b/kernel/include/sysinfo.hpp index 378a6c73..06c1e51f 100644 --- a/kernel/include/sysinfo.hpp +++ b/kernel/include/sysinfo.hpp @@ -8,8 +8,8 @@ #ifndef SYSINFO_H #define SYSINFO_H -#include "stl/string.hpp" -#include "stl/vector.hpp" +#include +#include void sysinfo_command(const std::vector& params); diff --git a/kernel/include/terminal.hpp b/kernel/include/terminal.hpp index 1fd62e15..65840697 100644 --- a/kernel/include/terminal.hpp +++ b/kernel/include/terminal.hpp @@ -8,8 +8,8 @@ #ifndef TERMINAL_H #define TERMINAL_H -#include "stl/types.hpp" -#include "stl/circular_buffer.hpp" +#include +#include #include "sleep_queue.hpp" diff --git a/kernel/include/text_console.hpp b/kernel/include/text_console.hpp index 791c867b..71acfc37 100644 --- a/kernel/include/text_console.hpp +++ b/kernel/include/text_console.hpp @@ -8,7 +8,7 @@ #ifndef TEXT_CONSOLE_H #define TEXT_CONSOLE_H -#include "stl/types.hpp" +#include struct text_console { void init(); diff --git a/kernel/include/thor.hpp b/kernel/include/thor.hpp index 1f302246..dfdc269c 100644 --- a/kernel/include/thor.hpp +++ b/kernel/include/thor.hpp @@ -8,7 +8,7 @@ #ifndef THOR_H #define THOR_H -#include "stl/types.hpp" +#include void* operator new(uint64_t size); void operator delete(void* p); diff --git a/kernel/include/timer.hpp b/kernel/include/timer.hpp index e4b423bf..f3c711a8 100644 --- a/kernel/include/timer.hpp +++ b/kernel/include/timer.hpp @@ -8,7 +8,7 @@ #ifndef TIMER_H #define TIMER_H -#include "stl/types.hpp" +#include namespace timer { diff --git a/kernel/include/vesa.hpp b/kernel/include/vesa.hpp index 260d43cf..de0590ed 100644 --- a/kernel/include/vesa.hpp +++ b/kernel/include/vesa.hpp @@ -8,7 +8,7 @@ #ifndef VESA_H #define VESA_H -#include "stl/types.hpp" +#include namespace vesa { diff --git a/kernel/include/vesa_console.hpp b/kernel/include/vesa_console.hpp index 27f9125a..0a8fd356 100644 --- a/kernel/include/vesa_console.hpp +++ b/kernel/include/vesa_console.hpp @@ -8,7 +8,7 @@ #ifndef VESA_CONSOLE_H #define VESA_CONSOLE_H -#include "stl/types.hpp" +#include struct vesa_console { void init(); diff --git a/kernel/include/virtual_allocator.hpp b/kernel/include/virtual_allocator.hpp index 65416066..914e9c1f 100644 --- a/kernel/include/virtual_allocator.hpp +++ b/kernel/include/virtual_allocator.hpp @@ -8,8 +8,8 @@ #ifndef VIRTUAL_ALLOCATOR_H #define VIRTUAL_ALLOCATOR_H -#include "stl/types.hpp" -#include "stl/literals.hpp" +#include +#include namespace virtual_allocator { diff --git a/kernel/src/acpi.cpp b/kernel/src/acpi.cpp index 404c0baa..8c145704 100644 --- a/kernel/src/acpi.cpp +++ b/kernel/src/acpi.cpp @@ -5,14 +5,14 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= +#include + #include "acpi.hpp" #include "kernel_utils.hpp" #include "timer.hpp" #include "paging.hpp" #include "console.hpp" -#include "stl/types.hpp" - namespace { uint32_t SMI_CMD; //ptr diff --git a/kernel/src/console.cpp b/kernel/src/console.cpp index c73ff05a..0c598da0 100644 --- a/kernel/src/console.cpp +++ b/kernel/src/console.cpp @@ -7,8 +7,8 @@ #include -#include "stl/types.hpp" -#include "stl/string.hpp" +#include +#include #include "console.hpp" #include "vesa.hpp" diff --git a/kernel/src/disks.cpp b/kernel/src/disks.cpp index 9c8fd548..70c69c12 100644 --- a/kernel/src/disks.cpp +++ b/kernel/src/disks.cpp @@ -5,16 +5,16 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= +#include +#include +#include + #include "disks.hpp" #include "ata.hpp" #include "thor.hpp" #include "console.hpp" #include "fat32.hpp" -#include "stl/unique_ptr.hpp" -#include "stl/array.hpp" -#include "stl/string.hpp" - namespace { //For now, 4 is enough as only the ata driver is implemented diff --git a/kernel/src/fat32.cpp b/kernel/src/fat32.cpp index 8e85bcd6..f3c159db 100644 --- a/kernel/src/fat32.cpp +++ b/kernel/src/fat32.cpp @@ -9,10 +9,10 @@ #include "console.hpp" #include "rtc.hpp" -#include "stl/types.hpp" -#include "stl/unique_ptr.hpp" -#include "stl/algorithms.hpp" -#include "stl/pair.hpp" +#include +#include +#include +#include namespace { diff --git a/kernel/src/interrupts.cpp b/kernel/src/interrupts.cpp index 379226ea..aed8a3ad 100644 --- a/kernel/src/interrupts.cpp +++ b/kernel/src/interrupts.cpp @@ -5,6 +5,8 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= +#include + #include "interrupts.hpp" #include "console.hpp" #include "kernel_utils.hpp" @@ -14,8 +16,6 @@ #include "irqs.hpp" #include "syscalls.hpp" -#include "stl/types.hpp" - namespace { struct idt_flags { diff --git a/kernel/src/paging.cpp b/kernel/src/paging.cpp index 4b70c3d4..9576b7a9 100644 --- a/kernel/src/paging.cpp +++ b/kernel/src/paging.cpp @@ -5,8 +5,8 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= -#include "stl/types.hpp" -#include "stl/algorithms.hpp" +#include +#include #include "paging.hpp" #include "kernel.hpp" diff --git a/kernel/src/scheduler.cpp b/kernel/src/scheduler.cpp index ecd6c6de..f74e91b9 100644 --- a/kernel/src/scheduler.cpp +++ b/kernel/src/scheduler.cpp @@ -5,11 +5,11 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= -#include "stl/array.hpp" -#include "stl/vector.hpp" -#include "stl/optional.hpp" -#include "stl/string.hpp" -#include "stl/lock_guard.hpp" +#include +#include +#include +#include +#include #include "scheduler.hpp" #include "paging.hpp" diff --git a/kernel/src/shell.cpp b/kernel/src/shell.cpp index f6ef264b..4a19137b 100644 --- a/kernel/src/shell.cpp +++ b/kernel/src/shell.cpp @@ -5,11 +5,11 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= -#include "stl/types.hpp" -#include "stl/algorithms.hpp" -#include "stl/vector.hpp" -#include "stl/string.hpp" -#include "stl/optional.hpp" +#include +#include +#include +#include +#include #include "shell.hpp" #include "keyboard.hpp" diff --git a/kernel/src/terminal.cpp b/kernel/src/terminal.cpp index 9a630c74..27289835 100644 --- a/kernel/src/terminal.cpp +++ b/kernel/src/terminal.cpp @@ -5,7 +5,7 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= -#include "stl/array.hpp" +#include #include "terminal.hpp" #include "keyboard.hpp" diff --git a/kernel/src/text_console.cpp b/kernel/src/text_console.cpp index 74e3ef35..61df156c 100644 --- a/kernel/src/text_console.cpp +++ b/kernel/src/text_console.cpp @@ -5,8 +5,9 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= +#include + #include "text_console.hpp" -#include "stl/algorithms.hpp" namespace { diff --git a/kernel/src/vesa.cpp b/kernel/src/vesa.cpp index 7068d451..52b4ea30 100644 --- a/kernel/src/vesa.cpp +++ b/kernel/src/vesa.cpp @@ -5,7 +5,7 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= -#include "stl/types.hpp" +#include #include "vesa.hpp" #include "paging.hpp" diff --git a/kernel/src/virtual_allocator.cpp b/kernel/src/virtual_allocator.cpp index 3bca1652..a5f084cb 100644 --- a/kernel/src/virtual_allocator.cpp +++ b/kernel/src/virtual_allocator.cpp @@ -5,7 +5,7 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= -#include "stl/array.hpp" +#include #include "virtual_allocator.hpp" #include "paging.hpp" diff --git a/tstl/include/algorithms.hpp b/tstl/include/algorithms.hpp index 6b5f5129..475f4cb8 100644 --- a/tstl/include/algorithms.hpp +++ b/tstl/include/algorithms.hpp @@ -8,6 +8,8 @@ #ifndef ALGORITHMS_H #define ALGORITHMS_H +#include + namespace std { template< class T > struct remove_reference {typedef T type;}; diff --git a/tstl/include/array.hpp b/tstl/include/array.hpp index d32a437b..19029fff 100644 --- a/tstl/include/array.hpp +++ b/tstl/include/array.hpp @@ -8,7 +8,7 @@ #ifndef ARRAY_H #define ARRAY_H -#include "stl/types.hpp" +#include namespace std { diff --git a/tstl/include/list.hpp b/tstl/include/list.hpp index bc57d9da..d7aebb9b 100644 --- a/tstl/include/list.hpp +++ b/tstl/include/list.hpp @@ -8,7 +8,7 @@ #ifndef LIST_H #define LIST_H -#include "stl/types.hpp" +#include namespace std { diff --git a/tstl/include/literals.hpp b/tstl/include/literals.hpp index fb3dbd3e..b5b88e6a 100644 --- a/tstl/include/literals.hpp +++ b/tstl/include/literals.hpp @@ -8,7 +8,7 @@ #ifndef LITERALS_HPP #define LITERALS_HPP -#include "stl/types.hpp" +#include static_assert(sizeof(size_t) == sizeof(unsigned long long), "Unmatching sizes for literals"); diff --git a/tstl/include/queue.hpp b/tstl/include/queue.hpp index f4657384..39e3b98c 100644 --- a/tstl/include/queue.hpp +++ b/tstl/include/queue.hpp @@ -8,8 +8,8 @@ #ifndef STL_QUEUE_H #define STL_QUEUE_H -#include "stl/list.hpp" -#include "stl/types.hpp" +#include +#include namespace std { diff --git a/tstl/include/string.hpp b/tstl/include/string.hpp index 69070e43..59245b76 100644 --- a/tstl/include/string.hpp +++ b/tstl/include/string.hpp @@ -8,9 +8,9 @@ #ifndef STRING_H #define STRING_H -#include "stl/types.hpp" -#include "stl/algorithms.hpp" -#include "stl/vector.hpp" +#include +#include +#include namespace std { diff --git a/tstl/include/vector.hpp b/tstl/include/vector.hpp index 5ef29616..0b01dbaf 100644 --- a/tstl/include/vector.hpp +++ b/tstl/include/vector.hpp @@ -8,8 +8,8 @@ #ifndef VECTOR_H #define VECTOR_H -#include "stl/types.hpp" -#include "stl/algorithms.hpp" +#include +#include //TODO The vector does not call any destructor