Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617260 - sys-devel/gcc-7.1 version bump
Summary: sys-devel/gcc-7.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 617272 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-02 17:04 UTC by Alexei Kharitonov
Modified: 2017-05-08 20:48 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
repatched patch-pack for gcc-7.1.0 (gcc-7.1.0-patches-1.1.tar.bz2,7.75 KB, patch)
2017-05-04 09:28 UTC, brankob
Details | Diff
gcc-7.1.0 ebuild (gcc-7.1.0.ebuild,534 bytes, text/plain)
2017-05-04 09:33 UTC, brankob
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei Kharitonov 2017-05-02 17:04:55 UTC
GCC 7.1 is out.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2017-05-02 18:23:47 UTC
*** Bug 617272 has been marked as a duplicate of this bug. ***
Comment 2 Brian Evans (RETIRED) gentoo-dev 2017-05-02 18:24:57 UTC
Please don't notify us of 0-day bumps.

The volunteers at Gentoo do their best to get to things in a timely manner
Comment 3 Yi Yang 2017-05-02 19:26:50 UTC
Yes. We always had a tracking bug for porting though, so I wasn't thinking about "I need to notify people" when I created my bug. I was thinking along "we'll need a tracking bug somewhere before progress can happen, and we don't have such a tracking bug by now, so why not create one". I'm not sure if such mentality is discouraged.

Maybe I need to write a request to become a volunteer on the toolchain team some day...
Comment 4 brankob 2017-05-03 12:12:21 UTC
I have patches from 6.3.0, tweaked for 7.0.1_rcx.

They work with 7.1.0 fine, too.

Do I attache them here or will this again trigger dev rants ?
Comment 5 Cănărău Constantin 2017-05-04 07:07:55 UTC
I wouldn't mind to see that patches, but I am not a Gentoo developer, of course. 
Now, on a serious manner, why not create a topic on the forum under Unsupported section ?
Comment 6 brankob 2017-05-04 09:28:57 UTC
Created attachment 471594 [details, diff]
repatched patch-pack for gcc-7.1.0
Comment 7 brankob 2017-05-04 09:33:11 UTC
Created attachment 471596 [details]
gcc-7.1.0 ebuild

It's an ebuild that I copied from 6.3.0 to 7.0.1_rcx and then to 7.1.0

I don't remember changing anything except PATCH_VER

I changed it to 1.1 so I don't collide with gentoo patchset, when they release 7.1
Comment 8 Matthias Maier gentoo-dev 2017-05-04 23:15:41 UTC
I have pushed an ebuild for gcc-7.1.0 to my overlay [1].

It essentially consists of the same patchset modification as attached to this bug report:

  - reapplied 13_all_default-ssp-fix.patch
  - temporarily removed 29_all_arm_armv4t-default.patch
  - temporarily removed 42_all_superh_default-multilib.patch


@toolchain, I am currently giving it a quick run at recompiling a stage-3 in a libvirt-lxc container. Would you mind to add 7.1.0 to the tree in the near future (say next two weeks) if no regressions show up?
We need a version in tree to work on bug #617524.


[1] https://gitweb.gentoo.org/repo/dev/tamiko.git/
Comment 9 Cănărău Constantin 2017-05-06 10:34:11 UTC
I recompiled world with gcc-7.1.0. Encountered ICE's regarding graphite on:
media-libs/webrtc-audio-processing no-graphite
media-libs/opus no-graphite
dev-libs/libbsd no-graphite
media-libs/libvpx no-graphite
app-arch/p7zip no-graphite
media-libs/adplug no-graphite
media-libs/libvorbis no-graphite
media-libs/flac no-graphite
dev-libs/oniguruma no-graphite
media-libs/speex no-graphite
media-libs/libsndfile no-graphite
media-libs/libtheora no-graphite
app-cdr/cdrkit no-graphite
media-video/ffmpeg no-graphite
media-libs/gegl no-graphite
media-plugins/audacious-plugins no-graphite
media-gfx/gimp no-graphite
dev-libs/icu no-graphite
Firefox and thunderbird are affected by bug 580726. Interesting, they compile fine with gcc-6. sandbox-2.10-r4 here.

Overall, a much painless transition than gcc-5 and 6 at their's time.
Comment 10 Matthias Maier gentoo-dev 2017-05-07 15:26:28 UTC
commit ee9917f9bef7e0cd837113745cd4d2329e9e9c51
Author: Matthias Maier <tamiko@gentoo.org>
Date:   Sun May 7 10:18:14 2017 -0500

    sys-devel/gcc: add 7.1.0 to the tree, bug #617260
    
    Package-Manager: Portage-2.3.5, Repoman-2.3.2



(In reply to Cănărău Constantin from comment #9)

> I recompiled world with gcc-7.1.0. Encountered ICE's regarding graphite on:
> [...]

Thanks a lot for testing!

Would you mind cross-checking with the buglist for the gcc-6 porting (bug #582084) and if not mentioned there, open a separate bug for each package and add it as a blogger to #617524
Comment 11 Cănărău Constantin 2017-05-07 15:49:48 UTC
I do not know if I should open a bug for every failed packages with graphite as every of them are affected by gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68823
Perhaps when a solution will be available upstream ?

Every recent gcc new major release came with something similar, for example bug 615876 for 6.3

Thank you for your work!
Comment 12 Aric Belsito 2017-05-08 18:52:11 UTC
@canarauc
Interestingly enough, I'm using graphite and I have not had any ICE's.

@tamiko
I'm getting issues building grub with gcc-7.1.0. specifically, configure tests aren't working even though '-nostdlib' is in LDFLAGS. It looks like 13_all_default-ssp-fix.patch is not working.

sample from config.log:
```
configure:25487: gcc -o conftest  -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations  -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe -fno-asynchronous-unwind-tables -fno-unwind-tables  -Wall -W  -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC  -m32 -Wl,-arch,i386 -nostdlib -static conftest.c  >&5
/tmp/ccBADkIp.o: In function `__main':
/home/adb/Downloads/grub-2.02/conftest.c:350: undefined reference to `__stack_chk_fail_local'
/tmp/ccBADkIp.o: In function `main':
/home/adb/Downloads/grub-2.02/conftest.c:358: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/x86_64-gentoo-linux-musl/7.1.0/../../../../x86_64-gentoo-linux-musl/bin/ld: conftest: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/lib/gcc/x86_64-gentoo-linux-musl/7.1.0/../../../../x86_64-gentoo-linux-musl/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
```
Comment 13 Aric Belsito 2017-05-08 19:51:51 UTC
After staring at the gcc source code for about an hour, I think i found it:

In 13_all_default_ssp-fix.patch there's a typo:

```
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1145,6 +1145,7 @@
  %{-help=*:--help=%*}\
  %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
  %{fsyntax-only:-o %j} %{-param*}\
+ %{nostlib:-nostdlib}\
  %{coverage:-fprofile-arcs -ftest-coverage}\
  %{fprofile-arcs|fprofile-generate*|coverage:\
    %{!fprofile-update=single:\
We disable ssp on -nostdlib and -ffreestanding as we did on older gcc
and change the buffer size.
```

"nostlib" should be "nostdlib"

Please fix this ASAP
Comment 14 Cănărău Constantin 2017-05-08 20:01:55 UTC
Are you using lto ? Also bug 580726 is present when using both lto and graphite.
Comment 15 Aric Belsito 2017-05-08 20:04:52 UTC
(In reply to Cănărău Constantin from comment #14)
> Are you using lto ? Also bug 580726 is present when using both lto and
> graphite.

Yes, I'm using lto.
My C/XXFLAGS are 
"-march=native -O2 -pipe -flto=2 -floop-nest-optimize -fuse-linker-plugin"
Comment 16 Cănărău Constantin 2017-05-08 20:22:21 UTC
Those are possible culprits then: -fno-fat-lto-objects -fuse-ld=gold -fgraphite-identity -ftree-vectorize -fgcse-las. 
I'll have a look tomorrow.
Comment 17 Aric Belsito 2017-05-08 20:32:01 UTC
(In reply to Cănărău Constantin from comment #16)
> Those are possible culprits then: -fno-fat-lto-objects -fuse-ld=gold
> -fgraphite-identity -ftree-vectorize -fgcse-las. 
> I'll have a look tomorrow.

Just FYI,

"-fgraphite-identity" is redundant with "-floop-nest-optimize" in GCC 7.1 (if you look at the source code.)

"-fno-fat-lto-objects" has been the default behaviour for LTO since.. GCC 5...?

I'd say it's most likely "-fuse-ld=gold" that's causing you issues -- for that matter, why didn't you just set ld to bfd using `binutils-config --linked ld.gold`?

I'm pretty sure "-ftree-vectorize" "-fgcse-las" are pretty safe, but more likely to give you runtime issues.
Comment 18 Aric Belsito 2017-05-08 20:33:41 UTC
> I'd say it's most likely "-fuse-ld=gold" that's causing you issues -- for
> that matter, why didn't you just set ld to bfd using `binutils-config
> --linked ld.gold`?

*ld to gold using `binutils-config --linker ld.gold`
Comment 19 Matthias Maier gentoo-dev 2017-05-08 20:46:03 UTC
(In reply to Aric Belsito from comment #13)
> After staring at the gcc source code for about an hour, I think i found it:
> 
> In 13_all_default_ssp-fix.patch there's a typo:
>
> [...]
> 
> Please fix this ASAP

*ouch*



commit b358e3be9843e80cd2a752686cba21a838be33c1
Author: Matthias Maier <tamiko@gentoo.org>
Date:   Mon May 8 15:42:45 2017 -0500

    sys-devel/gcc: Bump patchset for gcc-7.1.0, bug #617260 comment 13
    
      This fixes a typo in patch 13_all_default_ssp-fix.patch
    
    Package-Manager: Portage-2.3.5, Repoman-2.3.2
Comment 20 Matthias Maier gentoo-dev 2017-05-08 20:48:30 UTC
(In reply to Cănărău Constantin from comment #11)
> I do not know if I should open a bug for every failed packages with graphite
> as every of them are affected by gcc bug
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68823

> Perhaps when a solution will be available upstream ?

Can you please open *one* bug for gcc-7.1.0 for the graphite issue?