From aa0fca163e1736e158fd3922cbbc31b85c9c7df7 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 1 May 2021 17:16:23 -0400 Subject: sim: add support for build-time ar & ranlib This is needed when building for a target whose ar & ranlib are incompatible with the current build system. For example, building for Windows on a Linux system. Then manually import the automake rule for libigen.a, but tweak the tool variables to use the FOR_BUILD variants. --- sim/erc32/ChangeLog | 4 ++++ sim/erc32/configure | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'sim/erc32') diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index a6b142a..67a763b 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,5 +1,9 @@ 2021-05-04 Mike Frysinger + * configure: Regenerate. + +2021-05-04 Mike Frysinger + * func.c (bfd_load): Use BFD_VMA_FMT. 2021-05-01 Mike Frysinger diff --git a/sim/erc32/configure b/sim/erc32/configure index bbcec31..0d2327f 100755 --- a/sim/erc32/configure +++ b/sim/erc32/configure @@ -692,7 +692,9 @@ RANLIB AR LDFLAGS_FOR_BUILD CFLAGS_FOR_BUILD +RANLIB_FOR_BUILD CC_FOR_BUILD +AR_FOR_BUILD INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM @@ -6847,11 +6849,15 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h if test "x$cross_compiling" = "xno"; then + : "${AR_FOR_BUILD:=\$(AR)}" : "${CC_FOR_BUILD:=\$(CC)}" + : "${RANLIB_FOR_BUILD:=\$(RANLIB)}" : "${CFLAGS_FOR_BUILD:=\$(CFLAGS)}" : "${LDFLAGS_FOR_BUILD:=\$(LDFLAGS)}" else + : "${AR_FOR_BUILD:=ar}" : "${CC_FOR_BUILD:=gcc}" + : "${RANLIB_FOR_BUILD:=ranlib}" : "${CFLAGS_FOR_BUILD:=-g -O}" : "${LDLFAGS_FOR_BUILD:=}" fi @@ -6860,6 +6866,8 @@ fi + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -11185,7 +11193,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11188 "configure" +#line 11196 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11291,7 +11299,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11294 "configure" +#line 11302 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -- cgit v1.1