1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:57:35 +00:00

Switch over to building everything with i686-elf-g++.

This commit is contained in:
Andreas Kling 2019-02-22 10:45:32 +01:00
parent afa6f88039
commit 75b100673f
17 changed files with 58 additions and 75 deletions

View file

@ -6,14 +6,6 @@ AK_OBJS = \
../AK/StdLibExtras.o \
../AK/kmalloc.o
SHAREDGRAPHICS_OBJS = \
../SharedGraphics/Painter.o \
../SharedGraphics/Font.o \
../SharedGraphics/Rect.o \
../SharedGraphics/GraphicsBitmap.o \
../SharedGraphics/CharacterBitmap.o \
../SharedGraphics/Color.o
LIBC_OBJS = \
stdio.o \
unistd.o \
@ -49,24 +41,24 @@ LIBC_OBJS = \
ASM_OBJS = setjmp.no
CPP_OBJS = $(AK_OBJS) $(WIDGETS_OBJS) $(LIBC_OBJS) $(SHAREDGRAPHICS_OBJS)
CPP_OBJS = $(AK_OBJS) $(WIDGETS_OBJS) $(LIBC_OBJS)
LIBRARY = LibC.a
ARCH_FLAGS =
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc
LIBC_FLAGS = -ffreestanding -fno-stack-protector -fno-builtin
LIBC_FLAGS =
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.
DEFINES = -DSERENITY -DUSERLAND -DSANITIZE_PTRS
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(LIBC_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
CXX = clang
LD = ld
CXX = i686-elf-g++
LD = i686-elf-ld
AR = ar
LDFLAGS = -T linker.ld --strip-debug -melf_i386 --gc-sections
LDFLAGS = -T linker.ld
all: $(LIBRARY)

View file

@ -102,7 +102,7 @@ int memcmp(const void* v1, const void* v2, size_t n)
return 0;
}
void* memcpy(void* dest_ptr, const void* src_ptr, dword n)
void* memcpy(void* dest_ptr, const void* src_ptr, size_t n)
{
if (n >= 1024)
return mmx_memcpy(dest_ptr, src_ptr, n);
@ -130,7 +130,7 @@ void* memcpy(void* dest_ptr, const void* src_ptr, dword n)
return dest_ptr;
}
void* memset(void* dest_ptr, int c, dword n)
void* memset(void* dest_ptr, int c, size_t n)
{
dword dest = (dword)dest_ptr;
// FIXME: Support starting at an unaligned address.
@ -293,7 +293,5 @@ char* strpbrk(const char* s, const char* accept)
return nullptr;
}
}

View file

@ -17,7 +17,7 @@ typedef uint32_t uid_t;
typedef uint32_t gid_t;
typedef int16_t pid_t;
typedef uint32_t size_t;
typedef __SIZE_TYPE__ size_t;
typedef int32_t ssize_t;
typedef uint32_t ino_t;