On Tue, Oct 16, 2018 at 8:18 AM Chris Wilson <ch...@chris-wilson.co.uk> wrote: > > Quoting Jani Nikula (2018-10-16 13:29:37) > > When building the kernel with Clang with defconfig and CONFIG_64BIT > > disabled, vmlinux fails to link because of the BUILD_BUG in > > _print_param. > > > > ld: drivers/gpu/drm/i915/i915_params.o: in function `i915_params_dump': > > i915_params.c:(.text+0x56): undefined reference to > > `__compiletime_assert_191' > > > > This function is semantically invalid unless the code is first inlined > > then constant folded, which doesn't work for Clang because semantic > > analysis happens before optimization/inlining. > > > > [The above written by Nathan Chancellor <natechancel...@gmail.com>] > > > > Use WARN_ONCE() instead of BUILD_BUG() to avoid the problem. The > > WARN_ONCE() should get optimized away unless there's a type that's not > > handled by _print_param(). > > > > References: https://github.com/ClangBuiltLinux/linux/issues/191 > > References: > > 20181009171401.14980-1-natechancellor@gmail.com">http://mid.mail-archive.com/20181009171401.14980-1-natechancellor@gmail.com > > Cc: Nick Desaulniers <ndesaulni...@google.com> > > Cc: Nathan Chancellor <natechancel...@gmail.com> > > Cc: Chris Wilson <ch...@chris-wilson.co.uk> > > Reported-by: Nick Desaulniers <ndesaulni...@google.com> > > Reported-by: Nathan Chancellor <natechancel...@gmail.com> > > Signed-off-by: Jani Nikula <jani.nik...@intel.com> > > Fair enough, > Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk> > -Chris
Thanks for the fix, we appreciate it! Reviewed-by: Nick Desaulniers <ndesaulni...@google.com> -- Thanks, ~Nick Desaulniers _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx