summaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/Makefile.in15
-rwxr-xr-xlibobjc/configure7
-rw-r--r--libobjc/configure.ac7
3 files changed, 27 insertions, 2 deletions
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