Skip to content

Commit

Permalink
Make crt0 an external submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Feb 27, 2024
1 parent be433fa commit 8f7d2e3
Show file tree
Hide file tree
Showing 37 changed files with 8 additions and 16,312 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
[submodule "system_properties"]
path = native/src/external/system_properties
url = https://github.com/topjohnwu/system_properties.git
[submodule "crt0"]
path = native/src/external/crt0
url = https://github.com/topjohnwu/crt0.git
[submodule "termux-elf-cleaner"]
path = tools/termux-elf-cleaner
url = https://github.com/termux/termux-elf-cleaner.git
3 changes: 0 additions & 3 deletions native/src/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ LOCAL_SRC_FILES := \
LOCAL_LDFLAGS := -static -T src/lto_fix.lds

ifdef B_CRT0
# -lc -lm is hardcoded in this variable, disable it
TARGET_LDLIBS :=
LOCAL_STATIC_LIBRARIES += crt0
LOCAL_LDFLAGS :=
endif
Expand Down Expand Up @@ -172,7 +170,6 @@ include $(BUILD_STATIC_LIBRARY)
include src/Android-rs.mk
include src/base/Android.mk
include src/external/Android.mk
include src/crt0/Android.mk

ifdef B_BB

Expand Down
1 change: 0 additions & 1 deletion native/src/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ifdef B_CRT0

# Disable all security and debugging features
APP_CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-stack-protector -U_FORTIFY_SOURCE
APP_LDFLAGS += -Wl,-wrap,abort_message
# Override output folder to make sure all dependencies are rebuilt with new CFLAGS
NDK_APP_OUT := ./obj/nolibc

Expand Down
24 changes: 0 additions & 24 deletions native/src/crt0/Android.mk

This file was deleted.

168 changes: 0 additions & 168 deletions native/src/crt0/bionic/dirent.cpp

This file was deleted.

36 changes: 0 additions & 36 deletions native/src/crt0/bionic/private/ErrnoRestorer.h

This file was deleted.

115 changes: 0 additions & 115 deletions native/src/crt0/bionic/private/bionic_asm.h

This file was deleted.

0 comments on commit 8f7d2e3

Please sign in to comment.