Skip to contentSkip to conversation

buildman: support newer gcc versions from kernel.org

PATCH New Daniel Schwierzeck 2 participants 4 messages Feb 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 buildman: support newer gcc versions from kernel.org

Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4.

Also use a regex for matching the tarball names. Some gcc versions use '-ARCH-' instead of '_ARCH-'.

---

 tools/buildman/toolchain.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/buildman/toolchain.py +3 -3
index 2076323d5d..76dcb67614 100644
@@ -33,7 +33,7 @@ class MyHTMLParser(HTMLParser):
         HTMLParser.__init__(self)
         self.arch_link = None
         self.links = []
-        self._match = '_%s-' % arch
+        self.re_arch = re.compile('[-_]%s-' % arch)
 
     def handle_starttag(self, tag, attrs):
         if tag == 'a':
@@ -41,7 +41,7 @@ class MyHTMLParser(HTMLParser):
                 if tag == 'href':
                     if value and value.endswith('.xz'):
                         self.links.append(value)
-                        if self._match in value:
+                        if self.re_arch.search(value):
                             self.arch_link = value
 
 
@@ -431,7 +431,7 @@ class Toolchains:
         """
         arch = command.OutputOneLine('uname', '-m')
         base = 'https://www.kernel.org/pub/tools/crosstool/files/bin'
-        versions = ['4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4']
+        versions = ['7.3.0', '6.4.0', '5.5.0', '4.9.4', '4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4']
         links = []
         for version in versions:
             url = '%s/%s/%s/' % (base, arch, version)
Signature · 1 line
2.16.1
#1 lore raw

PATCH 1/1 buildman: support newer gcc versions from kernel.org

Quoted 35 lines · Daniel Schwierzeck

Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4.

Also use a regex for matching the tarball names. Some gcc versions use '-ARCH-' instead of '_ARCH-'.

---

 tools/buildman/toolchain.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/buildman/toolchain.py +2 -2
index 2076323d5d..76dcb67614 100644
@@ -33,7 +33,7 @@ class MyHTMLParser(HTMLParser):
         HTMLParser.__init__(self)
         self.arch_link = None
         self.links = []
-        self._match = '_%s-' % arch
+        self.re_arch = re.compile('[-_]%s-' % arch)
 
     def handle_starttag(self, tag, attrs):
         if tag == 'a':
@@ -41,7 +41,7 @@ class MyHTMLParser(HTMLParser):
                 if tag == 'href':
                     if value and value.endswith('.xz'):
                         self.links.append(value)
-                        if self._match in value:
+                        if self.re_arch.search(value):
                             self.arch_link = value
 
 

tools/buildman/toolchain.py class Toolchains: · line 434

Quoted 5 lines
tools/buildman/toolchain.py +1 -1
@@ -431,7 +431,7 @@ class Toolchains:
         """
         arch = command.OutputOneLine('uname', '-m')
         base = 'https://www.kernel.org/pub/tools/crosstool/files/bin'
-        versions = ['4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4']
+        versions = ['7.3.0', '6.4.0', '5.5.0', '4.9.4', '4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4']

Thanks for doing this. I think we should trim out the toolchain versions a bit. We shouldn't need anything older than 4.9.0, or maybe even 4.9.4 now.

I also worry about making 7.x or 6.x be the default fetched versions now. I know gcc-6.x adds more warnings as I use the Debian toolchains in my test builds. So travis is going to go right to erroring out. Since your patch is going to start with 7.3, can you please push this to travis and see what fails, so we have an idea on how hard it will be to move CI to 7.3? Thanks!

Signature · 1 line
Tom
#2 lore raw

PATCH 1/1 buildman: support newer gcc versions from kernel.org

Quoted 35 lines · Tom Rini
Quoted 34 lines · Daniel Schwierzeck

Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4.

Also use a regex for matching the tarball names. Some gcc versions use '-ARCH-' instead of '_ARCH-'.

---

 tools/buildman/toolchain.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/buildman/toolchain.py +2 -2
index 2076323d5d..76dcb67614 100644
@@ -33,7 +33,7 @@ class MyHTMLParser(HTMLParser):
         HTMLParser.__init__(self)
         self.arch_link = None
         self.links = []
-        self._match = '_%s-' % arch
+        self.re_arch = re.compile('[-_]%s-' % arch)
 
     def handle_starttag(self, tag, attrs):
         if tag == 'a':
@@ -41,7 +41,7 @@ class MyHTMLParser(HTMLParser):
                 if tag == 'href':
                     if value and value.endswith('.xz'):
                         self.links.append(value)
-                        if self._match in value:
+                        if self.re_arch.search(value):
                             self.arch_link = value
 
 
Quoted 10 lines

tools/buildman/toolchain.py class Toolchains: · line 434

Quoted 6 lines
tools/buildman/toolchain.py +1 -1
@@ -431,7 +431,7 @@ class Toolchains:
         """
         arch = command.OutputOneLine('uname', '-m')
         base = 'https://www.kernel.org/pub/tools/crosstool/files/bin'
-        versions = ['4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4']
+        versions = ['7.3.0', '6.4.0', '5.5.0', '4.9.4', '4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4']

Thanks for doing this. I think we should trim out the toolchain versions a bit. We shouldn't need anything older than 4.9.0, or maybe even 4.9.4 now.

yes, that makes sense

Quoted 8 lines

I also worry about making 7.x or 6.x be the default fetched versions now. I know gcc-6.x adds more warnings as I use the Debian toolchains in my test builds. So travis is going to go right to erroring out. Since your patch is going to start with 7.3, can you please push this to travis and see what fails, so we have an idea on how hard it will be to move CI to 7.3? Thanks!

I've scheduled builds for 7.3.0 [1] and 6.4.0 [2]

[1] https://travis-ci.org/danielschwierzeck/u-boot/builds/339663802
[2] https://travis-ci.org/danielschwierzeck/u-boot/builds/339664291

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180209/45edd51b/attachment.sig>
#3 lore raw

PATCH 1/1 buildman: support newer gcc versions from kernel.org

Quoted 60 lines · Daniel Schwierzeck
Quoted 35 lines · Tom Rini
Quoted 34 lines · Daniel Schwierzeck

Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4.

Also use a regex for matching the tarball names. Some gcc versions use '-ARCH-' instead of '_ARCH-'.

---

 tools/buildman/toolchain.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/buildman/toolchain.py +2 -2
index 2076323d5d..76dcb67614 100644
@@ -33,7 +33,7 @@ class MyHTMLParser(HTMLParser):
         HTMLParser.__init__(self)
         self.arch_link = None
         self.links = []
-        self._match = '_%s-' % arch
+        self.re_arch = re.compile('[-_]%s-' % arch)
 
     def handle_starttag(self, tag, attrs):
         if tag == 'a':
@@ -41,7 +41,7 @@ class MyHTMLParser(HTMLParser):
                 if tag == 'href':
                     if value and value.endswith('.xz'):
                         self.links.append(value)
-                        if self._match in value:
+                        if self.re_arch.search(value):
                             self.arch_link = value
 
 
Quoted 10 lines

tools/buildman/toolchain.py class Toolchains: · line 434

Quoted 6 lines
tools/buildman/toolchain.py +1 -1
@@ -431,7 +431,7 @@ class Toolchains:
         """
         arch = command.OutputOneLine('uname', '-m')
         base = 'https://www.kernel.org/pub/tools/crosstool/files/bin'
-        versions = ['4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4']
+        versions = ['7.3.0', '6.4.0', '5.5.0', '4.9.4', '4.9.0', '4.6.3', '4.6.2', '4.5.1', '4.2.4']

Thanks for doing this. I think we should trim out the toolchain versions a bit. We shouldn't need anything older than 4.9.0, or maybe even 4.9.4 now.

yes, that makes sense

Quoted 8 lines

I also worry about making 7.x or 6.x be the default fetched versions now. I know gcc-6.x adds more warnings as I use the Debian toolchains in my test builds. So travis is going to go right to erroring out. Since your patch is going to start with 7.3, can you please push this to travis and see what fails, so we have an idea on how hard it will be to move CI to 7.3? Thanks!

Quoted 4 lines

I've scheduled builds for 7.3.0 [1] and 6.4.0 [2]

[1] https://travis-ci.org/danielschwierzeck/u-boot/builds/339663802
[2] https://travis-ci.org/danielschwierzeck/u-boot/builds/339664291

x86 broke, but I submitted a patch for the new warning gcc-6.x and later shows yesterday.

Signature · 1 line
Tom