repo/extra/libelf/build

31 lines
799 B
Plaintext
Raw Normal View History

2019-06-21 15:09:56 +00:00
#!/bin/sh -e
# Build sometimes forces -Werror.
export CFLAGS="$CFLAGS -Wno-error"
2021-07-03 09:30:18 +00:00
# Disable configure error for missing argp/fts/obstack.
2021-07-03 21:09:35 +00:00
sed 's/as_fn_error.*\(argp\|fts\|_obstack\)/: "/g' configure > _
mv -f _ configure
chmod +x configure
2019-06-21 15:09:56 +00:00
# Don't compile two unrelated C files which require argp.
2021-07-03 21:09:35 +00:00
sed 's/color.*printversion../#/g' lib/Makefile.in > _
mv -f _ lib/Makefile.in
2020-05-26 11:17:16 +00:00
./configure \
--prefix=/usr \
--disable-symbol-versioning \
--disable-debuginfod \
2021-07-12 00:38:43 +00:00
--disable-libdebuginfod \
--disable-nls \
ac_cv_c99=yes # Override check for Clang.
2020-05-26 11:17:16 +00:00
# Skip the default make target and build only what we need.
make -C lib
make -C libelf
2021-07-18 02:31:38 +00:00
make -C libelf install
make -C doc install-man3
mkdir -p "$1/usr/lib/pkgconfig"
cp -f config/libelf.pc "$1/usr/lib/pkgconfig/libelf.pc"