From 6b756114982ae310319dd06283c9378dd59d3039 Mon Sep 17 00:00:00 2001 From: Ed Sabol Date: Fri, 25 Nov 2022 10:47:51 -0500 Subject: [PATCH] Set CXXFLAGS=-Wp,-D_GLIBCXX_ASSERTIONS on gcc-9 and higher builds. (#361) --- .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