rpm-ostree/ci/libbuild.sh
Jonathan Lebon c0f39b8edd ci: append to CFLAGS, don't overwrite
I think this is why the -Wunused-variable wasn't actually taking effect.

Closes: #794
Approved by: jlebon
2017-05-25 20:53:08 +00:00

29 lines
524 B
Bash

#!/usr/bin/bash
make() {
/usr/bin/make -j $(getconf _NPROCESSORS_ONLN) "$@"
}
build() {
env NOCONFIGURE=1 ./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib64 "$@"
make
}
build_default() {
export CFLAGS="${CFLAGS:-} -fsanitize=undefined"
build
}
install_builddeps() {
pkg=$1
dnf -y install dnf-plugins-core
dnf install -y @buildsys-build
dnf install -y 'dnf-command(builddep)'
# builddeps+runtime deps
dnf builddep -y $pkg
dnf install -y $pkg
rpm -e $pkg
}