Skip to content

Commit

Permalink
rTorrent: Fix build flags (swizzin#1111)
Browse files Browse the repository at this point in the history
- Set mktorrent compiler to gcc. Apply optimization flags.
- Fix xmlrpc c flags. Ensure optimization level is applied during the build.
- configure libtorrent with `--enable-aligned` to prevent crashes
  • Loading branch information
stickz authored Jan 13, 2024
1 parent 2de2351 commit 605ccdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sources/functions/rtorrent
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function depends_rtorrent() {
rm_if_exists "/tmp/mktorrent"
unzip -d mktorrent -j mktorrent.zip >> $log 2>&1
cd mktorrent
make >> $log 2>&1
make -j$(nproc) CC=gcc CFLAGS="-w ${rtorrentflto} ${rtorrentpipe} ${rtorrentlevel}" >> $log 2>&1
make install PREFIX=/usr >> $log 2>&1
cd /tmp
rm -rf mktorrent*
Expand Down Expand Up @@ -163,7 +163,7 @@ function build_xmlrpc-c() {
}
source <(sed 's/ //g' version.mk)
VERSION=$XMLRPC_MAJOR_RELEASE.$XMLRPC_MINOR_RELEASE.$XMLRPC_POINT_RELEASE
make -j$(nproc) CFLAGS="-w ${rtorrentflto} ${rtorrentpipe}" >> $log 2>&1
make -j$(nproc) CFLAGS="-w ${rtorrentlevel} ${rtorrentflto} ${rtorrentpipe}" >> $log 2>&1
make DESTDIR=/tmp/dist/xmlrpc-c install >> $log 2>&1 || {
echo_error "Something went wrong while making xmlrpc"
exit 1
Expand Down Expand Up @@ -217,7 +217,7 @@ function build_libtorrent_rakshasa() {
fi
fi
./autogen.sh >> $log 2>&1
./configure --prefix=/usr >> $log 2>&1 || {
./configure --prefix=/usr --enable-aligned >> $log 2>&1 || {
echo_error "Something went wrong while configuring libtorrent"
exit 1
}
Expand Down

0 comments on commit 605ccdb

Please sign in to comment.