diff options
author | Chris Packham <judge.packham@gmail.com> | 2021-03-30 12:52:12 +1300 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2021-03-30 12:58:47 +1300 |
commit | 3fa241a4e19e30e4850d5ea105b01c469a22fb02 (patch) | |
tree | f11cde370efc4eeb0b327eed4e3f8d9068ad89c5 /scripts | |
parent | 52eeb3b433d8fb73fa70efd2e30d4107f8d86291 (diff) | |
download | crosstool-ng-3fa241a4e19e30e4850d5ea105b01c469a22fb02.tar.gz crosstool-ng-3fa241a4e19e30e4850d5ea105b01c469a22fb02.tar.bz2 crosstool-ng-3fa241a4e19e30e4850d5ea105b01c469a22fb02.zip |
build: debug: strace: Add -D__USE_MISC to target CFLAGS
Similar to commit ca45a8f9 ("Add -D__GLIBC__ to target CFLAGS") newer
versions of strace bundle the kernel headers which cause build errors
such as:
[ALL ] In file included from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/in6.h:26,
[ALL ] from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/if_bridge.h:19,
[ALL ] from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/src/rtnl_mdb.c:16:
[ERROR] /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/libc-compat.h:109: error: "__UAPI_DEF_IN6_ADDR_ALT" redefined [-Werror]
[ALL ] 109 | #define __UAPI_DEF_IN6_ADDR_ALT 1
[ALL ] |
[ALL ] In file included from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/src/rtnl_mdb.c:15:
[ALL ] /home/x-tool/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr/include/netinet/in.h:401: note: this is the location of the previous definition
[ALL ] 401 | #define __UAPI_DEF_IN6_ADDR_ALT 0
[ALL ] |
[ALL ] cc1: all warnings being treated as errors
By defining __USE_MISC we get __UAPI_DEF_IN6_ADDR_ALT defined in a
compatible manner.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/debug/500-strace.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build/debug/500-strace.sh b/scripts/build/debug/500-strace.sh index 4f6d6aa3..c28af353 100644 --- a/scripts/build/debug/500-strace.sh +++ b/scripts/build/debug/500-strace.sh @@ -21,7 +21,7 @@ do_debug_strace_build() # <netinet/in.h> and <linux/in6.h>. Kernel's libc-compat.h # only cares about GLIBC. uClibc-ng does the same # internally, pretending it's GLIBC for kernel headers inclusion. - cflags+=" -D__GLIBC__" + cflags+=" -D__GLIBC__ -D__USE_MISC" fi CT_mkdir_pushd "${CT_BUILD_DIR}/build-strace" |