]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make GCC version extraction work with GCC 10
authorMichał Kępień <michal@isc.org>
Mon, 18 May 2020 08:23:06 +0000 (10:23 +0200)
committerMichał Kępień <michal@isc.org>
Mon, 18 May 2020 08:41:41 +0000 (10:41 +0200)
Add whitespace to the regular expression used for extracting the GCC
version from "gcc --version" output so that it works properly with
multi-digit major version numbers.

(cherry picked from commit 3b48eec79fb272715c3b7070edb601956b86aa70)

.gitlab-ci.yml

index 720b6e8d7531cc9a2bf9f16683b99648c5bf1be2..bc2bca82d64a1eb15165d0b4605f2eb645150363 100644 (file)
@@ -354,7 +354,7 @@ stages:
   script:
     - *configure
     - (make -nwk all || true) | compiledb
-    - export GCC_VERSION=$(gcc --version | sed -n 's/.*\([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
+    - export GCC_VERSION=$(gcc --version | sed -n 's/.* \([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
     - sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json
     - *run_cppcheck
   after_script: