1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 15:57:36 +00:00

Build LibC and Userland with clang as well.

This commit is contained in:
Andreas Kling 2018-11-09 14:29:00 +01:00
parent ebf308d413
commit 4914f3b837
8 changed files with 46 additions and 37 deletions

View file

@ -45,13 +45,13 @@ STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc
USERLAND_FLAGS = -ffreestanding -fno-stack-protector -fno-ident
WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings
FLAVOR_FLAGS = -march=i386 -mregparm=3 -m32 -fno-exceptions -fno-rtti -fmerge-all-constants -fno-unroll-loops -fno-pie -fno-pic
OPTIMIZATION_FLAGS = -Os -fno-asynchronous-unwind-tables
OPTIMIZATION_FLAGS = -Oz -fno-asynchronous-unwind-tables
INCLUDE_FLAGS = -I.. -I. -I../LibC
DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND
CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
CXX = g++-8
CXX = clang
LD = ld
AR = ar
LDFLAGS = -static --strip-debug -melf_i386 --build-id=none -z norelro -z now -e _start --gc-sections

View file

@ -1,4 +1,6 @@
int main()
#include <sys/cdefs.h>
int main(int, char**)
{
return 1;
}

View file

@ -4,6 +4,8 @@
#include <grp.h>
#include <alloca.h>
extern "C" int main(int, char**);
int main(int argc, char** argv)
{
(void) argc;

View file

@ -1,4 +1,6 @@
int main()
#include <sys/cdefs.h>
int main(int, char**)
{
return 0;
}