@@ -76,6 +76,14 @@ if [[ "$COMPILER" == clang ]]; then
7676 CXX=" clang++-$COMPILER_VERSION "
7777 AR=" llvm-ar-$COMPILER_VERSION "
7878
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+
7987 # Prefer the distro version if available
8088 if ! apt-get -y install --dry-run " llvm-$COMPILER_VERSION " > /dev/null; then
8189 # Latest LLVM stack deb packages provided by https://apt.llvm.org/
@@ -91,6 +99,8 @@ elif [[ "$COMPILER" == gcc ]]; then
9199 CC=" gcc-$COMPILER_VERSION "
92100 CXX=" g++-$COMPILER_VERSION "
93101 AR=" gcc-ar-$COMPILER_VERSION "
102+ CFLAGS=" "
103+ CXXFLAGS=" "
94104
95105 if ! apt-get -y install --dry-run " gcc-$COMPILER_VERSION " > /dev/null; then
96106 # Latest gcc stack deb packages provided by
@@ -103,17 +113,20 @@ else
103113 fatal " Unknown compiler: $COMPILER "
104114fi
105115
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
109122sudo apt-get -y update
110123sudo apt-get -y build-dep systemd
111124sudo apt-get -y install " ${PACKAGES[@]} "
112125# Install more or less recent meson and ninja with pip, since the distro versions don't
113126# always support all the features we need (like --optimization=). Since the build-dep
114127# command above installs the distro versions, let's install the pip ones just
115128# 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
117130export PATH=" $HOME /.local/bin:$PATH "
118131
119132$CC --version
@@ -126,8 +139,8 @@ for args in "${ARGS[@]}"; do
126139 info " Checking build with $args "
127140 # shellcheck disable=SC2086
128141 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 " \
131144 meson setup \
132145 -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
133146 -Dnobody-group=nogroup -Dcryptolib=" ${CRYPTOLIB:? } " -Ddebug=false \
0 commit comments