From 9de7a0daaf35f91f55d7a64bebe327e71b56b67b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 5 Apr 2019 03:58:40 +0200 Subject: [PATCH] AK: Fix problem when building i686-pc-serenity toolchain from scratch. --- AK/kmalloc.h | 9 +++++---- LibC/Makefile | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/AK/kmalloc.h b/AK/kmalloc.h index d6a5966e3d5..d5bf402c76a 100644 --- a/AK/kmalloc.h +++ b/AK/kmalloc.h @@ -1,9 +1,5 @@ #pragma once -#ifndef KERNEL -#include -#endif - #if defined(SERENITY) && defined(KERNEL) #define AK_MAKE_ETERNAL \ public: \ @@ -48,4 +44,9 @@ inline void operator delete[](void* ptr) return kfree(ptr); } +inline void* operator new(size_t, void* ptr) +{ + return ptr; +} + #endif diff --git a/LibC/Makefile b/LibC/Makefile index 6910d70caba..dd2d7c839d1 100644 --- a/LibC/Makefile +++ b/LibC/Makefile @@ -65,7 +65,7 @@ AS = i686-pc-serenity-as all: $(LIBRARY) startfiles startfiles: - @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o crt0.o -c crt0.cpp + @echo "CXX crt0.o"; $(CXX) $(CXXFLAGS) -o crt0.o -c crt0.cpp cp crti.ao crti.o cp crtn.ao crtn.o