From e6b266e4fe7bbd03053ea1f68b36d38f81dfce70 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 17 Aug 2018 21:32:56 +0200 Subject: [PATCH] libelf: Keep the libelf part of elfutils While all of elfutils does not build with clang, the libelf part does and is needed by ltrace. So keep libelf as a package and let it replace elfutils for now. --- .../elfutils => packages/libelf}/build.sh | 25 +++++++++++++++---- .../libelf}/config.h.in.patch | 0 .../libelf}/dwfl_error.c.patch | 0 .../libelf}/elf_getaroff.c.patch | 0 .../libelf}/elf_getarsym.c.patch | 0 .../libelf}/elf_update.c.patch | 0 .../elfutils => packages/libelf}/error.h | 0 .../libelf}/libdwflP.h.patch | 0 .../libelf}/libelf-elf_getbase.c.patch | 0 .../libelf-elf_getdata_rawchunk.c.patch | 0 .../elfutils => packages/libelf}/obstack.h | 0 .../elfutils => packages/libelf}/qsort_r.h | 0 .../libelf}/ranlib.c.patch | 0 .../libelf}/src-ar.c.patch | 0 .../libelf}/src-readelf.c.patch | 0 .../elfutils => packages/libelf}/stdio_ext.h | 0 .../libelf}/strings.c.patch | 0 .../libelf}/strip.c.patch | 0 .../libelf}/unstrip.c.patch | 0 19 files changed, 20 insertions(+), 5 deletions(-) rename {disabled-packages/elfutils => packages/libelf}/build.sh (70%) rename {disabled-packages/elfutils => packages/libelf}/config.h.in.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/dwfl_error.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/elf_getaroff.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/elf_getarsym.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/elf_update.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/error.h (100%) rename {disabled-packages/elfutils => packages/libelf}/libdwflP.h.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/libelf-elf_getbase.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/libelf-elf_getdata_rawchunk.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/obstack.h (100%) rename {disabled-packages/elfutils => packages/libelf}/qsort_r.h (100%) rename {disabled-packages/elfutils => packages/libelf}/ranlib.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/src-ar.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/src-readelf.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/stdio_ext.h (100%) rename {disabled-packages/elfutils => packages/libelf}/strings.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/strip.c.patch (100%) rename {disabled-packages/elfutils => packages/libelf}/unstrip.c.patch (100%) diff --git a/disabled-packages/elfutils/build.sh b/packages/libelf/build.sh similarity index 70% rename from disabled-packages/elfutils/build.sh rename to packages/libelf/build.sh index ef8dda703e..983cd359f7 100644 --- a/disabled-packages/elfutils/build.sh +++ b/packages/libelf/build.sh @@ -1,20 +1,26 @@ -# Status: Does not build with clang TERMUX_PKG_HOMEPAGE=https://sourceware.org/elfutils/ TERMUX_PKG_DESCRIPTION="ELF object file access library" +# NOTE: We only build the libelf part of elfutils for now, +# as other parts are not clang compatible. TERMUX_PKG_VERSION=(0.173 1.3) TERMUX_PKG_SHA256=(b76d8c133f68dad46250f5c223482c8299d454a69430d9aa5c19123345a000ff - dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be) + dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be) TERMUX_PKG_SRCURL=(ftp://sourceware.org/pub/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2 http://www.lysator.liu.se/~nisse/archive/argp-standalone-${TERMUX_PKG_VERSION[1]}.tar.gz) # libandroid-support for langinfo. -TERMUX_PKG_DEPENDS="libandroid-support, liblzma, libbz2" +TERMUX_PKG_DEPENDS="libandroid-support" # Use "eu-" as program prefix to avoid conflict with binutils programs. # This is what several linux distributions do. -TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--program-prefix='eu-' ---disable-symbol-versioning" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +ac_cv_c99=yes +--program-prefix='eu-' +--disable-symbol-versioning +" # The ar.c file is patched away for now: TERMUX_PKG_RM_AFTER_INSTALL="bin/eu-ar" +TERMUX_PKG_CONFLICTS=elfutils +TERMUX_PKG_REPLACES=elfutils termux_step_pre_configure() { CFLAGS+=" -Wno-error=unused-value -Wno-error=format-nonliteral -Wno-error" @@ -39,3 +45,12 @@ termux_step_pre_configure() { LDFLAGS+=" -L$TERMUX_PKG_SRCDIR/argp-standalone-${TERMUX_PKG_VERSION[1]}" CPPFLAGS+=" -isystem $TERMUX_PKG_SRCDIR/argp-standalone-${TERMUX_PKG_VERSION[1]}" } + +termux_step_make() { + make -j $TERMUX_MAKE_PROCESSES -C lib + make -j $TERMUX_MAKE_PROCESSES -C libelf +} + +termux_step_make_install() { + make -j $TERMUX_MAKE_PROCESSES -C libelf install +} diff --git a/disabled-packages/elfutils/config.h.in.patch b/packages/libelf/config.h.in.patch similarity index 100% rename from disabled-packages/elfutils/config.h.in.patch rename to packages/libelf/config.h.in.patch diff --git a/disabled-packages/elfutils/dwfl_error.c.patch b/packages/libelf/dwfl_error.c.patch similarity index 100% rename from disabled-packages/elfutils/dwfl_error.c.patch rename to packages/libelf/dwfl_error.c.patch diff --git a/disabled-packages/elfutils/elf_getaroff.c.patch b/packages/libelf/elf_getaroff.c.patch similarity index 100% rename from disabled-packages/elfutils/elf_getaroff.c.patch rename to packages/libelf/elf_getaroff.c.patch diff --git a/disabled-packages/elfutils/elf_getarsym.c.patch b/packages/libelf/elf_getarsym.c.patch similarity index 100% rename from disabled-packages/elfutils/elf_getarsym.c.patch rename to packages/libelf/elf_getarsym.c.patch diff --git a/disabled-packages/elfutils/elf_update.c.patch b/packages/libelf/elf_update.c.patch similarity index 100% rename from disabled-packages/elfutils/elf_update.c.patch rename to packages/libelf/elf_update.c.patch diff --git a/disabled-packages/elfutils/error.h b/packages/libelf/error.h similarity index 100% rename from disabled-packages/elfutils/error.h rename to packages/libelf/error.h diff --git a/disabled-packages/elfutils/libdwflP.h.patch b/packages/libelf/libdwflP.h.patch similarity index 100% rename from disabled-packages/elfutils/libdwflP.h.patch rename to packages/libelf/libdwflP.h.patch diff --git a/disabled-packages/elfutils/libelf-elf_getbase.c.patch b/packages/libelf/libelf-elf_getbase.c.patch similarity index 100% rename from disabled-packages/elfutils/libelf-elf_getbase.c.patch rename to packages/libelf/libelf-elf_getbase.c.patch diff --git a/disabled-packages/elfutils/libelf-elf_getdata_rawchunk.c.patch b/packages/libelf/libelf-elf_getdata_rawchunk.c.patch similarity index 100% rename from disabled-packages/elfutils/libelf-elf_getdata_rawchunk.c.patch rename to packages/libelf/libelf-elf_getdata_rawchunk.c.patch diff --git a/disabled-packages/elfutils/obstack.h b/packages/libelf/obstack.h similarity index 100% rename from disabled-packages/elfutils/obstack.h rename to packages/libelf/obstack.h diff --git a/disabled-packages/elfutils/qsort_r.h b/packages/libelf/qsort_r.h similarity index 100% rename from disabled-packages/elfutils/qsort_r.h rename to packages/libelf/qsort_r.h diff --git a/disabled-packages/elfutils/ranlib.c.patch b/packages/libelf/ranlib.c.patch similarity index 100% rename from disabled-packages/elfutils/ranlib.c.patch rename to packages/libelf/ranlib.c.patch diff --git a/disabled-packages/elfutils/src-ar.c.patch b/packages/libelf/src-ar.c.patch similarity index 100% rename from disabled-packages/elfutils/src-ar.c.patch rename to packages/libelf/src-ar.c.patch diff --git a/disabled-packages/elfutils/src-readelf.c.patch b/packages/libelf/src-readelf.c.patch similarity index 100% rename from disabled-packages/elfutils/src-readelf.c.patch rename to packages/libelf/src-readelf.c.patch diff --git a/disabled-packages/elfutils/stdio_ext.h b/packages/libelf/stdio_ext.h similarity index 100% rename from disabled-packages/elfutils/stdio_ext.h rename to packages/libelf/stdio_ext.h diff --git a/disabled-packages/elfutils/strings.c.patch b/packages/libelf/strings.c.patch similarity index 100% rename from disabled-packages/elfutils/strings.c.patch rename to packages/libelf/strings.c.patch diff --git a/disabled-packages/elfutils/strip.c.patch b/packages/libelf/strip.c.patch similarity index 100% rename from disabled-packages/elfutils/strip.c.patch rename to packages/libelf/strip.c.patch diff --git a/disabled-packages/elfutils/unstrip.c.patch b/packages/libelf/unstrip.c.patch similarity index 100% rename from disabled-packages/elfutils/unstrip.c.patch rename to packages/libelf/unstrip.c.patch