public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: GLIBC patches <libc-alpha@sourceware.org>
Subject: Re: Upstreaming OpenRISC with GCC mainline
Date: Sat, 30 Oct 2021 17:56:02 +0900	[thread overview]
Message-ID: <YX0IojQsoD33HTXj@antec> (raw)
In-Reply-To: <CAAfxs74D=ucBGYVFgbL3dsQY6uB6T8Mh5N-z5qQHAiKD_=Y59w@mail.gmail.com>

On Sat, Oct 30, 2021 at 12:08:18AM +0900, Stafford Horne wrote:
> On Fri, Oct 29, 2021, 11:43 PM Joseph Myers <joseph@codesourcery.com> wrote:
> 
> > On Fri, 29 Oct 2021, Stafford Horne wrote:
> >
> > >     $ or1k-glibc-linux-gnu-gcc tst-mqueue5.c -c -std=gnu11
> > -fgnu89-inline  -g -O -Wall -Wwrite-strings -Wundef -Werror
> > -fmerge-all-constants -frounding-math -fno-stack-protector -fno-c....
> >
> > That's -O, i.e. -O1, which is expected to have extra warnings.  Making
> > glibc build cleanly with different optimization options would be good, but
> > should be handled separately from new ports.
> >
> 
> Oh, you are right, I reset CFLAGS before the build so I didn't think
> anything would be coming in. I'll try to figure out where those extra flags
> are coming from.

Alright, now that I am using -g -O2 I am almost getting a clean run of
build-many-glibcs.py, using the following branches:

    GLIBC: mainline (2021-10-29 b3cf94ef15 + or1k port)
    GCC  : mainline (2021-10-29 518bc4ef87e)

I am now getting the below for both x86_64-linux-gnu and or1k-linux-gnu-soft.

It seems to be related to -frounding-math, removing that flag fixes the issue.
GCC has 2 patches related to this recently committed:

   2021-10-28 81342e95827 Richard Biener   middle-end/84407 - honor -frounding-math for int to float conversion
   2021-10-28 a84b9d5373c Richard Biener   middle-end/57245 - honor -frounding-math in real truncation

Error:

    or1k-glibc-linux-gnu-gcc tst-timespec.c -fdump-analyzer -fdump-lang-all -fdump-tree-all -c -fgnu89-inline  -g -O2 -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -Wstrict-prototypes -Wold-style-definition -fmath-errno            -I../include -I/home/shorne/work/gnu-toolchain/build-many/build/glibcs/or1k-linux-gnu-soft/glibc/support  -I/home/shorne/work/gnu-toolchain/build-many/build/glibcs/or1k-linux-gnu-soft/glibc  -I../sysdeps/unix/sysv/linux/or1k  -I../sysdeps/or1k/nptl  -I../sysdeps/unix/sysv/linux/generic/wordsize-32  -I../sysdeps/unix/sysv/linux/generic  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/or1k/nofpu  -I../sysdeps/ieee754/soft-fp  -I../sysdeps/or1k  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I.  -D_LIBC_REENTRANT -include /home/shorne/work/gnu-toolchain/build-many/build/glibcs/or1k-linux-gnu-soft/glibc/libc-modules.h -DMODULE_NAME=testsuite -include ../include/libc-symbols.h       -DTOP_NAMESPACE=glibc -o /home/shorne/work/gnu-toolchain/build-many/build/glibcs/or1k-linux-gnu-soft/glibc/support/tst-timespec.o -MD -MP -MF /home/shorne/work/gnu-toolchain/build-many/build/glibcs/or1k-linux-gnu-soft/glibc/support/tst-timespec.o.dt -MT /home/shorne/work/gnu-toolchain/build-many/build/glibcs/or1k-linux-gnu-soft/glibc/support/tst-timespec.o
    In file included from tst-timespec.c:22:
    ../include/intprops.h:57:3: error: initializer element is not computable at load time
       57 |   ((t) (! TYPE_SIGNED (t)                                               \
	  |   ^
    tst-timespec.c:48:20: note: in expansion of macro ‘TYPE_MAXIMUM’
       48 | #define TIME_T_MAX TYPE_MAXIMUM (time_t)
	  |                    ^~~~~~~~~~~~
    tst-timespec.c:290:19: note: in expansion of macro ‘TIME_T_MAX’
      290 |    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
	  |                   ^~~~~~~~~~
    ../include/intprops.h:57:3: note: (near initialization for ‘check_cases[20].upper_bound’)
       57 |   ((t) (! TYPE_SIGNED (t)                                               \
	  |   ^
    tst-timespec.c:48:20: note: in expansion of macro ‘TYPE_MAXIMUM’
       48 | #define TIME_T_MAX TYPE_MAXIMUM (time_t)
	  |                    ^~~~~~~~~~~~
    tst-timespec.c:290:19: note: in expansion of macro ‘TIME_T_MAX’
      290 |    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
	  |                   ^~~~~~~~~~

So maybe we need some more DIAG_* macros here now?

-Stafford

  reply	other threads:[~2021-10-30  8:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 20:49 Stafford Horne
2021-10-27 22:13 ` Joseph Myers
2021-10-27 23:19   ` Stafford Horne
2021-10-28 17:15     ` Joseph Myers
2021-10-28 21:17       ` Stafford Horne
2021-10-28 21:45         ` Joseph Myers
2021-10-28 22:18           ` Stafford Horne
2021-10-29  9:05             ` Stafford Horne
2021-10-29 14:43               ` Joseph Myers
2021-10-29 15:08                 ` Stafford Horne
2021-10-30  8:56                   ` Stafford Horne [this message]
2021-11-01 20:47                     ` Joseph Myers
2021-11-02  4:18                       ` Stafford Horne

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=YX0IojQsoD33HTXj@antec \
    --to=shorne@gmail.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@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).