public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of Linus' tree
Date: Wed, 23 Apr 2025 09:55:03 +1000	[thread overview]
Message-ID: <20250423095503.638eb761@canb.auug.org.au> (raw)
In-Reply-To: <CAHk-=wjsMVpEvwq=+wAx20RWe_25LDoiMd34Msd4Mrww_-Z3Fw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5626 bytes --]

Hi Linus,

On Tue, 22 Apr 2025 08:59:00 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> On Tue, 22 Apr 2025 at 03:47, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > These builds were done with a gcc 11.1.0 cross compiler.  
> 
> That sounds like there might be some issue with the cross-compiler
> logic somewhere, because the Makefile logic is using the standard
> 
>     KBUILD_CFLAGS += $(call cc-option, xyzzy)
> 
> pattern.  We literally have seven other occurrences of that same logic
> just in that same Makefile above it (and many more in other
> makefiles).
> 
> IOW, it's *supposed* to only actually use the flag if the compiler
> supports it, so having the compiler then say "I don't recognize that
> option" is kind of odd. We've explicitly tested that the compiler
> supports it.

Yeah, I thought it was strange.

> Does the warning happen for all files that get built, or just some
> specific ones? I wonder if we have some issue where we end up using
> two different compilers (I'd assume native and cross-built), and we
> use KBUILD_CFLAGS for the wrong compiler (or we use cc-option with the
> wrong compiler, but I'd expect that to affect *everything* - that
> 'cc-option' thing is not some kind of unusual pattern).

It happens only for a couple of files.  Here is the full sparc64 build
log:

------------------------------------------------------------------------
<stdin>:1519:2: warning: #warning syscall clone3 not implemented [-Wcpp]
cc1: note: unrecognized command-line option '-Wno-unterminated-string-initialization' may have been intended to silence earlier diagnostics
/home/sfr/next/next/arch/sparc/vdso/vclock_gettime.c:274:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes]
  274 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
      | ^~~~~~~~~~~~~~~~~~~~
/home/sfr/next/next/arch/sparc/vdso/vclock_gettime.c:302:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes]
  302 | __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sfr/next/next/arch/sparc/vdso/vclock_gettime.c:327:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes]
  327 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
      | ^~~~~~~~~~~~~~~~~~~
/home/sfr/next/next/arch/sparc/vdso/vclock_gettime.c:363:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes]
  363 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: note: unrecognized command-line option '-Wno-unterminated-string-initialization' may have been intended to silence earlier diagnostics
In file included from /home/sfr/next/next/arch/sparc/vdso/vdso32/vclock_gettime.c:22:
/home/sfr/next/next/arch/sparc/vdso/vdso32/../vclock_gettime.c:274:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes]
  274 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
      | ^~~~~~~~~~~~~~~~~~~~
/home/sfr/next/next/arch/sparc/vdso/vdso32/../vclock_gettime.c:302:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes]
  302 | __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sfr/next/next/arch/sparc/vdso/vdso32/../vclock_gettime.c:327:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes]
  327 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
      | ^~~~~~~~~~~~~~~~~~~
/home/sfr/next/next/arch/sparc/vdso/vdso32/../vclock_gettime.c:363:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes]
  363 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: note: unrecognized command-line option '-Wno-unterminated-string-initialization' may have been intended to silence earlier diagnostics
/home/sfr/next/next/kernel/fork.c: In function '__do_sys_clone3':
/home/sfr/next/next/kernel/fork.c:3150:2: warning: #warning clone3() entry point is missing, please fix [-Wcpp]
 3150 | #warning clone3() entry point is missing, please fix
      |  ^~~~~~~
/home/sfr/next/next/kernel/fork.c: At top level:
cc1: note: unrecognized command-line option '-Wno-unterminated-string-initialization' may have been intended to silence earlier diagnostics
/home/sfr/next/next/kernel/fork.c:3150:2: warning: #warning clone3() entry point is missing, please fix [-Wcpp]
 3150 | #warning clone3() entry point is missing, please fix
      |  ^~~~~~~
cc1: note: unrecognized command-line option '-Wno-unterminated-string-initialization' may have been intended to silence earlier diagnostics
WARNING: modpost: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned.
Is "_mcount" prototyped in <asm/asm-prototypes.h>?
------------------------------------------------------------------------

However:

$ /opt/cross/gcc-11.1.0-nolibc/sparc64-linux/bin/sparc64-linux-gcc -Werror -Wno-unterminated-string-initialization -c -x c /dev/null
$ echo $?
0
$ /opt/cross/gcc-11.1.0-nolibc/sparc64-linux/bin/sparc64-linux-gcc -Werror -Wunterminated-string-initialization -c -x c /dev/null
sparc64-linux-gcc: error: unrecognized command-line option '-Wunterminated-string-initialization'
$ echo $?
1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2025-04-22 23:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 10:47 linux-next: build warning after merge of Linus' tree Stephen Rothwell
2025-04-22 15:59 ` Linus Torvalds
2025-04-22 17:50   ` Thomas Weißschuh
2025-04-22 18:20     ` Linus Torvalds
2025-04-22 20:48       ` Nathan Chancellor
2025-04-22 20:49       ` Linus Torvalds
2025-04-27 11:42       ` David Laight
2025-04-22 23:55   ` Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-11-27  2:10 Stephen Rothwell
2025-12-16  1:08 ` Stephen Rothwell
2025-03-05  9:46 Stephen Rothwell
2024-10-01  3:47 Stephen Rothwell
2024-10-01 15:02 ` Christian Brauner
2024-03-13  4:04 Stephen Rothwell
2023-05-08  4:44 Stephen Rothwell
2023-05-08  6:28 ` Sakari Ailus
2021-11-23  5:29 Stephen Rothwell
2022-01-20  3:27 ` Stephen Rothwell
2021-10-05  9:18 Stephen Rothwell
2021-10-05 10:10 ` Jeff Layton
2021-10-01  7:18 Stephen Rothwell
2021-10-01 16:33 ` Eric Dumazet
2019-07-29  4:04 Stephen Rothwell
2019-07-29  6:58 ` Takashi Iwai
2019-07-29  7:03   ` Johannes Berg
2019-07-29  7:07     ` Takashi Iwai
2019-07-29  8:20       ` Stephen Rothwell

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=20250423095503.638eb761@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=torvalds@linux-foundation.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