Index: icedtea6-1.12.4/acinclude.m4 =================================================================== --- icedtea6-1.12.4.orig/acinclude.m4 2013-03-04 22:29:36.000000000 +0100 +++ icedtea6-1.12.4/acinclude.m4 2013-03-10 13:45:56.032412186 +0100 @@ -938,6 +938,21 @@ AC_SUBST(ALT_CACAO_SRC_DIR) ]) +AC_DEFUN([AC_CHECK_WITH_CC_FOR_BUILD], +[ + AC_MSG_CHECKING(for compiler used for subsidiary programs) + AC_ARG_WITH([cc-for-build], + [AS_HELP_STRING(--with-cc-for-build,specify the compiler for subsidiary (helper) programs)], + [ + CC_FOR_BUILD="${withval}" + ], + [ + CC_FOR_BUILD="\$(CC)" + ]) + AC_MSG_RESULT(${CC_FOR_BUILD}) + AC_SUBST(CC_FOR_BUILD) +]) + AC_DEFUN([IT_WITH_GCJ], [ AC_MSG_CHECKING([whether to compile ecj natively]) Index: icedtea6-1.12.4/Makefile.am =================================================================== --- icedtea6-1.12.4.orig/Makefile.am 2013-03-10 13:44:55.000000000 +0100 +++ icedtea6-1.12.4/Makefile.am 2013-03-10 13:46:27.540523062 +0100 @@ -656,6 +656,7 @@ JAVAC="" \ JAVA_HOME="" \ JDK_HOME="" \ + CC_FOR_BUILD="$(CC_FOR_BUILD)" \ OE_CFLAGS="$(OE_CFLAGS)" \ OE_CPPFLAGS="$(OE_CPPFLAGS)" \ OE_CXXFLAGS="$(OE_CXXFLAGS)" \ Index: icedtea6-1.12.4/configure.ac =================================================================== --- icedtea6-1.12.4.orig/configure.ac 2013-03-04 22:38:51.000000000 +0100 +++ icedtea6-1.12.4/configure.ac 2013-03-10 13:45:56.032412186 +0100 @@ -18,6 +18,8 @@ AC_PROG_CC AC_PROG_CXX +AC_CHECK_WITH_CC_FOR_BUILD + IT_FIND_TOOL([MAKE], [make]) IT_FIND_TOOL([GZIP], [gzip]) IT_FIND_TOOL([ANT], [ant])