mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
Link "id" against the LibC.
We can now produce what should essentially be a runnable Serenity executable.
This commit is contained in:
parent
63764b3a65
commit
38a621c721
Notes:
sideshowbarker
2024-07-19 18:45:11 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/38a621c721a
3 changed files with 11 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
extern "C" int main(int, char**);
|
extern "C" int main(int, char**);
|
||||||
|
|
||||||
extern "C" int elf_entry()
|
extern "C" int _start()
|
||||||
{
|
{
|
||||||
// FIXME: Pass appropriate argc/argv.
|
// FIXME: Pass appropriate argc/argv.
|
||||||
main(0, nullptr);
|
main(0, nullptr);
|
||||||
|
|
2
Userland/.gitignore
vendored
Normal file
2
Userland/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
id
|
||||||
|
*.o
|
|
@ -1,6 +1,9 @@
|
||||||
OBJS = \
|
OBJS = \
|
||||||
id.o
|
id.o
|
||||||
|
|
||||||
|
APPS = \
|
||||||
|
id
|
||||||
|
|
||||||
ARCH_FLAGS =
|
ARCH_FLAGS =
|
||||||
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib
|
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib
|
||||||
USERLAND_FLAGS = -ffreestanding -fno-stack-protector -fno-ident
|
USERLAND_FLAGS = -ffreestanding -fno-stack-protector -fno-ident
|
||||||
|
@ -15,9 +18,12 @@ CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLA
|
||||||
CXX = g++
|
CXX = g++
|
||||||
LD = ld
|
LD = ld
|
||||||
AR = ar
|
AR = ar
|
||||||
LDFLAGS = -T linker.ld --strip-debug -melf_i386 --gc-sections --build-id=none -z norelro -z now
|
LDFLAGS = --strip-debug -melf_i386 --gc-sections --build-id=none -z norelro -z now
|
||||||
|
|
||||||
all: $(OBJS)
|
all: $(OBJS) $(APPS)
|
||||||
|
|
||||||
|
id: id.o
|
||||||
|
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
|
||||||
|
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||||
|
|
Loading…
Reference in a new issue