From patchwork Thu Jul 29 07:54:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 1511113 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=piDa9AyD; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gb2r3700Kz9sSs for ; Thu, 29 Jul 2021 17:54:59 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Gb2r36HPmz307R for ; Thu, 29 Jul 2021 17:54:59 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=piDa9AyD; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::1031; helo=mail-pj1-x1031.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=piDa9AyD; dkim-atps=neutral Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Gb2r154TQz301N for ; Thu, 29 Jul 2021 17:54:56 +1000 (AEST) Received: by mail-pj1-x1031.google.com with SMTP id u9-20020a17090a1f09b029017554809f35so14277615pja.5 for ; Thu, 29 Jul 2021 00:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=A1SaFLSnF0XWRX2GH3JK9VO+mmL73wx3QuK87OEBzrc=; b=piDa9AyD2cHz9kByLkECcjcBCBm2JyjBTY69Wo1plk7I3GdcvBSX4U9fXly7Msgi8b D65IFImwb6kfmLtmDK1hqjgRMynmQkDL869xp9ZkZcdck0TD9OGuOhvmq4ywfxGjuskK 9RFa9YVah+CnjzE8AmT29l/bZrOaH65CVEG/9xs7nSY98ek+qqDMnJIVMIlvhIRB5Opm YOzUi4Nr7Z7xBPUxDDwtjjpAmthWKpXMJVR+V6+sQsu+ShaSJD72GULSRnskzEouKY4X q5P4doBUz2E9IWlqMXjteWTZE0pASYkk3XrwzgD5FcXjUofxLuXvfUUPuJ4aiqh/gVV+ /edg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=A1SaFLSnF0XWRX2GH3JK9VO+mmL73wx3QuK87OEBzrc=; b=BN87sQj85QESgATHUDJplTff5FMjhuBZxFqf3KrxLpWUYaMDBwKg8WngSMFP0aJ6Jt oS41k0OvaYxXCKLw6WLN+bU77CMf7oQtz1BzhvkH1m1QLF6dDCiOrsyZNWIybCqNuenS lp2uaHwoXMKMhpPRW6VACwGI/JTlbTLsLkHphCcWwjpmUZQZHfBOTe0NMav9inucITx8 5G39KrXJMwUjCjpIPR0sH6dv7jdfgM+WAtJiIv27cJPbqYgSfsMMLecVwnFMyk258UBe u2usiKPTGcQ6FeDuXYIB1S8S5i5g2kaVKTMMFUO/Xkw5OkAIJysMQKOWnXAbMWK4sIPn 35qw== X-Gm-Message-State: AOAM530W5G3CbpG5LRnOR7pMq1n+AeIdCGUVKuwMX8yhQnHIJbreP6R5 NYmWs04x23Xyx9UcjXc9UbhFOmhyjKs= X-Google-Smtp-Source: ABdhPJyzWh88wd2LUSYTjWHI7TtdelHKiMkbOaODVWg4yvg9XMKi+2UrXSsU+Mm9V4gxpAlu/7OVyQ== X-Received: by 2002:a17:902:c10a:b029:12b:565f:637a with SMTP id 10-20020a170902c10ab029012b565f637amr3516671pli.57.1627545292956; Thu, 29 Jul 2021 00:54:52 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id u12sm2359345pju.15.2021.07.29.00.54.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jul 2021 00:54:52 -0700 (PDT) From: Joel Stanley To: skiboot@lists.ozlabs.org Date: Thu, 29 Jul 2021 17:24:38 +0930 Message-Id: <20210729075438.652246-1-joel@jms.id.au> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [Skiboot] [PATCH] Makefile: Avoid errors with GCC 11 X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" GCC's string and memory functions blow up as the compiler thinks the objects have no size: core/opal-dump.c: In function ‘opal_mpipl_update’: libc/include/string.h:34:16: warning: ‘__builtin_memset’ offset [0, 32767] is out of the bounds [0, 0] [-Warray-bounds] 34 | #define memset __builtin_memset core/opal-dump.c:333:17: note: in expansion of macro ‘memset’ 333 | memset((void *)MDRT_TABLE_BASE, 0, MDRT_TABLE_SIZE); | ^~~~~~ core/opal-dump.c: In function ‘opal_mpipl_init’: libc/include/string.h:34:16: warning: ‘__builtin_memset’ offset [0, 1023] is out of the bounds [0, 0] [-Warray-bounds] 34 | #define memset __builtin_memset core/opal-dump.c:565:9: note: in expansion of macro ‘memset’ 565 | memset(mdst_base, 0, MDST_TABLE_SIZE); | ^~~~~~ libc/include/string.h:34:16: warning: ‘__builtin_memset’ offset [0, 1023] is out of the bounds [0, 0] [-Warray-bounds] 34 | #define memset __builtin_memset core/opal-dump.c:567:9: note: in expansion of macro ‘memset’ 567 | memset(mddt_base, 0, MDDT_TABLE_SIZE); | ^~~~~~ In function ‘HDIF_check’, inlined from ‘fixup_spira’ at hdata/spira.c:1679:7, inlined from ‘parse_hdat’ at hdata/spira.c:1732:2: libc/include/string.h:38:16: warning: ‘__builtin_memcmp’ specified bound 6 exceeds source size 0 [-Wstringop-overread] 38 | #define memcmp __builtin_memcmp hdata/hdif.h:71:17: note: in expansion of macro ‘memcmp’ 71 | memcmp(hdr->id, id, sizeof(hdr->id)) == 0; | ^~~~~~ This turns the errors into warnings so the build can complete. Signed-off-by: Joel Stanley --- Makefile.main | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.main b/Makefile.main index d21f27be3e0e..73e9de21431b 100644 --- a/Makefile.main +++ b/Makefile.main @@ -166,6 +166,8 @@ CFLAGS += $(call try-cflag,$(CC),-Wjump-misses-init) \ $(call try-cflag,$(CC),-Wno-error=suggest-attribute=const) \ $(call try-cflag,$(CC),-Wno-error=suggest-attribute=noreturn) \ $(call try-cflag,$(CC),-Wstack-usage=1024) \ + $(call try-cflag,$(CC),-Wno-error=array-bounds) \ + $(call try-cflag,$(CC),-Wno-error=stringop-overread) \ $(call try-cflag,$(CC),-Wno-error=address-of-packed-member) CFLAGS += $(CWARNS) $(OPTS) $(DBG)