summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2017-07-17 14:32:10 +1000
committerAlistair Popple <alistair@popple.id.au>2017-07-17 14:32:10 +1000
commitf77aa364ae56527c053002a28febd45d7945b5d6 (patch)
treebe845d024b61028de579be53140c601eb21e824c
parentb22d0f81ac0521a55d3877220d3d33302c5201af (diff)
downloadpdbg-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.am2
-rw-r--r--configure.ac3
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 |
OpenPOWER on IntegriCloud