tool chain: gcc-4.7.1 fixes

This commit is contained in:
Christian Prochaska 2012-10-30 18:09:09 +01:00 committed by Norman Feske
parent 443d611dd2
commit e3b1063a36
2 changed files with 16 additions and 12 deletions

View File

@ -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 $@

View File

@ -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}
@#