diff options
| author | Meco Man <[email protected]> | 2023-09-14 21:45:39 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2023-09-15 08:52:48 -0400 |
| commit | dc407966fa179de6d608fe6674ac52c810f2e0c5 (patch) | |
| tree | 183b8d72e90b5c3faae6c039367c7cf507f060ac /tools | |
| parent | 77f31f8d8f552aa864c07d625d2726247ae6d4ab (diff) | |
[tools][gcc.py] avoid dist failure when try to dist MDK/IAR project.
Because for MKD/IAR project, in the rtconfig.py, there is no rtconfig.PREFIX defined.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gcc.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/gcc.py b/tools/gcc.py index a3e0344200..556ede8f23 100644 --- a/tools/gcc.py +++ b/tools/gcc.py @@ -72,6 +72,12 @@ def GetGCCLikePLATFORM(): def GetNewLibVersion(rtconfig): version = None + + try: + rtconfig.PREFIX + except: + return version + root = GetGCCRoot(rtconfig) if CheckHeader(rtconfig, '_newlib_version.h'): # get version from _newlib_version.h file f = open(os.path.join(root, 'include', '_newlib_version.h'), 'r') @@ -92,6 +98,12 @@ def GetNewLibVersion(rtconfig): # FIXME: there is no musl version or musl macros can be found officially def GetMuslVersion(rtconfig): version = None + + try: + rtconfig.PREFIX + except: + return version + if 'musl' in rtconfig.PREFIX: version = 'unknown' return version |
