diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-01 17:16:23 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-04 08:22:07 -0400 |
commit | aa0fca163e1736e158fd3922cbbc31b85c9c7df7 (patch) | |
tree | ece0136b2492db8771756b3214a5fa2cab121f63 /sim/m4 | |
parent | 5ee0bc23a68fe2a6a7717b31fda1db878b2c9764 (diff) | |
download | gdb-aa0fca163e1736e158fd3922cbbc31b85c9c7df7.zip gdb-aa0fca163e1736e158fd3922cbbc31b85c9c7df7.tar.gz gdb-aa0fca163e1736e158fd3922cbbc31b85c9c7df7.tar.bz2 |
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.
Diffstat (limited to 'sim/m4')
-rw-r--r-- | sim/m4/sim_ac_toolchain.m4 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sim/m4/sim_ac_toolchain.m4 b/sim/m4/sim_ac_toolchain.m4 index 9cf7027..2f1a428 100644 --- a/sim/m4/sim_ac_toolchain.m4 +++ b/sim/m4/sim_ac_toolchain.m4 @@ -26,15 +26,21 @@ AC_PROG_INSTALL dnl Setup toolchain settings for build-time tools.. 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 +AC_SUBST(AR_FOR_BUILD) AC_SUBST(CC_FOR_BUILD) +AC_SUBST(RANLIB_FOR_BUILD) AC_SUBST(CFLAGS_FOR_BUILD) AC_SUBST(LDFLAGS_FOR_BUILD) |