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. --- libobjc/Makefile.in | 15 +++++++++++++-- libobjc/configure | 7 +++++++ libobjc/configure.ac | 7 +++++++ 3 files changed, 27 insertions(+), 2 deletions(-) (limited to 'libobjc') diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in index b33c989e6..592dd7ded 100644 --- a/libobjc/Makefile.in +++ b/libobjc/Makefile.in @@ -22,6 +22,12 @@ #Makefile.in files. Some of this stuff may be unnecessary and #worthless. + +# Compiler Building Blocks variables +cbb_xgcc_for_specs = @cbb_xgcc_for_specs@ +cbb_ldflags_for_target = @cbb_ldflags_for_target@ + + SHELL = @SHELL@ MAKEOVERRIDES= @@ -207,11 +213,16 @@ OBJS_GC = \ ## The rules to build ## +# cbb: allow using a target-specific compiler +ifeq ($(GCC_FOR_TARGET),) +GCC_FOR_TARGET = $(CC) +endif + # Flags to pass to a recursive make. FLAGS_TO_PASS = \ "AR=$(AR)" \ "AR_FLAGS=$(AR_FLAGS)" \ - "CC=$(CC)" \ + "CC=$(GCC_FOR_TARGET)" \ "CFLAGS=$(CFLAGS)" \ "DESTDIR=$(DESTDIR)" \ "LIBCFLAGS=$(LIBCFLAGS)" \ @@ -321,7 +332,7 @@ install-html: install-pdf: install-info: -LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) +LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) $(cbb_ldflags_for_target) libobjc$(libsuffix).la: $(OBJS) $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \ diff --git a/libobjc/configure b/libobjc/configure index e6f0afdfa..fd5b7549c 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -13745,3 +13745,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/libobjc/configure.ac b/libobjc/configure.ac index 494a289ec..c101fad51 100644 --- a/libobjc/configure.ac +++ b/libobjc/configure.ac @@ -285,3 +285,10 @@ fi AC_CONFIG_FILES([Makefile]) 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