diff --git a/libports/lib/import/import-libc-setjmp.mk b/libports/lib/import/import-libc-setjmp.mk new file mode 100644 index 0000000000..1f2e540bf6 --- /dev/null +++ b/libports/lib/import/import-libc-setjmp.mk @@ -0,0 +1,33 @@ +# +# Add generic libc headers to standard include search paths +# +REP_INC_DIR += include/libc + +# +# Add platform-specific libc headers to standard include search paths +# +ifeq ($(filter-out $(SPECS),x86),) + ifeq ($(filter-out $(SPECS),32bit),) + LIBC_REP_INC_DIR = include/libc-i386 + endif # 32bit + + ifeq ($(filter-out $(SPECS),64bit),) + LIBC_REP_INC_DIR = include/libc-amd64 + endif # 32bit + LIBC_REP_INC_DIR += include/libc-x86 +endif # x86 + +ifeq ($(filter-out $(SPECS),arm),) + LIBC_REP_INC_DIR = include/libc-arm +endif # ARM + +# +# If we found no valid include path for the configured target platform, +# we have to prevent the build system from building the target. This is +# done by adding an artificial requirement. +# +ifeq ($(LIBC_REP_INC_DIR),) + REQUIRES += libc_support_for_your_target_platform +endif + +REP_INC_DIR += $(LIBC_REP_INC_DIR) diff --git a/libports/lib/mk/arm/libc-gen.mk b/libports/lib/mk/arm/libc-gen.mk index 91e2e2f588..ed0b1a95a7 100644 --- a/libports/lib/mk/arm/libc-gen.mk +++ b/libports/lib/mk/arm/libc-gen.mk @@ -3,7 +3,7 @@ include $(REP_DIR)/lib/mk/libc-gen.inc LIBC_GEN_ARM_DIR = $(LIBC_DIR)/libc/arm/gen #FILTER_OUT_S += rfork_thread.S sigsetjmp.S setjmp.S _setjmp.S divsi3.S -FILTER_OUT_S += rfork_thread.S sigsetjmp.S divsi3.S +FILTER_OUT_S += rfork_thread.S sigsetjmp.S divsi3.S setjmp.S _setjmp.S FILTER_OUT_C += _set_tp.c fabs.c frexp.c modf.c SRC_S += $(filter-out $(FILTER_OUT_S),$(notdir $(wildcard $(LIBC_GEN_ARM_DIR)/*.S))) diff --git a/libports/lib/mk/arm/libc-setjmp.mk b/libports/lib/mk/arm/libc-setjmp.mk new file mode 100644 index 0000000000..15277c2eb5 --- /dev/null +++ b/libports/lib/mk/arm/libc-setjmp.mk @@ -0,0 +1,7 @@ +LIBC_GEN_ARM_DIR = $(LIBC_DIR)/libc/arm/gen + +SRC_S = _setjmp.S setjmp.S + +include $(REP_DIR)/lib/mk/libc-common.inc + +vpath %.S $(LIBC_GEN_ARM_DIR) diff --git a/libports/lib/mk/libc.mk b/libports/lib/mk/libc.mk index 5f95a02f27..79aada8ee3 100644 --- a/libports/lib/mk/libc.mk +++ b/libports/lib/mk/libc.mk @@ -3,7 +3,7 @@ # LIBS = libc-string libc-locale libc-stdlib libc-stdio libc-gen libc-gdtoa \ - libc-inet libc-stdtime libc-regex libc-compat + libc-inet libc-stdtime libc-regex libc-compat libc-setjmp LIBS += timed_semaphore cxx # diff --git a/libports/lib/mk/x86_32/libc-gen.mk b/libports/lib/mk/x86_32/libc-gen.mk index e4b763ed6e..be30d54142 100644 --- a/libports/lib/mk/x86_32/libc-gen.mk +++ b/libports/lib/mk/x86_32/libc-gen.mk @@ -2,7 +2,7 @@ include $(REP_DIR)/lib/mk/libc-gen.inc LIBC_GEN_I386_DIR = $(LIBC_DIR)/libc/i386/gen -FILTER_OUT_S += rfork_thread.S sigsetjmp.S +FILTER_OUT_S += rfork_thread.S sigsetjmp.S _setjmp.S setjmp.S FILTER_OUT_C += _set_tp.c # diff --git a/libports/lib/mk/x86_32/libc-setjmp.mk b/libports/lib/mk/x86_32/libc-setjmp.mk new file mode 100644 index 0000000000..e996bafd5f --- /dev/null +++ b/libports/lib/mk/x86_32/libc-setjmp.mk @@ -0,0 +1,7 @@ +LIBC_GEN_I386_DIR = $(LIBC_DIR)/libc/i386/gen + +SRC_S = _setjmp.S setjmp.S + +include $(REP_DIR)/lib/mk/libc-common.inc + +vpath %.S $(LIBC_GEN_I386_DIR) diff --git a/libports/lib/mk/x86_64/libc-gen.mk b/libports/lib/mk/x86_64/libc-gen.mk index 31293d8f54..1c8ce52abe 100644 --- a/libports/lib/mk/x86_64/libc-gen.mk +++ b/libports/lib/mk/x86_64/libc-gen.mk @@ -2,7 +2,7 @@ include $(REP_DIR)/lib/mk/libc-gen.inc LIBC_GEN_AMD64_DIR = $(LIBC_DIR)/libc/amd64/gen -FILTER_OUT_S += rfork_thread.S sigsetjmp.S +FILTER_OUT_S += rfork_thread.S sigsetjmp.S setjmp.S _setjmp.S FILTER_OUT_C += _set_tp.c # diff --git a/libports/lib/mk/x86_64/libc-setjmp.mk b/libports/lib/mk/x86_64/libc-setjmp.mk new file mode 100644 index 0000000000..09890264c1 --- /dev/null +++ b/libports/lib/mk/x86_64/libc-setjmp.mk @@ -0,0 +1,7 @@ +LIBC_GEN_AMD64_DIR = $(LIBC_DIR)/libc/amd64/gen + +SRC_S = _setjmp.S setjmp.S + +include $(REP_DIR)/lib/mk/libc-common.inc + +vpath %.S $(LIBC_GEN_AMD64_DIR)