Re: m68k allmodconfig build errors

2018-09-26 Thread Andreas Schwab
On Sep 26 2018, Geert Uytterhoeven wrote: > Isn't gcc-8 just assuming that any char array must contain a valid > NUL-terminated string, unless it is tagged with the nonstring attribute? No, only if you call strncpy on it and make it potentially non-terminated. Andreas. -- Andreas Schwab,

Re: m68k allmodconfig build errors

2018-09-26 Thread Andreas Schwab
On Sep 26 2018, Geert Uytterhoeven wrote: > Isn't gcc-8 just assuming that any char array must contain a valid > NUL-terminated string, unless it is tagged with the nonstring attribute? No, only if you call strncpy on it and make it potentially non-terminated. Andreas. -- Andreas Schwab,

Re: m68k allmodconfig build errors

2018-09-26 Thread Geert Uytterhoeven
Hi Andreas, On Tue, Jul 24, 2018 at 7:35 PM Andreas Schwab wrote: > On Jul 23 2018, Randy Dunlap wrote: > > I don't see that all of these string compare fields are null-terminated. > > That gcc has converted the strncmp calls to strcmp is a pretty strong > evidence that they are. Isn't gcc-8

Re: m68k allmodconfig build errors

2018-09-26 Thread Geert Uytterhoeven
Hi Andreas, On Tue, Jul 24, 2018 at 7:35 PM Andreas Schwab wrote: > On Jul 23 2018, Randy Dunlap wrote: > > I don't see that all of these string compare fields are null-terminated. > > That gcc has converted the strncmp calls to strcmp is a pretty strong > evidence that they are. Isn't gcc-8

Re: m68k allmodconfig build errors

2018-07-27 Thread Finn Thain
On Fri, 27 Jul 2018, Andreas Schwab wrote: > On Jul 27 2018, Finn Thain wrote: > > > Why doesn't gcc convert strncmp to __builtin_strcmp? > > It does. In fact, it first converts strncmp to __builtin_strncmp, then > optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded > to

Re: m68k allmodconfig build errors

2018-07-27 Thread Finn Thain
On Fri, 27 Jul 2018, Andreas Schwab wrote: > On Jul 27 2018, Finn Thain wrote: > > > Why doesn't gcc convert strncmp to __builtin_strcmp? > > It does. In fact, it first converts strncmp to __builtin_strncmp, then > optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded > to

Re: m68k allmodconfig build errors

2018-07-27 Thread Andreas Schwab
On Jul 27 2018, Finn Thain wrote: > Why doesn't gcc convert strncmp to __builtin_strcmp? It does. In fact, it first converts strncmp to __builtin_strncmp, then optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded to a call to strcmp. Andreas. -- Andreas Schwab,

Re: m68k allmodconfig build errors

2018-07-27 Thread Andreas Schwab
On Jul 27 2018, Finn Thain wrote: > Why doesn't gcc convert strncmp to __builtin_strcmp? It does. In fact, it first converts strncmp to __builtin_strncmp, then optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded to a call to strcmp. Andreas. -- Andreas Schwab,

Re: m68k allmodconfig build errors

2018-07-26 Thread Finn Thain
On Thu, 26 Jul 2018, Randy Dunlap wrote: > > > > The untested patch below may work. It seems that it may be relevant to > > both arc and m68k: > > > I got back to looking at the build errors. I agree with Andreas that > all of the fields in question are null-terminated, so Finn's patch

Re: m68k allmodconfig build errors

2018-07-26 Thread Finn Thain
On Thu, 26 Jul 2018, Randy Dunlap wrote: > > > > The untested patch below may work. It seems that it may be relevant to > > both arc and m68k: > > > I got back to looking at the build errors. I agree with Andreas that > all of the fields in question are null-terminated, so Finn's patch

Re: m68k allmodconfig build errors

2018-07-26 Thread Randy Dunlap
On 07/23/2018 09:49 PM, Finn Thain wrote: > On Mon, 23 Jul 2018, Randy Dunlap wrote: > >> On 07/20/2018 12:20 AM, Andreas Schwab wrote: >>> On Jul 19 2018, Randy Dunlap wrote: >>> block/partitions/ldm.o: In function `ldm_partition': ldm.c:(.text+0x1900): undefined reference to `strcmp'

Re: m68k allmodconfig build errors

2018-07-26 Thread Randy Dunlap
On 07/23/2018 09:49 PM, Finn Thain wrote: > On Mon, 23 Jul 2018, Randy Dunlap wrote: > >> On 07/20/2018 12:20 AM, Andreas Schwab wrote: >>> On Jul 19 2018, Randy Dunlap wrote: >>> block/partitions/ldm.o: In function `ldm_partition': ldm.c:(.text+0x1900): undefined reference to `strcmp'

Re: m68k allmodconfig build errors

2018-07-24 Thread Andreas Schwab
On Jul 23 2018, Randy Dunlap wrote: > I don't see that all of these string compare fields are null-terminated. That gcc has converted the strncmp calls to strcmp is a pretty strong evidence that they are. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5

Re: m68k allmodconfig build errors

2018-07-24 Thread Andreas Schwab
On Jul 23 2018, Randy Dunlap wrote: > I don't see that all of these string compare fields are null-terminated. That gcc has converted the strncmp calls to strcmp is a pretty strong evidence that they are. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5

Re: m68k allmodconfig build errors

2018-07-23 Thread Finn Thain
On Mon, 23 Jul 2018, Randy Dunlap wrote: > On 07/20/2018 12:20 AM, Andreas Schwab wrote: > > On Jul 19 2018, Randy Dunlap wrote: > > > >> block/partitions/ldm.o: In function `ldm_partition': > >> ldm.c:(.text+0x1900): undefined reference to `strcmp' > >> ldm.c:(.text+0x1964): undefined

Re: m68k allmodconfig build errors

2018-07-23 Thread Finn Thain
On Mon, 23 Jul 2018, Randy Dunlap wrote: > On 07/20/2018 12:20 AM, Andreas Schwab wrote: > > On Jul 19 2018, Randy Dunlap wrote: > > > >> block/partitions/ldm.o: In function `ldm_partition': > >> ldm.c:(.text+0x1900): undefined reference to `strcmp' > >> ldm.c:(.text+0x1964): undefined

Re: m68k allmodconfig build errors

2018-07-23 Thread Randy Dunlap
On 07/20/2018 12:20 AM, Andreas Schwab wrote: > On Jul 19 2018, Randy Dunlap wrote: > >> block/partitions/ldm.o: In function `ldm_partition': >> ldm.c:(.text+0x1900): undefined reference to `strcmp' >> ldm.c:(.text+0x1964): undefined reference to `strcmp' >> drivers/rtc/rtc-proc.o: In function

Re: m68k allmodconfig build errors

2018-07-23 Thread Randy Dunlap
On 07/20/2018 12:20 AM, Andreas Schwab wrote: > On Jul 19 2018, Randy Dunlap wrote: > >> block/partitions/ldm.o: In function `ldm_partition': >> ldm.c:(.text+0x1900): undefined reference to `strcmp' >> ldm.c:(.text+0x1964): undefined reference to `strcmp' >> drivers/rtc/rtc-proc.o: In function

Re: m68k allmodconfig build errors

2018-07-23 Thread Randy Dunlap
On 07/19/2018 10:17 PM, Finn Thain wrote: > On Thu, 19 Jul 2018, Randy Dunlap wrote: > >> Hi Geert, >> >> I am seeing a few errors when cross-building m68k on x86_64, using the >> toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/ >> (thanks, Arnd). (so this is gcc 8.1.0) >> >>

Re: m68k allmodconfig build errors

2018-07-23 Thread Randy Dunlap
On 07/19/2018 10:17 PM, Finn Thain wrote: > On Thu, 19 Jul 2018, Randy Dunlap wrote: > >> Hi Geert, >> >> I am seeing a few errors when cross-building m68k on x86_64, using the >> toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/ >> (thanks, Arnd). (so this is gcc 8.1.0) >> >>

Re: m68k allmodconfig build errors

2018-07-20 Thread Andreas Schwab
On Jul 19 2018, Randy Dunlap wrote: > block/partitions/ldm.o: In function `ldm_partition': > ldm.c:(.text+0x1900): undefined reference to `strcmp' > ldm.c:(.text+0x1964): undefined reference to `strcmp' > drivers/rtc/rtc-proc.o: In function `is_rtc_hctosys': > rtc-proc.c:(.text+0x290): undefined

Re: m68k allmodconfig build errors

2018-07-20 Thread Andreas Schwab
On Jul 19 2018, Randy Dunlap wrote: > block/partitions/ldm.o: In function `ldm_partition': > ldm.c:(.text+0x1900): undefined reference to `strcmp' > ldm.c:(.text+0x1964): undefined reference to `strcmp' > drivers/rtc/rtc-proc.o: In function `is_rtc_hctosys': > rtc-proc.c:(.text+0x290): undefined

Re: m68k allmodconfig build errors

2018-07-19 Thread Finn Thain
On Thu, 19 Jul 2018, Randy Dunlap wrote: > Hi Geert, > > I am seeing a few errors when cross-building m68k on x86_64, using the > toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/ > (thanks, Arnd). (so this is gcc 8.1.0) > > block/partitions/ldm.o: In function `ldm_partition':

Re: m68k allmodconfig build errors

2018-07-19 Thread Finn Thain
On Thu, 19 Jul 2018, Randy Dunlap wrote: > Hi Geert, > > I am seeing a few errors when cross-building m68k on x86_64, using the > toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/ > (thanks, Arnd). (so this is gcc 8.1.0) > > block/partitions/ldm.o: In function `ldm_partition':

m68k allmodconfig build errors

2018-07-19 Thread Randy Dunlap
Hi Geert, I am seeing a few errors when cross-building m68k on x86_64, using the toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/ (thanks, Arnd). (so this is gcc 8.1.0) block/partitions/ldm.o: In function `ldm_partition': ldm.c:(.text+0x1900): undefined reference to `strcmp'

m68k allmodconfig build errors

2018-07-19 Thread Randy Dunlap
Hi Geert, I am seeing a few errors when cross-building m68k on x86_64, using the toolchain at https://mirrors.edge.kernel.org/pub/tools/crosstool/ (thanks, Arnd). (so this is gcc 8.1.0) block/partitions/ldm.o: In function `ldm_partition': ldm.c:(.text+0x1900): undefined reference to `strcmp'