]> 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:23:06 +0000 (10:23 +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.

.gitlab-ci.yml

index 3ac064de4e33c8c48b5a87c2263d1df2ac7319bb..de72ea5a9044fa5cc4f9f66edc0183a147854ecd 100644 (file)
@@ -355,7 +355,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: