aboutsummaryrefslogtreecommitdiff
path: root/extra/libelf/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2021-01-12 15:52:10 +0300
committerCem Keylan <cem@ckyln.com>2021-01-12 15:52:10 +0300
commit954902a8496d8cbddbd650c87bd5ff9f3e6c1deb (patch)
tree422b238103c824e6fef78bad072453776b356c4b /extra/libelf/build
parent8bd7d55373db3480f909d0798dc512c81a7dec07 (diff)
downloadrepository-954902a8496d8cbddbd650c87bd5ff9f3e6c1deb.tar.gz
libelf: move to extra
Diffstat (limited to 'extra/libelf/build')
-rwxr-xr-xextra/libelf/build21
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/libelf/build b/extra/libelf/build
new file mode 100755
index 00000000..7bade69a
--- /dev/null
+++ b/extra/libelf/build
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+# 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 \
+ --disable-symbol-versioning \
+ --disable-debuginfod \
+ --disable-nls
+
+# Skip the default make target and build only what we need.
+make -C lib
+make -C libelf
+make -C libelf DESTDIR="$1" install