* [PATCH] build-many-glibcs.py: Add a s390x -O3 glibc variant.
@ 2020-08-12 14:14 Stefan Liebler
2020-08-19 23:59 ` Joseph Myers
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Liebler @ 2020-08-12 14:14 UTC (permalink / raw)
To: libc-alpha; +Cc: Stefan Liebler
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.
---
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 325591b2c6..8357f5ca7c 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -365,7 +365,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',
@@ -1477,6 +1479,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):
@@ -1545,7 +1550,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
@@ -1567,7 +1572,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."""
--
2.26.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] build-many-glibcs.py: Add a s390x -O3 glibc variant.
2020-08-12 14:14 [PATCH] build-many-glibcs.py: Add a s390x -O3 glibc variant Stefan Liebler
@ 2020-08-19 23:59 ` Joseph Myers
2020-08-20 8:57 ` Stefan Liebler
0 siblings, 1 reply; 3+ messages in thread
From: Joseph Myers @ 2020-08-19 23:59 UTC (permalink / raw)
To: Stefan Liebler; +Cc: libc-alpha
On Wed, 12 Aug 2020, Stefan Liebler via Libc-alpha wrote:
> 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.
OK.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] build-many-glibcs.py: Add a s390x -O3 glibc variant.
2020-08-19 23:59 ` Joseph Myers
@ 2020-08-20 8:57 ` Stefan Liebler
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Liebler @ 2020-08-20 8:57 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha
On 8/20/20 1:59 AM, Joseph Myers wrote:
> On Wed, 12 Aug 2020, Stefan Liebler via Libc-alpha wrote:
>
>> 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.
>
> OK.
>
Committed.
Thanks.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-20 9:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 14:14 [PATCH] build-many-glibcs.py: Add a s390x -O3 glibc variant Stefan Liebler
2020-08-19 23:59 ` Joseph Myers
2020-08-20 8:57 ` Stefan Liebler
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).