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:
parent
ebf308d413
commit
4914f3b837
8 changed files with 46 additions and 37 deletions
|
@ -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
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
int main()
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <grp.h>
|
||||
#include <alloca.h>
|
||||
|
||||
extern "C" int main(int, char**);
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void) argc;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
int main()
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue