diff options
author | Alistair Popple <alistair@popple.id.au> | 2017-07-17 14:32:10 +1000 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2017-07-17 14:32:10 +1000 |
commit | f77aa364ae56527c053002a28febd45d7945b5d6 (patch) | |
tree | be845d024b61028de579be53140c601eb21e824c | |
parent | b22d0f81ac0521a55d3877220d3d33302c5201af (diff) | |
download | pdbg-f77aa364ae56527c053002a28febd45d7945b5d6.tar.gz pdbg-f77aa364ae56527c053002a28febd45d7945b5d6.zip |
configure.ac: Use host objcopy
We were using the system objcopy which doesn't always recognise the host file
formats. Instead use the target objcopy.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index de9eb20..20c32dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,4 +60,4 @@ p9w-fsi.dtb.o: p9w-fsi.dts p9-fsi.dtsi # unflattening the device-tree dd if=$@.tmp of=$@ ibs=16 conv=sync rm $@.tmp - objcopy -I binary -O @ARCH_FF@ $@ $@ + $(OBJCOPY) -I binary -O @ARCH_FF@ $@ $@ diff --git a/configure.ac b/configure.ac index 11dfe59..95c8514 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,9 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile]) AC_LANG(C) AC_SUBST([ARCH_FF]) +AC_CHECK_TOOL([OBJDUMP], [objdump]) +AC_CHECK_TOOL([OBJCOPY], [objcopy]) +AC_SUBST([OBJCOPY]) AC_COMPILE_IFELSE( [AC_LANG_SOURCE([[]])], ARCH_FF=$(${OBJDUMP} -f conftest.$OBJEXT | |