forked from genodelabs/genode-world
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go: build libgo dependencies automatically via LIBS variable (incompl…
…ete) Issue genodelabs#304
- Loading branch information
Showing
8 changed files
with
43 additions
and
62 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
LIBBACKTRACE_PORT_DIR := $(call select_from_ports,libgo) | ||
INC_DIR += $(LIBBACKTRACE_PORT_DIR)/include | ||
|
||
# checked by backtrace.h | ||
CC_OPT += -DHAVE_STDINT_H | ||
|
||
# for '_Unwind_Backtrace' and '_Unwind_GetIPInfo' | ||
EXT_OBJECTS += $(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,2 @@ | ||
LIBBACKTRACE_PORT_DIR := $(call select_from_ports,libgo) | ||
INC_DIR += $(LIB_CACHE_DIR)/libbacktrace | ||
INC_DIR += $(LIBBACKTRACE_PORT_DIR)/include | ||
# checked by backtrace.h | ||
CFLAGS += -DHAVE_STDINT_H |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
MY_BUILD_DIR := $(LIB_CACHE_DIR)/backtrace | ||
MY_TARGET := $(MY_BUILD_DIR)/.libs/libbacktrace.a | ||
|
||
# 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)/backtrace.lib.a | ||
@touch $@ | ||
|
||
include $(REP_DIR)/lib/mk/libbacktrace.inc |
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 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
include $(REP_DIR)/lib/import/import-libbacktrace.mk | ||
|
||
LIBS += libc | ||
|
||
PKG_DIR = $(call select_from_ports,libgo)/src/lib/gcc/libbacktrace | ||
EXT_OBJECTS += $(shell $(CC) $(CC_MARCH) -print-file-name=libgcc_eh.a) | ||
|
||
# to glue gnu_build.mk | ||
CUSTOM_TARGET_DEPS += built.tag | ||
|
||
CONFIGURE_ARGS += --disable-shared | ||
|
||
include $(call select_from_repositories,mk/gnu_build.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,43 +1 @@ | ||
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 ".... 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) | ||
include $(REP_DIR)/lib/mk/libbacktrace.inc |
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 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