From nobody Thu Dec 23 08:28:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4B3D11908D54; Thu, 23 Dec 2021 08:29:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JKNdS0JG9z3GXg; Thu, 23 Dec 2021 08:29:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id D9CBE9F21; Thu, 23 Dec 2021 08:28:59 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f169.google.com with SMTP id z9so4226441qtj.9; Thu, 23 Dec 2021 00:28:59 -0800 (PST) X-Gm-Message-State: AOAM532N/XbNxApYJGja19PP5uIbDgf0ah8qa4hwp0UYKg7RjZYWXBGb CGVhaI+0KUrTkXCRRdqxroB/Vbvf3IvqH3mnNn4= X-Google-Smtp-Source: ABdhPJwaVP4hr5xX91VWInvYvThSPVLdi+nHgeWiQ5MRyDsl0RspFiO/uiSmn0ylheT9JYn/bMLEos+QNZN43wLdRJA= X-Received: by 2002:ac8:ac8:: with SMTP id g8mr845860qti.29.1640248139217; Thu, 23 Dec 2021 00:28:59 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202108021335.172DZ5xV050547@gitrepo.freebsd.org> In-Reply-To: <202108021335.172DZ5xV050547@gitrepo.freebsd.org> From: Kyle Evans Date: Thu, 23 Dec 2021 02:28:48 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 7bc797e3f380 - main - Add build system support for ASAN+UBSAN instrumentation To: Alex Richardson Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640248140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Oenbhq0D+rnLNLbzdpqpluUGU2LWrAf5CVjLxao31LA=; b=wiIwXTMQpO4KScPvVOHEzikRSLH3dN5tOMYkpr85r+eRNoduf9hx1YcL93WrdrwmhmiIxs Y4QMURTmMO/6cFBjxm1WviM2D50XQdMwqan/uTYepAAdh6DbyrhO37+/sIPNhYqbAX0J8+ APA7JaNVd8PCewS/5RNShWUt/m4jFRwwEKIF0IiIFDnRTGnw0pQafTqhBt26YytyX02wt4 wHZbh06W3c5QYRAQDd7fF3ePtIXb8ys2K4vsyYCz7xENWAAKqIpLjqXJ5hBBzkraLPl1il 6v4a87xn2oUfjxxTU5VGkM8BeOP6xfM2zH6vQ/KssR/NKgYfpDRiozDSn3yXfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640248140; a=rsa-sha256; cv=none; b=di/geRlGIhPAK+bIIRXGUqzX2NXoBEnmqzkNfN1Xzd8bxMDC8UIEBnef11JXMjd8xbUhxx AOYNvRK3Bq8GdS1efTP3wVrDiqHYVQMaHraxWDc8Wo1z8V8OnYNqY0TsOyT/rz9d2mfACJ cOpQvgX8FqlKqBO4TE5BTpgrDH1YW5WNdHCUeb9kVLdBn58zshwWNm9XQ3TC90kJwyaaaP YCnp3KOqev9yJ92V+wjcf8Vl0qlBsQpQvNsYWEixzwtdWw8XkQUB2TEkICrlWLEjBcDmW0 YmBMeEAP3RAKl5ovNv7OfuNBNvPe8dWCpBMu8ufwAM/EgjJxsnDek1a8BevB1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Mon, Aug 2, 2021 at 8:35 AM Alex Richardson wrote: > > The branch main has been updated by arichardson: > > URL: https://cgit.FreeBSD.org/src/commit/?id=7bc797e3f3807660cf98e5b1bd63545cafe820f8 > > commit 7bc797e3f3807660cf98e5b1bd63545cafe820f8 > Author: Alex Richardson > AuthorDate: 2021-08-02 08:48:21 +0000 > Commit: Alex Richardson > CommitDate: 2021-08-02 13:33:24 +0000 > > Add build system support for ASAN+UBSAN instrumentation > > This adds two new options WITH_ASAN/WITH_UBSAN that can be set to > enable instrumentation of all binaries with AddressSanitizer and/or > UndefinedBehaviourSanitizer. This current patch is almost sufficient > to get a complete buildworld with sanitizer instrumentation but in > order to actually build and boot a system it depends on a few more > follow-up commits. > > Reviewed By: brooks, kib, markj > Differential Revision: https://reviews.freebsd.org/D31043 > [...] > --- a/share/mk/sys.mk > +++ b/share/mk/sys.mk > @@ -242,7 +242,7 @@ LFLAGS ?= > # compiler driver flags (e.g. -mabi=*) that conflict with flags to LD. > LD ?= ld > LDFLAGS ?= > -_LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*:N--ld-path=*} > +_LDFLAGS = ${LDFLAGS:S/-Wl,//g:N-mabi=*:N-fuse-ld=*:N--ld-path=*:N-fsanitize=*:N-fno-sanitize=*} > > MAKE ?= make > I know you're just the one that touched it last, but would it be any easier to enumerate what we *can* pass to the linker from LDFLAGS rather than what we can't? Now we need to add :N-flto* to this, and I wonder what else we're going to wind up stumbling across as time goes on. Thanks, Kyle Evans