On Fri 16 Dec 2022 at 14:41:31 +0100, Rhialto wrote: > Howwver. lang/gcc10 (at least my build of it) is missing at least the > actual libasan files. I'm presuming that those should be part of the > package. Unfortunately, lang/gcc10 uses a dymaic PLIST so it was not > detected that the files were missing. It's missing libasan and libubsan, compared to gcc8. This from the configure output probably is a hint: checking for libsanitizer support... no ... The following languages will be built: c,c++,fortran,lto,objc,obj-c++ *** This configuration is not supported in the following subdirectories: zlib target-libsanitizer target-libvtv gnattools gotools target-libada target-libhsail-rt target-libphobos target-zlib target-libgo target-libffi target-liboffloadmic target-libssp (Any other directories should still work fine.) The configure script determines libsanitizer support by running libsanitizer/configure.tgt which is basically a check on the ${target} triple. So I checked for patches for that in gcc8 which were absent in gcc10: - patch-libsanitizer_configure.tgt - patch-libsanitizer_sanitizer__common_Makefile.am - patch-libsanitizer_sanitizer__common_Makefile.in So I adjusted maya@'s patches from gcc 8 to gcc 10 and rebuilt. gcc9 is also lacking these patches. gcc 12 possibly also needs them. What's also missing are the patches for precompiled headers. The last version that includes them seems to be gcc 7. I seem to remember proposing to commit adjusted versions to gcc 8 but never got a response on that. The Makefile for gcc10 says ## When bumping the PKGREVISION of this package the PKGREVISION of ## lang/gcc10-libs needs to be bumped to be at least 1 more than the ## PKGREVISION of this package! Wouldn't it make sense to bump the PKGREVISION of gcc10-libs to at least 10, so that bumps on gcc10 itself don't need a bump on gcc10-libs for a while? Anyway, the build failed because of something in gcc-10.4.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cpp which is apparently included from upstream but not used without these patches? ../../../../gcc-10.4.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cpp:2182:36: error: 'MD5_CTX' was not declared in this scope; did you mean 'MD4_CTX'? 2182 | const unsigned MD5_CTX_sz = sizeof(MD5_CTX); | ^~~~~~~ | MD4_CTX ../../../../gcc-10.4.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cpp:2183:36: error: 'MD5_DIGEST_STRING_LENGTH' was not declared in this scope; did you mean 'MD2_DIGEST_STRING_LENGTH'? 2183 | const unsigned MD5_return_length = MD5_DIGEST_STRING_LENGTH; | ^~~~~~~~~~~~~~~~~~~~~~~~ | MD2_DIGEST_STRING_LENGTH none needed The patches as adjusted so far: $NetBSD: patch-libsanitizer_configure.tgt,v 1.1 2018/05/05 04:08:36 maya Exp $ --- libsanitizer/configure.tgt.orig 2022-06-28 08:54:31.000000000 +0000 +++ libsanitizer/configure.tgt @@ -68,6 +68,10 @@ case "${target}" in ;; riscv64-*-linux*) ;; + x86_64-*-netbsd*) + TSAN_SUPPORTED=no + LSAN_SUPPORTED=no + ;; *) UNSUPPORTED=1 ;; $NetBSD: patch-libsanitizer_sanitizer__common_Makefile.am,v 1.1 2018/05/05 04:08:36 maya Exp $ --- libsanitizer/sanitizer_common/Makefile.am.orig 2022-06-28 08:54:31.000000000 +0000 +++ libsanitizer/sanitizer_common/Makefile.am @@ -45,6 +45,7 @@ sanitizer_common_files = \ sanitizer_openbsd.cpp \ sanitizer_persistent_allocator.cpp \ sanitizer_platform_limits_linux.cpp \ + sanitizer_platform_limits_netbsd.cpp \ sanitizer_platform_limits_openbsd.cpp \ sanitizer_platform_limits_posix.cpp \ sanitizer_platform_limits_solaris.cpp \ $NetBSD: patch-libsanitizer_sanitizer__common_Makefile.in,v 1.1 2018/05/05 04:08:36 maya Exp $ --- libsanitizer/sanitizer_common/Makefile.in.orig 2022-06-28 08:55:09.000000000 +0000 +++ libsanitizer/sanitizer_common/Makefile.in @@ -131,6 +131,7 @@ am__objects_1 = sancov_flags.lo sanitize sanitizer_mac.lo sanitizer_mac_libcdep.lo sanitizer_netbsd.lo \ sanitizer_openbsd.lo sanitizer_persistent_allocator.lo \ sanitizer_platform_limits_linux.lo \ + sanitizer_platform_limits_netbsd.lo \ sanitizer_platform_limits_openbsd.lo \ sanitizer_platform_limits_posix.lo \ sanitizer_platform_limits_solaris.lo sanitizer_posix.lo \ @@ -402,6 +403,7 @@ sanitizer_common_files = \ sanitizer_openbsd.cpp \ sanitizer_persistent_allocator.cpp \ sanitizer_platform_limits_linux.cpp \ + sanitizer_platform_limits_netbsd.cpp \ sanitizer_platform_limits_openbsd.cpp \ sanitizer_platform_limits_posix.cpp \ sanitizer_platform_limits_solaris.cpp \ @@ -558,6 +560,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_openbsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_persistent_allocator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_platform_limits_linux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_platform_limits_netbsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_platform_limits_openbsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_platform_limits_posix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_platform_limits_solaris.Plo@am__quote@ -Olaf. -- ___ "Buying carbon credits is a bit like a serial killer paying someone else to \X/ have kids to make his activity cost neutral." -The BOFH falu.nl@rhialto
Attachment:
signature.asc
Description: PGP signature