From 5a0024507dee0bb5a13337e43f8d1e1cb8972b97 Mon Sep 17 00:00:00 2001 From: Ed Sabol Date: Sun, 20 Nov 2022 23:23:41 -0500 Subject: [PATCH] Set CXXFLAGS=-Wp,-D_GLIBCXX_ASSERTIONS on gcc-9 and higher builds. --- .github/workflows/c-cpp.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 03f07d622..9d359aa92 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -31,6 +31,7 @@ jobs: CC: ${{ matrix.config.cc }}-${{ matrix.config.tag }} CXX: ${{ matrix.config.cxx }}-${{ matrix.config.tag }} GHA_CONTAINER: ${{ matrix.config.container }} + CCVERSION: ${{ matrix.config.tag }} steps: - name: if running in a container, update and install sudo, git, and other basics @@ -91,9 +92,21 @@ jobs: fi ./bootstrap.sh -a - name: configure - run: ./configure --enable-ssl + run: | + if [[ "${CC}" == gcc* ]] && [ "${CCVERSION}" -ge 9 ]; then + CXXFLAGS="-Wp,-D_GLIBCXX_ASSERTIONS" + export CXXFLAGS + echo "CXXFLAGS: $CXXFLAGS" + fi + ./configure --enable-ssl - name: make - run: ${CC} --version && make + run: | + if [[ "${CC}" == gcc* ]] && [ "${CCVERSION}" -ge 9 ]; then + CXXFLAGS="-Wp,-D_GLIBCXX_ASSERTIONS" + export CXXFLAGS + echo "CXXFLAGS: $CXXFLAGS" + fi + ${CC} --version && make - name: make test run: ${CC} --version && make test - name: check test-suite.log