From b52e5b06ad49f66603f846bfd1904b972392db21 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Oct 15 2021 14:48:43 +0000 Subject: build on armhfp --- diff --git a/SOURCES/elfutils-dts9-armhfp.patch b/SOURCES/elfutils-dts9-armhfp.patch new file mode 100644 index 0000000..55cfddd --- /dev/null +++ b/SOURCES/elfutils-dts9-armhfp.patch @@ -0,0 +1,32 @@ +diff -Naurp a/backends/Makefile.am b/backends/Makefile.am +--- a/backends/Makefile.am 2019-06-13 12:19:49.078487313 +0000 ++++ b/backends/Makefile.am 2019-06-13 12:21:44.137496575 +0000 +@@ -58,6 +58,8 @@ static_SRCS = i386_init.c i386_symbol.c + x86_64_retval.c x86_64_regs.c x86_64_syscall.c \ + x86_64_initreg.c x86_64_unwind.c x32_corenote.c \ + ia64_init.c ia64_symbol.c ia64_regs.c ia64_retval.c \ ++ arm_attrs.c arm_auxv.c arm_cfi.c arm_corenote.c arm_init.c \ ++ arm_initreg.c arm_regs.c arm_retval.c arm_symbol.c \ + aarch64_init.c aarch64_regs.c aarch64_symbol.c \ + aarch64_corenote.c aarch64_retval.c aarch64_cfi.c \ + aarch64_initreg.c aarch64_unwind.c \ +diff -Naurp a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c +--- a/libebl/eblopenbackend.c 2019-06-13 12:19:49.083487139 +0000 ++++ b/libebl/eblopenbackend.c 2019-06-13 12:24:04.382632274 +0000 +@@ -47,6 +47,7 @@ const char *ppc_init (Elf *elf, GElf_Hal + const char *ppc64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); + const char *ia64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); + const char *s390_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); ++const char *arm_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); + const char *aarch64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); + const char *bpf_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen); + +@@ -74,7 +75,7 @@ static const struct + { NULL, "elf_tilegx", "tilegx", 6, EM_TILEGX, ELFCLASS64, ELFDATA2LSB }, + // XXX class and machine fields need to be filled in for all archs. + { NULL, "elf_sh", "sh", 2, EM_SH, 0, 0 }, +- { NULL, "ebl_arm", "arm", 3, EM_ARM, 0, 0 }, ++ { arm_init, "ebl_arm", "arm", 3, EM_ARM, 0, 0 }, + { NULL, "elf_sparcv9", "sparc", 5, EM_SPARCV9, 0, 0 }, + { NULL, "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, + { NULL, "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, diff --git a/SPECS/elfutils.spec b/SPECS/elfutils.spec index fd32569..23739d4 100644 --- a/SPECS/elfutils.spec +++ b/SPECS/elfutils.spec @@ -40,6 +40,8 @@ Patch5: elfutils-0.176-pt-gnu-prop.patch Patch100: elfutils-0.176-dts.patch Patch101: elfutils-dts-libs-version.patch +Patch1001: elfutils-dts9-armhfp.patch + Requires: %{?scl_prefix}elfutils-libelf%{depsuffix} = %{version}-%{release} Requires: %{?scl_prefix}elfutils-libs%{depsuffix} = %{version}-%{release} @@ -180,12 +182,20 @@ profiling) of processes. %patch100 -p1 -b .dts %patch101 -p1 -b .versions +%ifarch %{arm} +%patch1001 -p1 -b .armhfp +%endif + autoreconf # In case the above patches added any new test scripts, make sure they # are executable. find . -name \*.sh ! -perm -0100 -print | xargs chmod +x +%ifarch %{arm} +echo -e '"dwarf: arm needs debuginfo installed for all libraries"\nexit 77' > tests/run-backtrace-native-core.sh +%endif + %build # Remove -Wall from default flags. The makefiles enable enough warnings # themselves, and they use -Werror. Appending -Wall defeats the cases where