From e3b1063a36e0abc070153fbdf58b4f68903e74ab Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 30 Oct 2012 18:09:09 +0100 Subject: [PATCH] tool chain: gcc-4.7.1 fixes --- tool/tool_chain | 14 +++++++++----- tool/tool_chain_gcc_patches.inc | 14 +++++++------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/tool/tool_chain b/tool/tool_chain index 4f7f107e5..bfba01cfc 100755 --- a/tool/tool_chain +++ b/tool/tool_chain @@ -232,15 +232,19 @@ GCC_CONFIG += $(GCC_CONFIG_$(PLATFORM)) # # Configure options passed to gcc # -# The 't-linux' tmake file is needed to let the tool chain use 'unwind-dw2-fde-glibc', -# needed for the exception handling on Genode in the presence of shared libraries. -# HOST_CONFIG_ARGS = $(CONFIG_QUIET) \ host_xm_include_list=$(LINK_SPEC_H_$(PLATFORM)) \ tmake_file='t-slibgcc' -# passed to target components such as libgcc, libstdc++ +# +# Passed to target components such as libgcc, libstdc++ +# +# The 't-slibgcc' tmake file is needed to have libgcc_eh.a built. +# The 't-eh-dw2-dip' tmake file is needed to let the tool chain use 'unwind-dw2-fde-dip.c', +# needed for the exception handling on Genode in the presence of shared libraries. +# TARGET_CONFIG_ARGS = $(CONFIG_QUIET) \ + tmake_file='t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver' \ extra_parts='crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o' # compile libsupc++ as position-independent code @@ -337,7 +341,7 @@ $(CONTRIB_DIR)/mpc-$(MPC_VERSION)/configure: $(DOWNLOAD_DIR)/mpc-$(MPC_VERSION). $(VERBOSE)tar xfz $< -C $(CONTRIB_DIR) $(CONTRIB_DIR)/gcc-$(GCC_VERSION): $(addprefix $(DOWNLOAD_DIR)/,gcc-$(GCC_VERSION).tar.bz2) - $(ECHO) "$(BRIGHT_COL)unpacking gcc and g++...$(DEFAULT_COL)" + $(ECHO) "$(BRIGHT_COL)unpacking gcc...$(DEFAULT_COL)" $(VERBOSE)mkdir -p $(CONTRIB_DIR) $(VERBOSE)for i in $^ ; do tar xfj $$i -C $(CONTRIB_DIR) ;done $(VERBOSE)touch $@ diff --git a/tool/tool_chain_gcc_patches.inc b/tool/tool_chain_gcc_patches.inc index f323b58c5..7ed81415c 100755 --- a/tool/tool_chain_gcc_patches.inc +++ b/tool/tool_chain_gcc_patches.inc @@ -4,16 +4,16 @@ $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/configure:: $(CONTRIB_DIR)/gcc-$(GCC_VERSION) @# Enable support for passing custom 'tmake_file' and 'extra_parts' to the @# GCC configure process uncommenting the default initialization of the @# respective variables. The 'extra_parts' variable is used to carry the - @# the information about which crtN files are to be created. - @# - @# The 't-386elf' file must the treated to prevent it from defining the - @# 'EXTRA_PARTS' variable. If defined, the 'libgcc' Makefile would prepare - @# it against our custom list of 'extra_parts' and consequently fail. + @# information about which crtN files are to be created. @# $(VERBOSE)sed -i "/^tmake_file=$$/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/gcc/config.gcc $(VERBOSE)sed -i "/^extra_parts=$$/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/gcc/config.gcc - $(VERBOSE)sed -i "s/^tmake_file=$$/&\"t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver\"/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config.host - $(VERBOSE)sed -i "s/^extra_parts=$$/&\"crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o\"/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config.host + $(VERBOSE)sed -i "/^tmake_file=$$/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config.host + $(VERBOSE)sed -i "/^extra_parts=$$/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config.host + $(VERBOSE)sed -i "/extra_parts=\"crt.*\"/s/^/#/g" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config.host + @# + @# /* TODO: add documentation */ + @# $(VERBOSE)sed -i "s/^libgcov-objects = .*/libgcov-objects = /" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/Makefile.in $(VERBOSE)sed -i "s/-lc//" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config/t-{libunwind-elf,slibgcc} @#