From 607827292053aa25d0f0300add0798dd085a9131 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 15 Mar 2015 20:46:36 -0400 Subject: compiler building blocks: add support for custom build variables. feature detection: set a fallback value of 'yes' to modern assembler presence, PE dward support, libc-provided stack protector, and dynamic-loader header iteration. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- libgcc/Makefile.in | 11 +++++++++-- libgcc/configure | 7 +++++++ libgcc/configure.ac | 7 +++++++ 3 files changed, 23 insertions(+), 2 deletions(-) (limited to 'libgcc') diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index b57aeb657..f3b21309d 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -172,7 +172,14 @@ RANLIB_FOR_TARGET = $(RANLIB) STRIP = @STRIP@ STRIP_FOR_TARGET = $(STRIP) + +# Compiler Building Blocks variables +cbb_xgcc_for_specs = @cbb_xgcc_for_specs@ +cbb_ldflags_for_target = @cbb_ldflags_for_target@ + + # Directory in which the compiler finds libraries etc. +version := $(shell $(cbb_xgcc_for_specs) -dumpversion) libsubdir = $(libdir)/gcc/$(host_noncanonical)/$(version) # Used to install the shared libgcc. slibdir = @slibdir@ @@ -201,7 +208,7 @@ export slibdir export toolexecdir export toolexeclibdir -version := $(shell $(CC) -dumpversion) + ifeq ($(decimal_float),yes) ifeq ($(enable_decimal_float),bid) @@ -773,7 +780,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) endif ifeq ($(enable_shared),yes) -all: libgcc_eh.a libgcc_s$(SHLIB_EXT) +all: libgcc_eh.a libgcc_s$(SHLIB_EXT) $(libgcc-crt-objects) ifneq ($(LIBUNWIND),) all: libunwind$(SHLIB_EXT) endif diff --git a/libgcc/configure b/libgcc/configure index 8a27aab18..70290a2a4 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -5116,3 +5116,10 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + +# Compiler Building Blocks variables +sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ + -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ + -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ + Makefile || exit 2 + diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 7dbe114e3..282cacac9 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -290,3 +290,10 @@ libgcc_topdir=${libgcc_topdir} CC="${CC}" ]]) AC_OUTPUT + + +# Compiler Building Blocks variables +sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ + -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ + -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ + Makefile || exit 2 -- cgit v1.2.3