From owner-freebsd-current@freebsd.org Tue Aug 30 21:50:08 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08977BC9119 for ; Tue, 30 Aug 2016 21:50:08 +0000 (UTC) (envelope-from mmacy@nextbsd.org) Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB6C7797; Tue, 30 Aug 2016 21:50:07 +0000 (UTC) (envelope-from mmacy@nextbsd.org) Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1472593803191770.7300172706571; Tue, 30 Aug 2016 14:50:03 -0700 (PDT) Date: Tue, 30 Aug 2016 14:50:03 -0700 From: Matthew Macy To: "Brooks Davis" Cc: "freebsd-current@freebsd.org" Message-ID: <156dd6e37af.105c3e4a5169175.7556090170284948749@nextbsd.org> In-Reply-To: <20160830210841.GA25000@spindle.one-eyed-alien.net> References: <156d96ebba6.d2524daa80643.7192912559150916238@nextbsd.org> <20160830210841.GA25000@spindle.one-eyed-alien.net> Subject: Re: External toolchain support broken for devel/llvm38 but not devel/llvm37 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2016 21:50:08 -0000 ---- On Tue, 30 Aug 2016 14:08:41 -0700 Brooks Davis wrote ---- > On Mon, Aug 29, 2016 at 08:12:08PM -0700, Matthew Macy wrote: > > It looks like there is something broken with the devel/llvm38 port or external toolchain support has regressed: > > > > > > This works: > > make XCC=/usr/local/bin/clang37 XCXX=/usr/local/bin/clang++37 XCPP=/usr/local/bin/clang-cpp37 buildworld -j12 -s > > > > This fails: > > make XCC=/usr/local/bin/clang38 XCXX=/usr/local/bin/clang++38 XCPP=/usr/local/bin/clang-cpp38 buildworld -j12 -s > > > > with: > > > > /home/mmacy/devel/build/mnt/storage/mmacy/devel/drm-next-merge/tmp/usr/bin/ld: /usr/local/llvm38/bin/../lib/clang/3.8.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a: No such file: No such file or directory > > clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation) > > I've fixed the install problem. I'm rather confused about why clang > would try to link with sanitizer libraries when building source. That's > certainly not default behavior. Thanks for the extremely prompt response to both issues. I haven't figured out why svn has problems but the libc/tests failure can be traced back to the following commit: commit 3d2a537705eca33db3c523f4f92290d382aa7ab1 Author: ngie Date: Fri Jan 2 05:40:02 2015 +0000 Don't install h_raw if dealing with clang 3.5.0+ to unbreak the tests2 Jenkins job The h_raw application doesn't do proper bounds checking without the option being supplied via the build, which means that it doesn't throw signals and fail as expected PR: 196430 X-MFC with: r276479 diff --git a/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh b/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh index 04adc67..362178f 100755 --- a/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh +++ b/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh @@ -360,6 +360,9 @@ raw_head() raw_body() { prog="$(atf_get_srcdir)/h_raw" + # Begin FreeBSD + [ -x $prog ] || atf_skip "$prog is missing; skipping testcase" + # End FreeBSD h_pass "$prog 9" # Begin FreeBSD diff --git a/lib/libc/tests/ssp/Makefile b/lib/libc/tests/ssp/Makefile index 1649cc2..7bc8660 100644 --- a/lib/libc/tests/ssp/Makefile +++ b/lib/libc/tests/ssp/Makefile @@ -9,10 +9,7 @@ WARNS?= 2 CFLAGS.h_raw+= -fstack-protector-all -Wstack-protector .if ${COMPILER_TYPE} == "clang" -# Disable -fsanitize=bounds until runtime support is done for clang 3.5.0. -.if ${COMPILER_VERSION} < 30500 CFLAGS.h_raw+= -fsanitize=bounds -.endif .elif ${COMPILER_TYPE} == "gcc" CFLAGS.h_raw+= --param ssp-buffer-size=1 DPADD+= ${LIBSSP} @@ -29,7 +26,11 @@ PROGS+= h_getcwd PROGS+= h_memcpy PROGS+= h_memmove PROGS+= h_memset +# This testcase doesn't run properly when not compiled with -fsantize=bounds +# with clang, which is currently contingent on a compiler_rt update +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 30500 PROGS+= h_raw +.endif PROGS+= h_read PROGS+= h_readlink PROGS+= h_snprintf