tech-toolchain archive

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

Re: NetBSD 10.0_BETA w/gcc can't build NetBSD 10.0_BETA w/clang



On Sat, 24 Jun 2023, John Klos wrote:

I'm trying to build NetBSD 10.0_BETA with clang from NetBSD 10.0_BETA (Sat Jun 24 02:46:39 UTC 2023) with gcc, and it fails here:

--- pixman-fast-path.po ---
/usr/xsrc/external/mit/pixman/dist/pixman/pixman-fast-path.c:2614:32: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
   while (buffer < end && x < pixman_fixed_minus_1)
                              ^~~~~~~~~~~~~~~~~~~~
/usr/xsrc/external/mit/pixman/dist/pixman/pixman.h:128:32: note: expanded from macro 'pixman_fixed_minus_1'
#define pixman_fixed_minus_1            (pixman_int_to_fixed(-1))
                                        ^~~~~~~~~~~~~~~~~~~~~~~
/usr/xsrc/external/mit/pixman/dist/pixman/pixman.h:130:56: note: expanded from macro 'pixman_int_to_fixed'
#define pixman_int_to_fixed(i)          ((pixman_fixed_t) ((i) << 16))
                                                          ~~~  ^
1 error generated.


So, clang is whining over a logical _left_-shift, eh? Change that macro to
what's in the -HEAD sources:

```
#define pixman_int_to_fixed(i)          ((pixman_fixed_t) ((uint32_t) (i) << 16))
```

-RVP


Home | Main Index | Thread Index | Old Index