Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4182973rwb; Mon, 31 Jul 2023 02:55:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlE9ur5rvpBt5jWcxa9gE01aJfdNQQlof2IZRgtG+4NVA3918TksOD3mPdR4LCbbWCZhapUB X-Received: by 2002:a17:90a:5512:b0:268:2500:b17e with SMTP id b18-20020a17090a551200b002682500b17emr8835032pji.23.1690797342975; Mon, 31 Jul 2023 02:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690797342; cv=none; d=google.com; s=arc-20160816; b=IfU5WVEgRTZpoHkc3xNGpeHN6WjFzLFe7G0iwthWggcLZYZaaQrSmmYD0IOBKvIJcW oz00bZN6rONUcIIwKlE1XdBztmtD591aiju/aA1qjM2BDzilv5oERWTjvUVuQyfZ8OG7 ZpThKxTlhrLkOW70QA4UllyqhYE3a6RmLtJej6lT3E0rrjlL9oTW1bU2RPEeHJlz1Z+l 1Sq4Thb1c1WrjPfZ+mTYwc+EsVIC8SAWE2nqWIODqAIrb6JhyJ8vKSNXfDHv8NVwFo29 oWkdinrgcvrUvA3i0euFxU5PLm0VA9fuSfdWodIYjaGZpq+BJDpnOREEtyWFZaRTIVGw GcJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cLk/WMu+pKjq+Z6vYXMucErp/P3BEHZ9FW7lO4yZpVQ=; fh=xRdaOVXaRGrwW+9cTzkYYWmW/o9rqCRdnarYV03e28c=; b=HS1bqudkWIBXR0kiKtz3MeCPQbbNqb4c4mR7OjxZFnoPtS6HScv35LqFjSVRDFNg+L eWFndN/SetjXXUc3jYv7jVtib2T4CLSPwPaFYRjVKATbQhKKBDmTVQY9Ie/Ac6Z1anyJ uvY5tLjWAXs+BeM+ZJc7W5uorcY+w1mKs+JmsUS5+a5SsYzu/sl8WREbcW6IF2soEwY+ aBFJYOeZDs7kUmbCTDyxGKPIhGH4Ut4nbcxkqRYudc+tqlR9+LC7GWGB0ZO8KgKfVhty qlsRgvTcnRbOjMArTzoa2sPSR2vtl4TJcg+Wwz1IHqbU5XFl0R8GjI27gnXBaM0rgUB0 BsRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=TXUNAYag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a17090ad79600b0025de453ee4csi7228858pju.168.2023.07.31.02.55.31; Mon, 31 Jul 2023 02:55:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=TXUNAYag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231942AbjGaIOC (ORCPT + 99 others); Mon, 31 Jul 2023 04:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232130AbjGaINQ (ORCPT ); Mon, 31 Jul 2023 04:13:16 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABAFD1723; Mon, 31 Jul 2023 01:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1690791036; bh=VVBFsacjEVmUUG4a0c8yaWevpfLl40G7Jll0Zstz/vs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TXUNAYagpG6NiEnger4e6aCr8xHINobNmTVYGqfCmLXBAJ/hvoR94T3h6fZoDAgej +4WKDUw0OwmKtLchCuJJ45yqghfN91OEs6XD45QBcDusblHk1l/V3gAj4tMo1Zy6oL 0LRAIAVe0p/fFYwXRziKMJ7b6FvTG2QcKyIa25I0= Date: Mon, 31 Jul 2023 10:10:36 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Zhangjin Wu Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, tanyuan@tinylab.org, w@1wt.eu Subject: Re: [PATCH 4/4] selftests/nolibc: enable -Wall compiler warnings Message-ID: <940dcf77-05ae-4cf6-b5f0-5b8cf80adab6@t-8ch.de> References: <20230731-nolibc-warnings-v1-4-74973d2a52d7@weissschuh.net> <20230731071718.21085-1-falcon@tinylab.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230731071718.21085-1-falcon@tinylab.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-07-31 15:17:18+0800, Zhangjin Wu wrote: > > It will help the developers to avoid cruft and detect some bugs. > > > > Signed-off-by: Thomas Weißschuh > > --- > > tools/testing/selftests/nolibc/Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile > > index f42adef87e12..72227d75c6da 100644 > > --- a/tools/testing/selftests/nolibc/Makefile > > +++ b/tools/testing/selftests/nolibc/Makefile > > @@ -79,7 +79,7 @@ endif > > CFLAGS_s390 = -m64 > > CFLAGS_mips = -EL > > CFLAGS_STACKPROTECTOR ?= $(call cc-option,-mstack-protector-guard=global $(call cc-option,-fstack-protector-all)) > > -CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 \ > > +CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -Wall \ > > Very good static analyzer support. > > What about further add more options? > > +CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -Wall -Wextra -Werror\ > > A simple test shows, it can catch more issues. -Wextra will need some further rework for 32bit architectures to avoid some warnings. (At least mips for which I tested it) I don't think -Werror is appropriate. If we want to test the functioning of nolibc with weird compilers these may very well add new warnings and that shouldn't break the build. > > Thanks, > Zhangjin > > > $(call cc-option,-fno-stack-protector) \ > > $(CFLAGS_$(ARCH)) $(CFLAGS_STACKPROTECTOR) > > LDFLAGS := -s > > > > -- > > 2.41.0