#!/usr/bin/bash # # Enable relocations at the linker for give llvm-bolt the possibility to reorder functions # [[ -n "$LIBMAKEPKG_BUILDENV_RELOCS_SH" ]] && return LIBMAKEPKG_BUILDENV_RELOCS_SH=1 LIBRARY=${LIBRARY:-'/usr/share/makepkg'} source "$LIBRARY/util/option.sh" build_options+=('relocs') buildenv_functions+=('buildenv_relocs') buildenv_relocs() { if check_buildoption "relocs" "y";then relocsldflags=" -Wl,--emit-relocs" LDFLAGS+="$relocsldflags" fi }