git: 88db1cc9f197 - main - tools/build/make.py: drop workaround for cc --version not being parsed

Alex Richardson arichardson at FreeBSD.org
Sat Feb 13 14:12:48 UTC 2021


The branch main has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=88db1cc9f197a376817ce27ba269348666bbd4b7

commit 88db1cc9f197a376817ce27ba269348666bbd4b7
Author:     Alex Richardson <arichardson at FreeBSD.org>
AuthorDate: 2021-02-13 13:54:20 +0000
Commit:     Alex Richardson <arichardson at FreeBSD.org>
CommitDate: 2021-02-13 13:54:25 +0000

    tools/build/make.py: drop workaround for cc --version not being parsed
    
    Previously bsd.compiler.mk was not able to detect the compiler type for
    Ubuntu's /usr/bin/cc unless we were invoking the /usr/bin/gcc symlink.
    This problem has been fixed by 9c6954329a9285547881ddd60e393b7c55ed30c4
    so we can drop the workaround from make.py.
    
    Reviewed By:    jrtc27
    Differential Revision: https://reviews.freebsd.org/D28323
---
 tools/build/make.py | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/tools/build/make.py b/tools/build/make.py
index e692fef11e05..bc6d8fb449bb 100755
--- a/tools/build/make.py
+++ b/tools/build/make.py
@@ -182,13 +182,6 @@ if __name__ == "__main__":
                 sys.exit("TARGET= and TARGET_ARCH= must be set explicitly "
                          "when building on non-FreeBSD")
         # infer values for CC/CXX/CPP
-
-        if sys.platform.startswith(
-                "linux") and parsed_args.host_compiler_type == "cc":
-            # FIXME: bsd.compiler.mk doesn't handle the output of GCC if it
-            #  is /usr/bin/cc on Ubuntu since it doesn't contain the GCC string.
-            parsed_args.host_compiler_type = "gcc"
-
         if parsed_args.host_compiler_type == "gcc":
             default_cc, default_cxx, default_cpp = ("gcc", "g++", "cpp")
         # FIXME: this should take values like `clang-9` and then look for
@@ -225,8 +218,8 @@ if __name__ == "__main__":
         if not shutil.which("strip"):
             if sys.platform.startswith("darwin"):
                 # On macOS systems we have to use /usr/bin/strip.
-                sys.exit("Cannot find required tool 'strip'. Please install the"
-                         " host compiler and command line tools.")
+                sys.exit("Cannot find required tool 'strip'. Please install "
+                         "the host compiler and command line tools.")
             if parsed_args.host_compiler_type == "clang":
                 strip_binary = "llvm-strip"
             else:


More information about the dev-commits-src-main mailing list