@@ -76,6 +76,14 @@ if [[ "$COMPILER" == clang ]]; then
76
76
CXX=" clang++-$COMPILER_VERSION "
77
77
AR=" llvm-ar-$COMPILER_VERSION "
78
78
79
+ if systemd-analyze compare-versions " $COMPILER_VERSION " ge 17; then
80
+ CFLAGS=" -fno-sanitize=function"
81
+ CXXFLAGS=" -fno-sanitize=function"
82
+ else
83
+ CFLAGS=" "
84
+ CXXFLAGS=" "
85
+ fi
86
+
79
87
# Prefer the distro version if available
80
88
if ! apt-get -y install --dry-run " llvm-$COMPILER_VERSION " > /dev/null; then
81
89
# Latest LLVM stack deb packages provided by https://apt.llvm.org/
@@ -91,6 +99,8 @@ elif [[ "$COMPILER" == gcc ]]; then
91
99
CC=" gcc-$COMPILER_VERSION "
92
100
CXX=" g++-$COMPILER_VERSION "
93
101
AR=" gcc-ar-$COMPILER_VERSION "
102
+ CFLAGS=" "
103
+ CXXFLAGS=" "
94
104
95
105
if ! apt-get -y install --dry-run " gcc-$COMPILER_VERSION " > /dev/null; then
96
106
# Latest gcc stack deb packages provided by
@@ -103,17 +113,20 @@ else
103
113
fatal " Unknown compiler: $COMPILER "
104
114
fi
105
115
106
- # PPA with some newer build dependencies (like zstd)
107
- sudo add-apt-repository -y --no-update ppa:upstream-systemd-ci/systemd-ci
108
- sudo add-apt-repository -y --no-update --enable-source
116
+ # This is added by default, and it is often broken, but we don't need anything from it
117
+ sudo rm -f /etc/apt/sources.list.d/microsoft-prod.{list,sources}
118
+ # add-apt-repository --enable-source does not work on deb822 style sources.
119
+ for f in /etc/apt/sources.list.d/* .sources; do
120
+ sudo sed -i " s/Types: deb/Types: deb deb-src/g" " $f "
121
+ done
109
122
sudo apt-get -y update
110
123
sudo apt-get -y build-dep systemd
111
124
sudo apt-get -y install " ${PACKAGES[@]} "
112
125
# Install more or less recent meson and ninja with pip, since the distro versions don't
113
126
# always support all the features we need (like --optimization=). Since the build-dep
114
127
# command above installs the distro versions, let's install the pip ones just
115
128
# locally and add the local bin directory to the $PATH.
116
- pip3 install --user -r .github/workflows/requirements.txt --require-hashes
129
+ pip3 install --user -r .github/workflows/requirements.txt --require-hashes --break-system-packages
117
130
export PATH=" $HOME /.local/bin:$PATH "
118
131
119
132
$CC --version
@@ -126,8 +139,8 @@ for args in "${ARGS[@]}"; do
126
139
info " Checking build with $args "
127
140
# shellcheck disable=SC2086
128
141
if ! AR=" $AR " \
129
- CC=" $CC " CC_LD=" $LINKER " CFLAGS=" -Werror " \
130
- CXX=" $CXX " CXX_LD=" $LINKER " CXXFLAGS=" -Werror " \
142
+ CC=" $CC " CC_LD=" $LINKER " CFLAGS=" $CFLAGS " \
143
+ CXX=" $CXX " CXX_LD=" $LINKER " CXXFLAGS=" $CXXFLAGS " \
131
144
meson setup \
132
145
-Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
133
146
-Dnobody-group=nogroup -Dcryptolib=" ${CRYPTOLIB:? } " -Ddebug=false \
0 commit comments