-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consolidate libs to single port and move to 22.11
- Loading branch information
Showing
15 changed files
with
196 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
LIBBACKTRACE_PORT_DIR := $(call select_from_ports,libgo) | ||
INC_DIR += $(BUILD_BASE_DIR)/lib/libbacktrace | ||
INC_DIR += $(LIB_CACHE_DIR)/libbacktrace | ||
INC_DIR += $(LIBBACKTRACE_PORT_DIR)/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
LIBFFI_PORT_DIR := $(call select_from_ports,libgo) | ||
INC_DIR += $(BUILD_BASE_DIR)/lib/libffi | ||
INC_DIR += $(LIB_CACHE_DIR)/libffi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
LIBGO_PORT_DIR := $(call select_from_ports,libgo) | ||
|
||
INC_DIR += $(BUILD_BASE_DIR)/lib/libgo | ||
INC_DIR += $(LIBBACKTRACE_PORT_DIR)/include | ||
LIBBACKTRACE_PORT_DIR := $(call select_from_ports,libgo) | ||
|
||
# place for build go packages to be given for any compilation via -I | ||
LIBGO_PKG_BUILD := $(BUILD_BASE_DIR)/lib/libgo | ||
LIBGO_PKG_BUILD := $(LIB_CACHE_DIR)/libgo | ||
|
||
INC_DIR += $(LIBGO_PKG_BUILD) | ||
INC_DIR += $(LIBBACKTRACE_PORT_DIR)/include | ||
|
||
# add includes from build for any .go compilation | ||
CUSTOM_GO_FLAGS = -I$(LIBGO_PKG_BUILD) | ||
|
||
# additional static libraries to link gccgo executables | ||
LD_LIBGCC = \ | ||
${BUILD_BASE_DIR}/lib/libgo/libgobegin.a \ | ||
${BUILD_BASE_DIR}/lib/libgo/libgolibbegin.a \ | ||
${BUILD_BASE_DIR}/lib/libgo/.libs/libgo.a \ | ||
$(LIBGO_PKG_BUILD)/libgobegin.lib.a \ | ||
$(LIBGO_PKG_BUILD)/libgolibbegin.lib.a \ | ||
$(shell $(CC) $(CC_MARCH) -print-libgcc-file-name) \ | ||
$(shell $(CC) $(CC_MARCH) -print-file-name=libgcc_eh.a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,53 @@ | ||
LIBATOMIC_DIR := $(call select_from_ports,libgo)/src/lib/libatomic | ||
MY_BUILD_DIR := $(LIB_CACHE_DIR)/libatomic | ||
MY_TARGET := $(MY_BUILD_DIR)/.libs/libatomic.a | ||
|
||
LIBS += libc | ||
|
||
PKG_DIR = $(call select_from_ports,libgo)/src/lib/gcc/libatomic | ||
LD_OPT_NOSTDLIB := -nostdlib -Wl,-nostdlib | ||
|
||
# to glue gnu_build.mk | ||
CUSTOM_TARGET_DEPS := finished.tag | ||
|
||
$(MY_TARGET): built.tag | ||
|
||
finished.tag: $(MY_TARGET) | ||
@$(MSG_INST)$* ; \ | ||
echo ".... strip *gcc.a files from generated static library"; \ | ||
$(AR) d $(MY_TARGET) libgcc.a lt1-libgcc.a ; \ | ||
ln -sf $(MY_TARGET) $(MY_BUILD_DIR)/libatomic.lib.a; \ | ||
echo ".... copy h-files for to $(MY_BUILD_DIR)/include ....."; \ | ||
mkdir -p $(MY_BUILD_DIR)/include; \ | ||
find $(PKG_DIR)/ -name '*.h' -exec cp -fLp {} $(MY_BUILD_DIR)/include/ \; | ||
@touch $@ | ||
|
||
# add libc include to INC_DIR | ||
include $(call select_from_repositories,lib/mk/libc-common.inc) | ||
|
||
CONFIGURE_ARGS += --srcdir=$(PKG_DIR)/ \ | ||
--cache-file=./config.cache \ | ||
--disable-multilib \ | ||
--disable-shared \ | ||
--disable-libada \ | ||
--with-gnu-as \ | ||
--with-gnu-ld \ | ||
--disable-tls \ | ||
--disable-threads \ | ||
--disable-hosted-libstdcxx \ | ||
--enable-multiarch \ | ||
--disable-sjlj-exceptions \ | ||
--enable-languages=c,ada,c++,go,lto \ | ||
--disable-option-checking | ||
|
||
include $(call select_from_repositories,mk/noux.mk) | ||
|
||
# | ||
# Make the configure linking test succeed | ||
# | ||
Makefile: dummy_libs | ||
|
||
.SECONDARY: dummy_libs | ||
dummy_libs: libpthread.a | ||
|
||
libpthread.a: | ||
$(VERBOSE)$(AR) -rc $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,45 @@ | ||
LIBBACKTRACE_DIR := $(call select_from_ports,libgo)/src/lib/libbacktrace | ||
MY_BUILD_DIR := $(LIB_CACHE_DIR)/libbacktrace | ||
MY_TARGET := $(MY_BUILD_DIR)/.libs/libbacktrace.a | ||
|
||
LIBS += libc | ||
|
||
PKG_DIR = $(call select_from_ports,libgo)/src/lib/gcc/libbacktrace | ||
LD_OPT_NOSTDLIB := -nostdlib -Wl,-nostdlib | ||
EXT_OBJECTS += $(shell $(CC) $(CC_MARCH) -print-file-name=libgcc_eh.a) | ||
SHARED_LIBS += ld.lib.so | ||
|
||
# to glue gnu_build.mk | ||
CUSTOM_TARGET_DEPS := finished.tag | ||
|
||
$(MY_TARGET): built.tag | ||
|
||
finished.tag: $(MY_TARGET) | ||
@$(MSG_INST)$* ; \ | ||
ln -sf $(MY_TARGET) $(MY_BUILD_DIR)/libbacktrace.lib.a; \ | ||
echo ".... strip *gcc.a files from generated static library"; \ | ||
$(AR) d $(MY_TARGET) libgcc_eh.a libgcc.a lt1-libgcc_eh.a lt2-libgcc.a ; \ | ||
echo ".... copy h-files for to $(MY_BUILD_DIR)/include ....."; \ | ||
mkdir -p $(MY_BUILD_DIR)/include; \ | ||
cp $(MY_BUILD_DIR)/gstdint.h $(MY_BUILD_DIR)/include/; \ | ||
find $(PKG_DIR)/ -name '*.h' -exec cp -fLp {} $(MY_BUILD_DIR)/include/ \; | ||
@touch $@ | ||
|
||
# add libc include to INC_DIR | ||
include $(call select_from_repositories,lib/mk/libc-common.inc) | ||
|
||
CONFIGURE_ARGS += --srcdir=$(PKG_DIR)/ \ | ||
--cache-file=./config.cache \ | ||
--disable-multilib \ | ||
--disable-shared \ | ||
--disable-libada \ | ||
--with-gnu-as \ | ||
--with-gnu-ld \ | ||
--disable-tls \ | ||
--disable-threads \ | ||
--disable-hosted-libstdcxx \ | ||
--enable-multiarch \ | ||
--disable-sjlj-exceptions \ | ||
--enable-languages=c,ada,c++,go,lto \ | ||
--disable-option-checking | ||
|
||
include $(call select_from_repositories,mk/noux.mk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,39 @@ | ||
LIBFFI_DIR := $(call select_from_ports,libgo)/src/lib/libffi | ||
MY_BUILD_DIR := $(LIB_CACHE_DIR)/libffi | ||
MY_TARGET := $(MY_BUILD_DIR)/.libs/libffi.a | ||
|
||
LIBS += libc | ||
|
||
PKG_DIR = $(call select_from_ports,libgo)/src/lib/gcc/libffi | ||
LD_OPT_NOSTDLIB := -nostdlib -Wl,-nostdlib | ||
|
||
# to glue gnu_build.mk | ||
CUSTOM_TARGET_DEPS := finished.tag | ||
|
||
$(MY_TARGET): built.tag | ||
|
||
finished.tag: $(MY_TARGET) | ||
@$(MSG_INST)$* ; \ | ||
echo ".... strip *gcc.a files from generated static library"; \ | ||
$(AR) d $(MY_TARGET) libgcc.a lt1-libgcc.a ; \ | ||
ln -sf $(MY_TARGET) $(MY_BUILD_DIR)/libffi.lib.a | ||
@touch $@ | ||
|
||
# add libc include to INC_DIR | ||
include $(call select_from_repositories,lib/mk/libc-common.inc) | ||
|
||
CONFIGURE_ARGS += --srcdir=$(PKG_DIR)/ \ | ||
--cache-file=./config.cache \ | ||
--disable-multilib \ | ||
--disable-shared \ | ||
--disable-libada \ | ||
--with-gnu-as \ | ||
--with-gnu-ld \ | ||
--disable-tls \ | ||
--disable-threads \ | ||
--disable-hosted-libstdcxx \ | ||
--enable-multiarch \ | ||
--disable-sjlj-exceptions \ | ||
--enable-languages=c,ada,c++,go,lto \ | ||
--disable-option-checking | ||
|
||
include $(call select_from_repositories,mk/noux.mk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,48 @@ | ||
LIBGO_DIR := $(call select_from_ports,libgo)/src/lib/libgo | ||
# LIBATOMIC_DIR := $(call select_from_ports,libgo)/src/lib/libatomic | ||
# LIBBACKTRACE_DIR := $(call select_from_ports,libgo)/src/lib/libbacktrace | ||
# LIBFFI_DIR := $(call select_from_ports,libgo)/src/lib/libffi | ||
MY_BUILD_DIR := $(LIB_CACHE_DIR)/libgo | ||
MY_TARGET := $(MY_BUILD_DIR)/.libs/libgo.a | ||
|
||
LIBS += libc libatomic libbacktrace libffi | ||
PKG_DIR = $(call select_from_ports,libgo)/src/lib/gcc/libgo | ||
LD_OPT_NOSTDLIB := -nostdlib -Wl,-nostdlib | ||
|
||
LIBS += libgo_support | ||
|
||
INC_DIR += $(LIB_CACHE_DIR)/libbacktrace/include | ||
|
||
# to glue gnu_build.mk | ||
CUSTOM_TARGET_DEPS := check.tag finished.tag | ||
|
||
$(MY_TARGET): built.tag | ||
|
||
# check that libatomic libbacktrace libffi already build | ||
check.tag: $(LIB_CACHE_DIR)/libatomic/finished.tag \ | ||
$(LIB_CACHE_DIR)/libbacktrace/finished.tag \ | ||
$(LIB_CACHE_DIR)/libffi/finished.tag | ||
|
||
$(LIB_CACHE_DIR)/libatomic/finished.tag \ | ||
$(LIB_CACHE_DIR)/libbacktrace/finished.tag \ | ||
$(LIB_CACHE_DIR)/libffi/finished.tag : | ||
@$(warning *** $(lastword $(subst /, ,$(@D))) should be build before libgo, for each like) | ||
@$(error make -C build/<ARCH> lib/$(lastword $(subst /, ,$(@D)))) | ||
|
||
finished.tag:: $(MY_TARGET) | ||
@$(MSG_INST)$* | ||
echo ".... strip *gcc.a files from generated static library" | ||
@$(AR) d $(MY_TARGET) base.lib.a libatomic.lib.a libbacktrace.lib.a \ | ||
libffi.lib.a libgo_support.lib.a libgcc.a lt1-base.lib.a \ | ||
lt2-libatomic.lib.a lt3-libbacktrace.lib.a lt4-libffi.lib.a \ | ||
lt5-libgo_support.lib.a lt6-libgcc.a lt2-libgo_support.lib.a lt3-libgcc.a | ||
@ln -sf $(MY_TARGET) $(MY_BUILD_DIR)/libgo.lib.a | ||
@ln -sf $(MY_BUILD_DIR)/libgobegin.a $(MY_BUILD_DIR)/libgobegin.lib.a | ||
@ln -sf $(MY_BUILD_DIR)/libgolibbegin.a $(MY_BUILD_DIR)/libgolibbegin.lib.a | ||
@touch $@ | ||
|
||
#CC_OLEVEL = -O0 | ||
|
||
CONFIGURE_ARGS += --srcdir=$(PKG_DIR)/ \ | ||
--cache-file=./config.cache \ | ||
--disable-multilib \ | ||
--disable-shared \ | ||
--enable-werror=no \ | ||
--with-gnu-ld | ||
|
||
include $(call select_from_repositories,mk/noux.mk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.