Oops -- restore native build of textproc/enca with CC_FOR_BUILD=CC.

This commit is contained in:
riastradh 2013-05-10 14:33:01 +00:00
parent f523ac626c
commit 436c5f6889
3 changed files with 37 additions and 6 deletions

View file

@ -1,9 +1,9 @@
$NetBSD: distinfo,v 1.4 2013/05/10 05:27:38 riastradh Exp $
$NetBSD: distinfo,v 1.5 2013/05/10 14:33:01 riastradh Exp $
SHA1 (enca-1.14.tar.bz2) = 9aacb595da981f40a5fa0dadb886f3efeca933f4
RMD160 (enca-1.14.tar.bz2) = 2e4442b905ad6935241b8f47434429ebfd55fbbc
Size (enca-1.14.tar.bz2) = 560982 bytes
SHA1 (patch-configure) = 04fe66b700e0886f1d28be7439f9b16e6d9c8b75
SHA1 (patch-configure.ac) = b1a5fa52c7edc5893f4841675cf4bfdd20a2f544
SHA1 (patch-configure) = 944b3da85306353fec793aa1de014e4949dbdfeb
SHA1 (patch-configure.ac) = e19dd68be397805bf7874da621e0c61c73a80d11
SHA1 (patch-tools_Makefile.am) = 1716a9b1675f1bed89e3f79c7ab8dcecea0f2455
SHA1 (patch-tools_Makefile.in) = 885fe42ecc4f5daad9204fbe415eb77b99f2399d

View file

@ -1,4 +1,4 @@
$NetBSD: patch-configure,v 1.1 2013/05/10 05:27:39 riastradh Exp $
$NetBSD: patch-configure,v 1.2 2013/05/10 14:33:01 riastradh Exp $
Pass CC_FOR_BUILD through for make_hash.
@ -12,3 +12,19 @@ Pass CC_FOR_BUILD through for make_hash.
SHELL_RANDOM_FILENAME
DEFAULT_CONVERTER_LIST
DEFAULT_EXTERNAL_CONVERTER
@@ -12446,6 +12447,15 @@ else
$as_echo "no" >&6; }
fi
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = xno; then
+ CC_FOR_BUILD="$CC"
+ else
+ as_fn_error $? "can't compile tools on host without CC_FOR_BUILD" "$LINENO" 5
+ fi
+fi
+
+
if test "$GCC" = yes; then

View file

@ -1,10 +1,25 @@
$NetBSD: patch-configure.ac,v 1.1 2013/05/10 05:27:39 riastradh Exp $
$NetBSD: patch-configure.ac,v 1.2 2013/05/10 14:33:01 riastradh Exp $
Pass CC_FOR_BUILD through for make_hash.
--- configure.ac.orig 2012-09-11 09:11:11.000000000 +0000
+++ configure.ac
@@ -207,6 +206,7 @@ AC_SUBST(CONVERTER_LIBS)
@@ -46,6 +46,14 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_PROG(MKTEMP_PROG, mktemp)
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = xno; then
+ CC_FOR_BUILD="$CC"
+ else
+ AC_MSG_ERROR([can't compile tools on host without CC_FOR_BUILD])
+ fi
+fi
+
dnl With GCC, be paranoiac. It should compile really cleanly.
dnl Except -Wno-sign-compare, but older gcc's don't know it.
if test "$GCC" = yes; then
@@ -207,6 +215,7 @@ AC_SUBST(CONVERTER_LIBS)
AC_SUBST(DEFAULT_EXTERNAL_CONVERTER)
AC_SUBST(DEFAULT_CONVERTER_LIST)
AC_SUBST(SHELL_RANDOM_FILENAME)