public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Stefan Liebler <stli@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] build-many-glibcs.py: Add a s390x -O3 glibc variant.
Date: Thu, 20 Aug 2020 08:52:10 +0000 (GMT)	[thread overview]
Message-ID: <20200820085210.993AE3850413@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=33dd32fd7913c12aa2d946155425bf866c9861dd

commit 33dd32fd7913c12aa2d946155425bf866c9861dd
Author: Stefan Liebler <stli@linux.ibm.com>
Date:   Thu Aug 20 10:51:42 2020 +0200

    build-many-glibcs.py: Add a s390x -O3 glibc variant.
    
    On s390x, gcc inlines more aggresive compared to other architectures.
    This occaisionally leads to build warnings / errors.
    
    Therefore this patch adds a s390x glibc variant with optimization.
    
    There is the ccopts field which contain ABI options which are passed
    to configure as CC / CXX.  Now there is also the cflags field which
    contains non-ABI options like -g or -O. Those are passed to configure
    as CFLAGS / CXXFLAGS.
    
    Currently CC is passed to conformtest.py or linknamespace.py but not
    the CFLAGS.

Diff:
---
 scripts/build-many-glibcs.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 0576ced307..687c056b7a 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -366,7 +366,9 @@ class Context(object):
         self.add_config(arch='s390x',
                         os_name='linux-gnu',
                         glibcs=[{},
-                                {'arch': 's390', 'ccopts': '-m31'}])
+                                {'arch': 's390', 'ccopts': '-m31'}],
+                        extra_glibcs=[{'variant': 'O3',
+                                       'cflags': '-O3'}])
         self.add_config(arch='sh3',
                         os_name='linux-gnu')
         self.add_config(arch='sh3eb',
@@ -1483,6 +1485,9 @@ class GlibcPolicyDefault(object):
         ]
         if glibc.os == 'gnu':
             self.configure_args.append('MIG=%s' % glibc.tool_name('mig'))
+        if glibc.cflags:
+            self.configure_args.append('CFLAGS=%s' % glibc.cflags)
+            self.configure_args.append('CXXFLAGS=%s' % glibc.cflags)
         self.configure_args += glibc.cfg
 
     def configure(self, cmdlist):
@@ -1551,7 +1556,7 @@ class Glibc(object):
     """A configuration for building glibc."""
 
     def __init__(self, compiler, arch=None, os_name=None, variant=None,
-                 cfg=None, ccopts=None):
+                 cfg=None, ccopts=None, cflags=None):
         """Initialize a Glibc object."""
         self.ctx = compiler.ctx
         self.compiler = compiler
@@ -1573,7 +1578,11 @@ class Glibc(object):
             self.cfg = []
         else:
             self.cfg = cfg
+        # ccopts contain ABI options and are passed to configure as CC / CXX.
         self.ccopts = ccopts
+        # cflags contain non-ABI options like -g or -O and are passed to
+        # configure as CFLAGS / CXXFLAGS.
+        self.cflags = cflags
 
     def tool_name(self, tool):
         """Return the name of a cross-compilation tool."""


                 reply	other threads:[~2020-08-20  8:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200820085210.993AE3850413@sourceware.org \
    --to=stli@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).