]> The Tcpdump Group git mirrors - tcpdump/commitdiff
CI: Refine GCC identification. [skip appveyor]
authorDenis Ovsienko <[email protected]>
Wed, 15 Sep 2021 08:54:11 +0000 (09:54 +0100)
committerDenis Ovsienko <[email protected]>
Wed, 15 Sep 2021 08:54:11 +0000 (09:54 +0100)
Same as in libpcap.

build_common.sh

index 21d62b835dd8bdf2d8f0e22c70087481f9512219..0277614871b3472c903fc785e5e89c7bd6fa94c8 100644 (file)
@@ -139,7 +139,22 @@ cc_id_nocache() {
         return
     fi
 
-    cc_id_guessed=`echo "$cc_id_firstline" | sed 's/^.* (.*) \([0-9\.]*\)$/gcc-\1/'`
+    # OpenBSD default GCC:
+    # "gcc (GCC) 4.2.1 20070719"
+    # RedHat GCC:
+    # "gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2)"
+    # "gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1)"
+    # other GCC packages:
+    # "sparc-sun-solaris2.9-gcc (GCC) 4.2.0 (gccfss)"
+    # "gcc (GCC) 5.5.0"
+    # "gcc (nb4 20200810) 7.5.0"
+    # "gcc (OpenIndiana 7.5.0-il-0) 7.5.0"
+    # "gcc (Debian 8.3.0-6) 8.3.0"
+    # "gcc (Raspbian 8.3.0-6+rpi1) 8.3.0"
+    # "egcc (GCC) 8.4.0"
+    # "gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0"
+    # "gcc (FreeBSD Ports Collection) 10.3.0"
+    cc_id_guessed=`echo "$cc_id_firstline" | sed 's/^.* (.*) \([0-9\.]*\).*$/gcc-\1/'`
     if [ "$cc_id_firstline" != "$cc_id_guessed" ]; then
         echo "$cc_id_guessed"
         return