[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNARSHhKr=4jrAFUrnVwU6Yw3reybku3CEVxDnSKqBptRVQ@mail.gmail.com>
Date: Wed, 23 Oct 2024 12:29:26 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Koakuma <koachan@...tonmail.com>, Andreas Larsson <andreas@...sler.com>,
Andrew Morton <akpm@...ux-foundation.org>, "David S. Miller" <davem@...emloft.net>,
Nick Desaulniers <ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>, glaubitz@...sik.fu-berlin.de,
Nicolas Schier <nicolas@...sle.eu>, sparclinux@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
linux-kbuild@...r.kernel.org
Subject: Re: [PATCH v2 0/2] sparc/build: Rework CFLAGS for clang compatibility
On Wed, Oct 23, 2024 at 5:07 AM Nathan Chancellor <nathan@...nel.org> wrote:
>
> On Wed, Oct 23, 2024 at 04:10:01AM +0900, Masahiro Yamada wrote:
> > I applied this patch set, but I still observe a build error.
> ...
> > masahiro@zoe:~/workspace/linux-kbuild(kbuild)$ make
> > LLVM=~/tools/llvm-latest/bin/ ARCH=sparc sparc64_defconfig all
> ...
> > clang: error: unsupported argument '--undeclared-regs' to option '-Wa,'
>
> Koakuma might know more than I do but I did not test either the
> integrated assembler or the rest of the LLVM tools; I only tested clang
> for CC. As far as I am aware, that has been where most of the effort in
> llvm-project has been going and I think there are probably other fixes
> that will be needed for the other tools. The command I tested was:
>
> $ make -skj"$(nproc)" \
> ARCH=sparc64 \
> CC=clang \
> CROSS_COMPILE=sparc64-linux-gnu- \
> LLVM_IAS=0 \
> mrproper defconfig all
With running this command in Ubuntu 24.10, I got improvements,
but I still got another build error. (unknown argument: '-mv8plus')
masahiro@...6c94ac88c:~/workspace/linux-kbuild$ make -skj"$(nproc)"
ARCH=sparc64 CC=clang CROSS_COMPILE=sparc64-linux-gnu- LLVM_IAS=0
mrproper defconfig all
<stdin>:1519:2: warning: syscall clone3 not implemented [-W#warnings]
1519 | #warning syscall clone3 not implemented
| ^
1 warning generated.
arch/sparc/vdso/vclock_gettime.c:274:1: warning: no previous prototype
for function '__vdso_clock_gettime' [-Wmissing-prototypes]
274 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
| ^
arch/sparc/vdso/vclock_gettime.c:273:9: note: declare 'static' if the
function is not intended to be used outside of this translation unit
273 | notrace int
| ^
| static
arch/sparc/vdso/vclock_gettime.c:302:1: warning: no previous prototype
for function '__vdso_clock_gettime_stick' [-Wmissing-prototypes]
302 | __vdso_clock_gettime_stick(clockid_t clock, struct
__kernel_old_timespec *ts)
| ^
arch/sparc/vdso/vclock_gettime.c:301:9: note: declare 'static' if the
function is not intended to be used outside of this translation unit
301 | notrace int
| ^
| static
arch/sparc/vdso/vclock_gettime.c:327:1: warning: no previous prototype
for function '__vdso_gettimeofday' [-Wmissing-prototypes]
327 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct
timezone *tz)
| ^
arch/sparc/vdso/vclock_gettime.c:326:9: note: declare 'static' if the
function is not intended to be used outside of this translation unit
326 | notrace int
| ^
| static
arch/sparc/vdso/vclock_gettime.c:363:1: warning: no previous prototype
for function '__vdso_gettimeofday_stick' [-Wmissing-prototypes]
363 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv,
struct timezone *tz)
| ^
arch/sparc/vdso/vclock_gettime.c:362:9: note: declare 'static' if the
function is not intended to be used outside of this translation unit
362 | notrace int
| ^
| static
4 warnings generated.
clang: error: unknown argument: '-mv8plus'
make[5]: *** [scripts/Makefile.build:229:
arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
sparc64-linux-gnu-ld: warning: arch/sparc/vdso/vdso-note.o: missing
.note.GNU-stack section implies executable stack
sparc64-linux-gnu-ld: NOTE: This behaviour is deprecated and will be
removed in a future version of the linker
make[5]: Target 'arch/sparc/vdso/' not remade because of errors.
make[4]: *** [scripts/Makefile.build:478: arch/sparc/vdso] Error 2
masahiro@...6c94ac88c:~/workspace/linux-kbuild$ clang --version
Ubuntu clang version 19.1.1 (1ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin
Is this version too old, or am I missing something?
> I see this as more of a stepping stone series to make testing those
> other components easier as time goes on, hence why I did not really
> consider user facing documentation either like you brought up in the
> other thread.
>
> Cheers,
> Nathan
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists