add libxdc compile fallback pass in case LTO is not supported by the compiler
This commit is contained in:
parent
757482d00f
commit
3ea4a8c37c
@ -46,7 +46,18 @@ compile_libraries()
|
|||||||
make -C $CAPSTONE_ROOT -j $(nproc)
|
make -C $CAPSTONE_ROOT -j $(nproc)
|
||||||
|
|
||||||
echo "[!] Compiling libxdc..."
|
echo "[!] Compiling libxdc..."
|
||||||
|
set +e
|
||||||
|
make -C $LIBXDC_ROOT clean
|
||||||
LDFLAGS="-L$CAPSTONE_ROOT -L$LIBXDC_ROOT" CFLAGS="-I$CAPSTONE_ROOT/include/" make -C $LIBXDC_ROOT -j $(nproc)
|
LDFLAGS="-L$CAPSTONE_ROOT -L$LIBXDC_ROOT" CFLAGS="-I$CAPSTONE_ROOT/include/" make -C $LIBXDC_ROOT -j $(nproc)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "[!] libxdc LTO build failed! Trying to compile in non-LTO mode..."
|
||||||
|
NO_LTO=1 LDFLAGS="-L$CAPSTONE_ROOT -L$LIBXDC_ROOT" CFLAGS="-I$CAPSTONE_ROOT/include/" make -C $LIBXDC_ROOT -j $(nproc)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "[ ] libxdc non-LTO build failed again ..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user