]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix binutils compilation error with Clang 8
authorjhibbits <jhibbits@FreeBSD.org>
Tue, 5 Mar 2019 04:16:50 +0000 (04:16 +0000)
committerjhibbits <jhibbits@FreeBSD.org>
Tue, 5 Mar 2019 04:16:50 +0000 (04:16 +0000)
commit9b0c6f1624a06cd6d969d8172ec149b18bdc9d2f
tree06d68199b039451ebbd02c23d4e18cf5703fd217
parent6ea99782074626671791c8208926bb173c44f0f5
Fix binutils compilation error with Clang 8

Summary:
This change fixes the following compilation error when using clang 8 to cross
compile base to powerpc64:

```
/usr/src/gnu/usr.bin/binutils/libopcodes/../../../../contrib/binutils/opcodes/ppc-dis.c:100:35:
error: arithmetic on a null pointer treated as a cast from integer to pointer is
a GNU extension [-Werror,-Wnull-pointer-arithmetic]
  info->private_data = (char *) 0 + dialect;
       ~~~~~~~~~~ ^
1 error generated.
*** [ppc-dis.o] Error code 1

make[6]: stopped in /usr/src/gnu/usr.bin/binutils/libopcodes
1 error
```

Test Plan:
- buildworld for x86_64 (native)
- buildworld for powerpc64 (cross)
- buildworld for powerpc64 (native)

Submitted by: alfredo.junior_eldorado.org.br
Reviewed By: emaste, pfg, brooks
Differential Revision: https://reviews.freebsd.org/D19235
contrib/binutils/opcodes/ppc-dis.c