repository

Carbs Linux repositories
git clone git://git.carbslinux.org/repository
Log | Files | Refs | README | LICENSE

commit 452372b3f917edeea71d250b228d2cf673bb4f70
parent 7f2e3be5544a74bb0d5207897dff3d21ec1b512a
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon,  3 Aug 2020 21:29:37 +0300

libelf: switch to elfutils

Diffstat:
Mcore/libelf/build | 22+++++++++++++++++-----
Mcore/libelf/checksums | 4+++-
Acore/libelf/depends | 1+
Acore/libelf/files/error.h | 27+++++++++++++++++++++++++++
Acore/libelf/patches/musl-decls.patch | 20++++++++++++++++++++
Mcore/libelf/sources | 4+++-
Mcore/libelf/version | 2+-
7 files changed, 72 insertions(+), 8 deletions(-)

diff --git a/core/libelf/build b/core/libelf/build @@ -1,11 +1,23 @@ #!/bin/sh -e -sed 's/-I/-isystem /g' libelf.pc.in > _ -cat _ > libelf.pc.in; rm -f _ +patch -p1 < musl-decls.patch + +# Build sometimes forces -Werror. +export CFLAGS="$CFLAGS -Wno-error" + +# Disable configure error for missing argp. +sed -i 's/as_fn_error.*libargp/: "/g' configure + +# Don't compile two unrelated C files which require argp. +sed -i 's/color.*printversion../#/g' lib/Makefile.in ./configure \ --prefix=/usr \ - --enable-nls=auto + --disable-symbol-versioning \ + --disable-debuginfod \ + --disable-nls -make -make prefix="$1/usr" install +# Skip the default make target and build only what we need. +make -C lib +make -C libelf +make -C libelf DESTDIR="$1" install diff --git a/core/libelf/checksums b/core/libelf/checksums @@ -1 +1,3 @@ -591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d libelf-0.8.13.tar.gz +b827b6e35c59d188ba97d7cf148fa8dc6f5c68eb6c5981888dfdbb758c0b569d elfutils-0.180.tar.bz2 +fd98976f5112b49f6469e7bd2e97d390cf90dc68392218dc713ac0449fc3e395 musl-decls.patch +bf11b56670c7919b44e33b5b0f3a216b7f20cf2859b74bf5e2e837532f8e0579 error.h diff --git a/core/libelf/depends b/core/libelf/depends @@ -0,0 +1 @@ +zlib diff --git a/core/libelf/files/error.h b/core/libelf/files/error.h @@ -0,0 +1,27 @@ +#ifndef _ERROR_H_ +#define _ERROR_H_ + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> + +static unsigned int error_message_count = 0; + +static inline void error(int status, int errnum, const char* format, ...) +{ + va_list ap; + fprintf(stderr, "%s: ", program_invocation_name); + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); + if (errnum) + fprintf(stderr, ": %s", strerror(errnum)); + fprintf(stderr, "\n"); + error_message_count++; + if (status) + exit(status); +} + +#endif /* _ERROR_H_ */ diff --git a/core/libelf/patches/musl-decls.patch b/core/libelf/patches/musl-decls.patch @@ -0,0 +1,20 @@ +--- a/libelf/elf.h 2015-08-21 14:22:37.000000000 +0200 ++++ b/libelf/elf.h 2015-11-20 04:54:33.948081321 +0100 +@@ -21,6 +21,17 @@ + + #include <features.h> + ++#if !defined(__GLIBC__) ++/* C++ needs to know that types and declarations are C, not C++. */ ++#ifdef __cplusplus ++# define __BEGIN_DECLS extern "C" { ++# define __END_DECLS } ++#else ++# define __BEGIN_DECLS ++# define __END_DECLS ++#endif ++#endif ++ + __BEGIN_DECLS + + /* Standard ELF types. */ diff --git a/core/libelf/sources b/core/libelf/sources @@ -1 +1,3 @@ -https://fossies.org/linux/misc/old/libelf-0.8.13.tar.gz +https://sourceware.org/elfutils/ftp/0.180/elfutils-0.180.tar.bz2 +patches/musl-decls.patch +files/error.h lib diff --git a/core/libelf/version b/core/libelf/version @@ -1 +1 @@ -0.8.13 2 +0.180 1