Skip to content

Commit ce1351b

Browse files
committed
v2.1.2/v2.0.17: build flags
don't used certain arch specific flags when cross compiling as they will not work with gcc 15 and were probably silently ignored by gcc 14 and previous. Only use then when not cross compiling.
1 parent ebeb110 commit ce1351b

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

qbittorrent-nox-static.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#################################################################################################################################################
2020
# Script version = Major minor patch
2121
#################################################################################################################################################
22-
script_version="2.0.16"
22+
script_version="2.0.17"
2323
#################################################################################################################################################
2424
# Set some script features - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
2525
#################################################################################################################################################
@@ -791,15 +791,15 @@ _custom_flags() {
791791
qbt_security_flags+=" -fstrict-flex-arrays=3"
792792
fi
793793

794-
# if [[ "${qbt_cross_name}" == "x86_64" || "${os_arch}" =~ ^(amd64|x86_64)$ && "${qbt_cross_name}" = "default" ]]; then
795-
# qbt_security_flags+=" -fcf-protection=full"
796-
# fi
794+
if [[ "${os_arch}" =~ ^(amd64|x86_64)$ && "${qbt_cross_name}" = "default" ]]; then
795+
qbt_security_flags+=" -fcf-protection=full"
796+
fi
797797

798-
# if [[ ! "${os_version_codename}" =~ ^(bookworm)$ ]]; then
799-
# if [[ "${qbt_cross_name}" == "aarch64" || "${os_arch}" =~ ^(arm64|aarch64)$ && "${qbt_cross_name}" = "default" ]]; then
800-
# qbt_security_flags+=" -mbranch-protection=standard"
801-
# fi
802-
# fi
798+
if [[ ! "${os_version_codename}" =~ ^(bookworm)$ ]]; then
799+
if [[ "${os_arch}" =~ ^(arm64|aarch64)$ && "${qbt_cross_name}" = "default" ]]; then
800+
qbt_security_flags+=" -mbranch-protection=standard"
801+
fi
802+
fi
803803

804804
if [[ "${os_id}" =~ ^(alpine)$ ]] && [[ -z "${qbt_cross_name}" || "${qbt_cross_name}" == "default" ]]; then
805805
if [[ ! "${app_name}" =~ ^(openssl)$ ]]; then

qbt-nox-static.bash

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#################################################################################################################################################
2020
# Script version = Major minor patch
2121
#################################################################################################################################################
22-
script_version="2.1.1"
22+
script_version="2.1.2"
2323
#################################################################################################################################################
2424
# Set some script features - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
2525
#################################################################################################################################################
@@ -1011,15 +1011,15 @@ _custom_flags() {
10111011
qbt_security_flags+=" -fstrict-flex-arrays=3"
10121012
fi
10131013

1014-
# if [[ "${qbt_cross_name}" == "x86_64" || "${os_arch}" =~ ^(amd64|x86_64)$ && "${qbt_cross_name}" = "default" ]]; then
1015-
# qbt_security_flags+=" -fcf-protection=full"
1016-
# fi
1014+
if [[ "${os_arch}" =~ ^(amd64|x86_64)$ && "${qbt_cross_name}" = "default" ]]; then
1015+
qbt_security_flags+=" -fcf-protection=full"
1016+
fi
10171017

1018-
# if [[ ! "${os_version_codename}" =~ ^(bookworm)$ ]]; then
1019-
# if [[ "${qbt_cross_name}" == "aarch64" || "${os_arch}" =~ ^(arm64|aarch64)$ && "${qbt_cross_name}" = "default" ]]; then
1020-
# qbt_security_flags+=" -mbranch-protection=standard"
1021-
# fi
1022-
# fi
1018+
if [[ ! "${os_version_codename}" =~ ^(bookworm)$ ]]; then
1019+
if [[ "${os_arch}" =~ ^(arm64|aarch64)$ && "${qbt_cross_name}" = "default" ]]; then
1020+
qbt_security_flags+=" -mbranch-protection=standard"
1021+
fi
1022+
fi
10231023

10241024
if [[ "${os_id}" =~ ^(alpine)$ ]] && [[ -z "${qbt_cross_name}" || "${qbt_cross_name}" == "default" ]]; then
10251025
if [[ ! "${app_name}" =~ ^(openssl)$ ]]; then

0 commit comments

Comments
 (0)