summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-11-16 14:21:20 +1030
committerAlistair Popple <alistair@popple.id.au>2017-11-22 10:35:17 +1100
commit527fe54e1c95e031efd3db008c3f4e096cb3ea58 (patch)
tree8ecb73a760c8642a775143c2a7085d4720ea0505 /configure.ac
parent58950eef124fcb37687f856fc5ee7936cb4e31cc (diff)
downloadpdbg-527fe54e1c95e031efd3db008c3f4e096cb3ea58.tar.gz
pdbg-527fe54e1c95e031efd3db008c3f4e096cb3ea58.zip
Rework generation of .dtb.o
The .dtb.o files are currently generated by compiling the .dts into .dtb, and then making a pass of objcopy to turn them into an ELF file that can be linked with the rest of pdbg. Unfortunately, this objcopy logic doesn't work on all platforms, because it doesn't generate an object file with the correct ABI flags. For example, on mips32r6, it fails to build with: mipsel-buildroot-linux-gnu/bin/ld: fake.dtb.o: warning: linking abicalls files with non-abicalls files mipsel-buildroot-linux-gnu/bin/ld: fake.dtb.o: linking -mnan=legacy module with previous -mnan=2008 modules mipsel-buildroot-linux-gnu/bin/ld: failed to merge target specific data of file fake.dtb.o mipsel-buildroot-linux-gnu/bin/ld: p8-fsi.dtb.o: warning: linking abicalls files with non-abicalls files In order to fix this, we want to generate a proper object file with gcc instead of playing tricks with objcopy, and this is what this commit implement. We have a template.S file, which gets sed'ed on the fly to point to the right file / use the right symbol name, and then is fed to gcc. This allows to remove all the objdump/objcopy logic from the configure.ac script as well. This fixes build issues of pdbg seems inside the Buildroot project: http://autobuild.buildroot.net/?reason=pdbg-77158819158d1d7053a737ac090d04fdfbfe9265 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Cyril Bur <cyrilbur@gmail.com> [joel: - integrate Cyril/Stephen's tr change - fix out of tree builds] Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 0 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index cf53f76..43348d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,15 +8,4 @@ AC_CONFIG_MACRO_DIR([m4])
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 |
- sed -ne "s/.*file format //p" -e "s/.*architecture: \(.*\),.*/\1/p" |
- tr "\n" " " |
- sed -e "s/ / -B /"),
- AC_MSG_FAILURE([Unable to determine architecture output file format]))
AC_OUTPUT
OpenPOWER on IntegriCloud