build-many-glibcs.py: Add ISL (0.24) support

Message ID 20211223164430.866399-1-hjl.tools@gmail.com
State New, archived
Headers
Series build-many-glibcs.py: Add ISL (0.24) support |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

H.J. Lu Dec. 23, 2021, 4:44 p.m. UTC
  ---
 scripts/build-many-glibcs.py | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
  

Comments

Florian Weimer Dec. 23, 2021, 6:40 p.m. UTC | #1
What's the motiviation for this?  I thought ISL is optional?

Thanks,
Florian
  
H.J. Lu Dec. 23, 2021, 6:47 p.m. UTC | #2
On Thu, Dec 23, 2021 at 10:40 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> What's the motiviation for this?  I thought ISL is optional?
>
> Thanks,
> Florian
>

The motivation is to use build-many-glibcs.py to build Linux cross
compiler, which is as close to the native Linux compiler as possible,
not just for checking glibc.  For building a Linux cross compiler, it is
much more convenient than other alternatives.
  
Florian Weimer Dec. 24, 2021, 6:03 p.m. UTC | #3
* H. J. Lu:

> On Thu, Dec 23, 2021 at 10:40 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> What's the motiviation for this?  I thought ISL is optional?
>>
>> Thanks,
>> Florian
>>
>
> The motivation is to use build-many-glibcs.py to build Linux cross
> compiler, which is as close to the native Linux compiler as possible,
> not just for checking glibc.  For building a Linux cross compiler, it is
> much more convenient than other alternatives.

Are all distributions using ISL?  I thought some do, others don't?

Thanks,
Florian
  
H.J. Lu Dec. 24, 2021, 6:06 p.m. UTC | #4
On Fri, Dec 24, 2021 at 10:04 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > On Thu, Dec 23, 2021 at 10:40 AM Florian Weimer <fweimer@redhat.com> wrote:
> >>
> >> What's the motiviation for this?  I thought ISL is optional?
> >>
> >> Thanks,
> >> Florian
> >>
> >
> > The motivation is to use build-many-glibcs.py to build Linux cross
> > compiler, which is as close to the native Linux compiler as possible,
> > not just for checking glibc.  For building a Linux cross compiler, it is
> > much more convenient than other alternatives.
>
> Are all distributions using ISL?  I thought some do, others don't?
>
>

I don't know.
  
Joseph Myers Dec. 30, 2021, 10:09 p.m. UTC | #5
On Thu, 23 Dec 2021, H.J. Lu via Libc-alpha wrote:

> On Thu, Dec 23, 2021 at 10:40 AM Florian Weimer <fweimer@redhat.com> wrote:
> >
> > What's the motiviation for this?  I thought ISL is optional?
> >
> > Thanks,
> > Florian
> >
> 
> The motivation is to use build-many-glibcs.py to build Linux cross
> compiler, which is as close to the native Linux compiler as possible,
> not just for checking glibc.  For building a Linux cross compiler, it is
> much more convenient than other alternatives.

Are you using build-many-glibcs.py --full-gcc, which is also needed to get 
something closer to a native system compiler (although the features added 
with --full-gcc are largely orthogonal to the use of ISL)?

There was no apparent interest from Go / Ada / libsanitizer people in 
actually fixing most of the problems shown up in a build with --full-gcc 
when I added that option (see the commit message for commit 
b1176270deffff46db9b39645bff10fe7b8c5fbd, some might have been fixed since 
then), or in running a bot with that option (which would be awkward 
because of Ada's requirement to build with same-version native GCC), but 
it might well still be of use when you just want to build a cross compiler 
for an architecture where all the libraries do build OK.
  

Patch

diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index b83bc159fd..2b46044bae 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -535,20 +535,20 @@  class Context(object):
         self.clear_last_build_state(action)
         build_time = datetime.datetime.utcnow()
         if action == 'host-libraries':
-            build_components = ('gmp', 'mpfr', 'mpc')
+            build_components = ('gmp', 'mpfr', 'mpc', 'isl')
             old_components = ()
             old_versions = {}
             self.build_host_libraries()
         elif action == 'compilers':
             build_components = ('binutils', 'gcc', 'glibc', 'linux', 'mig',
                                 'gnumach', 'hurd')
-            old_components = ('gmp', 'mpfr', 'mpc')
+            old_components = ('gmp', 'mpfr', 'mpc', 'isl')
             old_versions = self.build_state['host-libraries']['build-versions']
             self.build_compilers(configs)
         else:
             build_components = ('glibc',)
-            old_components = ('gmp', 'mpfr', 'mpc', 'binutils', 'gcc', 'linux',
-                              'mig', 'gnumach', 'hurd')
+            old_components = ('gmp', 'mpfr', 'mpc', 'isl', 'binutils',
+                              'gcc', 'linux', 'mig', 'gnumach', 'hurd')
             old_versions = self.build_state['compilers']['build-versions']
             if action == 'update-syscalls':
                 self.update_syscalls(configs)
@@ -697,6 +697,8 @@  class Context(object):
         self.remove_recreate_dirs(installdir, builddir, logsdir)
         cmdlist = CommandList('host-libraries', self.keep)
         self.build_host_library(cmdlist, 'gmp')
+        self.build_host_library(cmdlist, 'isl',
+                                ['--with-gmp=%s' % installdir])
         self.build_host_library(cmdlist, 'mpfr',
                                 ['--with-gmp=%s' % installdir])
         self.build_host_library(cmdlist, 'mpc',
@@ -788,6 +790,7 @@  class Context(object):
                             'linux': '5.15',
                             'mpc': '1.2.1',
                             'mpfr': '4.1.0',
+                            'isl': '0.24',
                             'mig': 'vcs-mainline',
                             'gnumach': 'vcs-mainline',
                             'hurd': 'vcs-mainline'}
@@ -970,6 +973,7 @@  class Context(object):
                    'linux': 'https://www.kernel.org/pub/linux/kernel/v%(major)s.x/linux-%(version)s.tar.xz',
                    'mpc': 'https://ftp.gnu.org/gnu/mpc/mpc-%(version)s.tar.gz',
                    'mpfr': 'https://ftp.gnu.org/gnu/mpfr/mpfr-%(version)s.tar.xz',
+                   'isl': 'https://libisl.sourceforge.io/isl-%(version)s.tar.xz',
                    'mig': 'https://ftp.gnu.org/gnu/mig/mig-%(version)s.tar.bz2',
                    'gnumach': 'https://ftp.gnu.org/gnu/gnumach/gnumach-%(version)s.tar.bz2',
                    'hurd': 'https://ftp.gnu.org/gnu/hurd/hurd-%(version)s.tar.bz2'}
@@ -1092,7 +1096,7 @@  class Context(object):
             for a in actions:
                 self.clear_last_build_state(a)
             self.exec_self()
-        check_components = {'host-libraries': ('gmp', 'mpfr', 'mpc'),
+        check_components = {'host-libraries': ('gmp', 'mpfr', 'mpc', 'isl'),
                             'compilers': ('binutils', 'gcc', 'glibc', 'linux',
                                           'mig', 'gnumach', 'hurd'),
                             'glibcs': ('glibc',)}
@@ -1455,7 +1459,8 @@  class Config(object):
         host_libs = self.ctx.host_libraries_installdir
         cfg_opts += ['--with-gmp=%s' % host_libs,
                      '--with-mpfr=%s' % host_libs,
-                     '--with-mpc=%s' % host_libs]
+                     '--with-mpc=%s' % host_libs,
+                     '--with-isl=%s' % host_libs]
         if bootstrap:
             tool_build = 'gcc-first'
             # Building a static-only, C-only compiler that is