summaryrefslogtreecommitdiffstats
path: root/core/combo/TARGET_linux-sh.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/combo/TARGET_linux-sh.mk')
-rw-r--r--core/combo/TARGET_linux-sh.mk13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/combo/TARGET_linux-sh.mk b/core/combo/TARGET_linux-sh.mk
index 036ecd7..654539c 100644
--- a/core/combo/TARGET_linux-sh.mk
+++ b/core/combo/TARGET_linux-sh.mk
@@ -105,6 +105,7 @@ TARGET_C_INCLUDES := \
TARGET_CRTBEGIN_STATIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
TARGET_CRTBEGIN_DYNAMIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
TARGET_CRTEND_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_android.o
+
TARGET_CRTBEGIN_SO_O := $(TARGET_OUT_STATIC_LIBRARIES)/sobegin.o
TARGET_CRTEND_SO_O := $(TARGET_OUT_STATIC_LIBRARIES)/soend.o
@@ -119,7 +120,7 @@ $(hide) $(PRIVATE_CXX) \
-Wl,--gc-sections -Wl,-z,norelro \
-Wl,-shared,-Bsymbolic \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
- $(PRIVATE_TARGET_CRTBEGIN_SO_O) \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
$(PRIVATE_ALL_OBJECTS) \
-Wl,--whole-archive \
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
@@ -130,7 +131,7 @@ $(hide) $(PRIVATE_CXX) \
$(PRIVATE_LDFLAGS) \
$(subst -lrt,, $(subst -lpthread,,$(PRIVATE_LDLIBS))) \
$(PRIVATE_TARGET_LIBGCC) \
- $(PRIVATE_TARGET_CRTEND_SO_O)
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_SO_O))
endef
define transform-o-to-executable-inner
@@ -142,13 +143,13 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/shlelf.x \
$(TARGET_GLOBAL_LD_DIRS) \
-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
- $(TARGET_CRTBEGIN_DYNAMIC_O) \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
$(PRIVATE_ALL_OBJECTS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(PRIVATE_LDFLAGS) \
$(TARGET_LIBGCC) \
$(subst -lrt,, $(subst -lpthread,,$(PRIVATE_LDLIBS))) \
- $(TARGET_CRTEND_O)
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
endef
define transform-o-to-static-executable-inner
@@ -156,11 +157,11 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bstatic -Wl,-T,$(BUILD_SYSTEM)/shlelf.x \
-Wl,--gc-sections -Wl,-z,norelro \
-o $@ \
$(TARGET_GLOBAL_LD_DIRS) \
- $(TARGET_CRTBEGIN_STATIC_O) \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_STATIC_O)) \
$(PRIVATE_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(TARGET_LIBGCC) \
$(subst -lrt,, $(subst -lpthread,,$(PRIVATE_LDLIBS))) \
- $(TARGET_CRTEND_O)
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
endef