Thread (13 messages) 13 messages, 7 authors, 2019-01-08

Re: [PATCH] Raise the minimum required gcc version to 4.6

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2019-01-08 14:09:59
Also in: lkml

On Sat, Dec 29, 2018 at 3:25 PM Geert Uytterhoeven [off-list ref] wrote:
On Fri, Aug 24, 2018 at 12:00 AM Joe Perches [off-list ref] wrote:
quoted
On Thu, 2018-08-23 at 23:52 +0200, Geert Uytterhoeven wrote:
quoted
Reverted locally (incl. the follow-up), applied Andrew's fix, detected new
warnings in v4.18+, and sent patches where it makes sense...
Thanks for that.
Given the rise of anonymous unions all over the place, I gave up, and
have upgraded from gcc 4.1.2 to 7.3.0 for cross-compiling m68k kernels.
One good things is that the kernel size for an atari_defconfig kernel dropped
by 3.7% or 163 KiB.

For the record, below is a list of differences in generated warnings.
Note that the source trees are not identical, as the tree used with
gcc-7.3.0 did not include any workarounds I needed for gcc-4.1.2.
All warnings flagged by gcc 4.1.2 should be false positives (iff I did a
good job during the last few years ;-)

I plan to repeat the exercise with gcc-8.2.0 (after v4.21-rc1 or so).
As promised, gcc-7.3.0 => gcc-8.2.0:

    *** ERRORS ***

    4 error regressions:
      + error: devfreq.c: undefined reference to `strcmp':  => .text+0x9c6)
      + error: ldm.c: undefined reference to `strcmp':  =>
.text+0x1900), .text+0x1964), .text+0x19a0), .text+0x193c)
      + error: proc.c: undefined reference to `strcmp':  =>
.text+0x18c), .text+0x178)
      + error: xattr.c: undefined reference to `strcmp':  =>
.text+0xbaa), .text+0xbf0), .text+0x2e8), .text+0x268), .text+0x97a),
.text+0x9be), .text+0x3d4)

Hmm, time to fix the auto-strncmp-to-strcmp-conversion for good...

    *** WARNINGS ***

    1 warning regressions:
      + drivers/dio/dio.c: warning: ‘strcpy’ writing 69 or more bytes
into a region of size 64 overflows the destination
[-Wstringop-overflow=]:  => 240:17

That's a nice one, it found a 15 year old bug. Patch sent ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help