[Intel-gfx] intel-ddx: v2.21.14 breaks with llvm/clang v3.3

Sedat Dilek sedat.dilek at gmail.com
Mon Aug 5 17:48:20 CEST 2013


On Mon, Aug 5, 2013 at 3:04 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Mon, Aug 05, 2013 at 02:15:19PM +0200, Sedat Dilek wrote:
>> On Sun, Aug 4, 2013 at 2:08 PM, Sedat Dilek <sedat.dilek at gmail.com> wrote:
>> > On Sun, Aug 4, 2013 at 1:53 PM, Sedat Dilek <sedat.dilek at gmail.com> wrote:
>> >> Hi,
>> >>
>> >> I am here on Ubuntu/precise AMD64 and using the llvm/clang prebuilt
>> >> toolchain from <llvm.org>.
>> >>
>> >> From my build.log:
>> >> ...
>> >> make[3]: Entering directory
>> >> `/home/wearefam/src/xserver-xorg-video-intel/xf86-video-intel-git/src/sna'
>> >>   CC     blt.lo
>> >> warning: unknown warning option '-Wno-maybe-uninitialized'; did you
>> >> mean '-Wno-uninitialized'? [-Wunknown-warning-option]
>
> [bisected to]
>
>> > $ git revert --no-edit a3eea6e61e15a147165400c81eab82a14a9ce2fe
>> > [XF86-Video-Intel-v2.21.14 bf797f2] Revert "Suppress misleading
>> > warnings for -Wmaybe-uninitialized"
>> >  1 file changed, 1 deletion(-)
>> >
>>
>> Can you provide a fix for that, too?
>
> It uses XORG_TESTSET_CFLAG() to see whether the compiler accepts the
> flag. It appears that your compiler does, but only to complain about it
> later. If you can suggest a way to correctly determine how to feed flags
> into your compiler, we need to fix xorg-macros.
>
> If you try wrapping that block in an "if test $CC = gcc" and see what
> happens for a simple hack.

I applied "sna-Define-fast-function-attribute-for-old-gcc-or-other-compilers.patch"
and "[PATCH] Use the right variable names for the compiler flags in
XORG_TESTSET_CFLAGS" here...

$ diff -uprN /usr/share/aclocal/xorg-macros.m4.orig
/usr/share/aclocal/xorg-macros.m4
--- /usr/share/aclocal/xorg-macros.m4.orig      2013-08-05
17:34:10.514922178 +0200
+++ /usr/share/aclocal/xorg-macros.m4   2013-08-05 17:35:40.974919341 +0200
@@ -1543,11 +1543,11 @@ fi
 found="no"
 m4_foreach([flag], m4_cdr($@), [
        if test $found = "no" ; then
-               if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+               if test
"x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
                        PREFIX[FLAGS]="$PREFIX[FLAGS]
-Werror=unknown-warning-option"
                fi

-               if test "x$xorg_testset_unused_command_line_argument"
= "xyes" ; then
+               if test
"x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes"
; then
                        PREFIX[FLAGS]="$PREFIX[FLAGS]
-Werror=unused-command-line-argument"
                fi


...and my build is fine...

$ grep ^'checking if clang supports'
logs/build-and-install-log_XF86-Video-Intel-v2-21-14_issues-fixed_llvm-3-3.txt
| grep Wno
checking if clang supports-Wno-cast-qual... yes
checking if clang supports-Wno-redundant-decls... yes
checking if clang supports-Wno-maybe-uninitialized... no

This could be "checking if clang
supports[space]-Wno-maybe-uninitialized" like here...

checking if clang supports -Werror=unknown-warning-option... yes
checking if clang supports -Werror=unused-command-line-argument... yes
...
checking if clang supports -fno-rtti -fno-exceptions... yes
checking if clang supports -c -o file.o... yes
checking if clang supports -c -o file.o... (cached) yes

But it WorksForMe.

Thanks.

Regards,
- Sedat -


> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list