[RFC] Change PCH "checksum"

2019-02-22 Thread Richard Biener


GCC builds are currently not reproducible because for one the checksum
we compute for PCH purposes (by genchecksum) nowaways includes checksums
of archives (since we switched from checksumming a dummy executable
to checksumming object files).  That includes dates (unless built with
-D which we don't do).

Then later we switched to do thin archives so for example libbackend.a
we checksum doesn't contain the actual code anymore...

A pragmatic approach to "fix" things would be to just checksum
gtype-desc.o which should have enough state to cover PCH dependences
if I understand the workings correctly (patch below - a single
checksum would suffice so more simplifications are possible).

Another solution working on ELF systems with build-id support is
simply forgo checksumming anything and rely on the executable
build-id instead (pat^whack below as well).

Does anybody think that just checksumming gtype-desc.o is a
degradation over the current state (which checksums thin archives)?

Thanks,
Richard.

2019-02-22  Richard Biener  

c/
* Make-lang.in (cc1-checksum.c): Checksum only gtype-desc.o.

cp/
* Make-lang.in (cc1plus-checksum.c): Checksum only gtype-desc.o.

objc/
* Make-lang.in (cc1obj-checksum.c): Checksum only gtype-desc.o.

objcp/
* Make-lang.in (cc1objplus-checksum.c): Checksum only gtype-desc.o.

Index: gcc/c/Make-lang.in
===
--- gcc/c/Make-lang.in  (revision 269111)
+++ gcc/c/Make-lang.in  (working copy)
@@ -70,14 +70,13 @@ endif
 # compute checksum over all object files and the options
 # re-use the checksum from the prev-final stage so it passes
 # the bootstrap comparison and allows comparing of the cc1 binary
-cc1-checksum.c : build/genchecksum$(build_exeext) checksum-options \
-   $(C_OBJS) $(BACKEND) $(LIBDEPS) 
+cc1-checksum.c : build/genchecksum$(build_exeext) gtype-desc.o 
if [ -f ../stage_final ] \
   && cmp -s ../stage_current ../stage_final; then \
  cp ../prev-gcc/cc1-checksum.c cc1-checksum.c; \
else \
- build/genchecksum$(build_exeext) $(C_OBJS) $(BACKEND) $(LIBDEPS) \
- checksum-options > cc1-checksum.c.tmp &&   \
+ build/genchecksum$(build_exeext) gtype-desc.o \
+ > cc1-checksum.c.tmp &&\
  $(srcdir)/../move-if-change cc1-checksum.c.tmp cc1-checksum.c; \
fi
 
Index: gcc/cp/Make-lang.in
===
--- gcc/cp/Make-lang.in (revision 269111)
+++ gcc/cp/Make-lang.in (working copy)
@@ -105,14 +105,13 @@ cp-warn = $(STRICT_WARN)
 # compute checksum over all object files and the options
 # re-use the checksum from the prev-final stage so it passes
 # the bootstrap comparison and allows comparing of the cc1 binary
-cc1plus-checksum.c : build/genchecksum$(build_exeext) checksum-options \
-   $(CXX_OBJS) $(BACKEND) $(LIBDEPS) 
+cc1plus-checksum.c : build/genchecksum$(build_exeext) gtype-desc.o 
if [ -f ../stage_final ] \
   && cmp -s ../stage_current ../stage_final; then \
   cp ../prev-gcc/cc1plus-checksum.c cc1plus-checksum.c; \
else \
- build/genchecksum$(build_exeext) $(CXX_OBJS) $(BACKEND) $(LIBDEPS) \
- checksum-options > cc1plus-checksum.c.tmp && \
+ build/genchecksum$(build_exeext) gtype-desc.o \
+ > cc1plus-checksum.c.tmp &&  \
  $(srcdir)/../move-if-change cc1plus-checksum.c.tmp 
cc1plus-checksum.c; \
fi
 
Index: gcc/objc/Make-lang.in
===
--- gcc/objc/Make-lang.in   (revision 269111)
+++ gcc/objc/Make-lang.in   (working copy)
@@ -56,10 +56,9 @@ OBJC_OBJS = objc/objc-lang.o objc/objc-a
 
 objc_OBJS = $(OBJC_OBJS) cc1obj-checksum.o
 
-cc1obj-checksum.c : build/genchecksum$(build_exeext) checksum-options \
-$(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBDEPS)
-   build/genchecksum$(build_exeext) $(OBJC_OBJS) $(C_AND_OBJC_OBJS) \
-$(BACKEND) $(LIBDEPS) checksum-options > cc1obj-checksum.c.tmp && \
+cc1obj-checksum.c : build/genchecksum$(build_exeext) gtype-desc.o
+   build/genchecksum$(build_exeext) gtype-desc.o
+   > cc1obj-checksum.c.tmp && \
$(srcdir)/../move-if-change cc1obj-checksum.c.tmp cc1obj-checksum.c
 
 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) 
$(LIBDEPS)
Index: gcc/objcp/Make-lang.in
===
--- gcc/objcp/Make-lang.in  (revision 269111)
+++ gcc/objcp/Make-lang.in  (working copy)
@@ -59,10 +59,9 @@ OBJCXX_OBJS = objcp/objcp-act.o objcp/ob
 
 obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o
 
-cc1objplus-checksum.c : build/genchecksum$(build_exeext) checksum-options \
-   $(OBJCXX_OBJS) $(BACKEND) $(LIBDEPS)
-   build/g

GCC 8.3 Released

2019-02-22 Thread Jakub Jelinek
The GNU Compiler Collection version 8.3 has been released.

GCC 8.3 is a bug-fix release from the GCC 8 branch
containing important fixes for regressions and serious bugs in
GCC 8.2 with more than 153 bugs fixed since the previous release.
This release is available from the FTP servers listed at:

  http://www.gnu.org/order/ftp.html

Please do not contact me directly regarding questions or comments
about this release.  Instead, use the resources available from
http://gcc.gnu.org.

As always, a vast number of people contributed to this GCC release
-- far too many to thank them individually!


GCC 8.4 Status Report (2019-02-22)

2019-02-22 Thread Jakub Jelinek
Status
==

GCC 8.3 has been released and the branch is again open for regression
and documentation fixes.  History makes us expect a GCC 8.4 release
at the end of this year.


Quality Data


Priority  #   Change from last report
---   ---
P10
P2  209   +  16
P3   34   +   5
P4  162   -   1
P5   24
---   ---
Total P1-P3 243   +  21
Total   429   +  20


Previous Report
===

https://gcc.gnu.org/ml/gcc/2019-02/msg00078.html


Re: [RFC] Change PCH "checksum"

2019-02-22 Thread Jeff Law
On 2/22/19 4:29 AM, Richard Biener wrote:
> 
> GCC builds are currently not reproducible because for one the checksum
> we compute for PCH purposes (by genchecksum) nowaways includes checksums
> of archives (since we switched from checksumming a dummy executable
> to checksumming object files).  That includes dates (unless built with
> -D which we don't do).
> 
> Then later we switched to do thin archives so for example libbackend.a
> we checksum doesn't contain the actual code anymore...
> 
> A pragmatic approach to "fix" things would be to just checksum
> gtype-desc.o which should have enough state to cover PCH dependences
> if I understand the workings correctly (patch below - a single
> checksum would suffice so more simplifications are possible).
> 
> Another solution working on ELF systems with build-id support is
> simply forgo checksumming anything and rely on the executable
> build-id instead (pat^whack below as well).
> 
> Does anybody think that just checksumming gtype-desc.o is a
> degradation over the current state (which checksums thin archives)?
> 
> Thanks,
> Richard.
> 
> 2019-02-22  Richard Biener  
> 
>   c/
>   * Make-lang.in (cc1-checksum.c): Checksum only gtype-desc.o.
> 
>   cp/
>   * Make-lang.in (cc1plus-checksum.c): Checksum only gtype-desc.o.
> 
>   objc/
>   * Make-lang.in (cc1obj-checksum.c): Checksum only gtype-desc.o.
> 
>   objcp/
>   * Make-lang.in (cc1objplus-checksum.c): Checksum only gtype-desc.o.
ISTM that gtype-desc effectively describes the structure of all the GC data.

Given we're summing the thin-archives, we're already missing things like
a change in static data.  So I don't think your patch is a degradation
over the current state.  I'm not 100% sure the current state is correct
though :-)

jeff


Re: [RFC] Change PCH "checksum"

2019-02-22 Thread Jakub Jelinek
On Fri, Feb 22, 2019 at 08:47:09AM -0700, Jeff Law wrote:
> > 2019-02-22  Richard Biener  
> > 
> > c/
> > * Make-lang.in (cc1-checksum.c): Checksum only gtype-desc.o.
> > 
> > cp/
> > * Make-lang.in (cc1plus-checksum.c): Checksum only gtype-desc.o.
> > 
> > objc/
> > * Make-lang.in (cc1obj-checksum.c): Checksum only gtype-desc.o.
> > 
> > objcp/
> > * Make-lang.in (cc1objplus-checksum.c): Checksum only gtype-desc.o.
> ISTM that gtype-desc effectively describes the structure of all the GC data.
> 
> Given we're summing the thin-archives, we're already missing things like
> a change in static data.  So I don't think your patch is a degradation
> over the current state.  I'm not 100% sure the current state is correct
> though :-)

Does it cover everything though?  I believe gtype-desc.c only covers a small
portion, the rest is in all the gtype-*.h and gt-*.h headers that are
included in the various object files.
So, either we need to checksum all the object files that include gt-*.h or
gtype-*.h headers in addition to gtype-desc.o, or perhaps checksum
gtype.state ?  Though, that state wouldn't cover changes in ABI etc.

Jakub


Re: [RFC] Change PCH "checksum"

2019-02-22 Thread Richard Biener
On February 22, 2019 5:03:46 PM GMT+01:00, Jakub Jelinek  
wrote:
>On Fri, Feb 22, 2019 at 08:47:09AM -0700, Jeff Law wrote:
>> > 2019-02-22  Richard Biener  
>> > 
>> >c/
>> >* Make-lang.in (cc1-checksum.c): Checksum only gtype-desc.o.
>> > 
>> >cp/
>> >* Make-lang.in (cc1plus-checksum.c): Checksum only gtype-desc.o.
>> > 
>> >objc/
>> >* Make-lang.in (cc1obj-checksum.c): Checksum only gtype-desc.o.
>> > 
>> >objcp/
>> >* Make-lang.in (cc1objplus-checksum.c): Checksum only
>gtype-desc.o.
>> ISTM that gtype-desc effectively describes the structure of all the
>GC data.
>> 
>> Given we're summing the thin-archives, we're already missing things
>like
>> a change in static data.  So I don't think your patch is a
>degradation
>> over the current state.  I'm not 100% sure the current state is
>correct
>> though :-)
>
>Does it cover everything though?  I believe gtype-desc.c only covers a
>small
>portion, the rest is in all the gtype-*.h and gt-*.h headers that are
>included in the various object files.
>So, either we need to checksum all the object files that include gt-*.h
>or
>gtype-*.h headers in addition to gtype-desc.o, or perhaps checksum
>gtype.state ?  Though, that state wouldn't cover changes in ABI etc.

Gtype-desc.o does not cover everything indeed. But the current state doesn't 
cover Gtype-desc.o... Slightly better would be to Re-include frontend objects. 

Not sure why we checksummed build flags for example. Isn't it enough to handle 
gty walking changes?

Anyway, for suse I'm probably using the build-id thing. 

Richard. 

>   Jakub



AVR __progmem__ variable reading

2019-02-22 Thread Łukasz Kostka
Hi

I am using for a while now gcc and especially __progmem__ attribute. I’d like 
to report a feature request for gcc to handle reading from flash memory 
variables. Compiler has all the knowledge (target device, availability of LPM, 
ELPM instructions etc.) in order to properly interpret variable is accessed 
(eg. by array subscription).

This would remove need for any assembly code written to do this.
Make user code much cleaner.
GCC having all this knowledge can optimize end assembly code.
Simple attribute addition will switch from array in memory to array in flash.
Can serve as future implementations for other platforms.

What do you think ?




gcc-8-20190222 is now available

2019-02-22 Thread gccadmin
Snapshot gcc-8-20190222 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/8-20190222/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 8 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-8-branch 
revision 269136

You'll find:

 gcc-8-20190222.tar.xzComplete GCC

  SHA256=2dc39abb337369fe43f2fb760d2787a47cc4f934179b9b43f6790bddc5169a56
  SHA1=b9259d4c75e37aeb4cd7044a5993a71ff57f5da2

Diffs from 8-20190215 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-8
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.