Re: [next] x86_64 defconfig failed with clang-10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 17, 2021 at 01:39:46PM -0700, Nick Desaulniers wrote:
> If we can make the compile time validation done instead at runtime for
> clang-10, that would be preferable. Then when we drop clang-10
> support, we can revert that.  Looking at the diff, I think we could
> reinstate parts like so:

> +#if CLANG_VERSION <= 100000
> +       if (size <=  64 * 1024 * 1024) return 26;
> +#endif

> +#if CLANG_VERSION <= 10000
> +       ,INIT_KMALLOC_INFO(67108864, 64M)
> +#endif

I see no reason to add those lines. I removed them because kmalloc
isn't written to support 64MB size, and it doesn't depend on clang
version.

am I misunderstanding your patch?

the problem here is clang-10 is mis-understanding constant argument as
non-constant. and the patch that Nathan linked makes compiler do run-time
evaluation when clang version is less than 11.

Thanks,
Hyeonggon




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux