From nobody Fri Dec 19 16:11:53 2025 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1885D340A6A for ; Fri, 5 Dec 2025 17:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954750; cv=none; b=YVo22sCLaLaFNdw8GiGgCCtW9cd+V+KbNTXrF1nKVvfKT7x78Xlup7/8JQNmxZ49j+wM2SoNM+5Jo4+uxo8gUKuF3U6sJWbyE6fTVSiJhgAmTrBVAZuNZm9fRQYTLPG896DMTQut40f9drzz1zq56VkzVcim35E9Prdx86KMmyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954750; c=relaxed/simple; bh=M2vFDyyUfG7JkznxChmdBB4qNaHZV2aWYVJ2i7s0Hfk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LG2T3rIEKB8nbSZHqVNkAWgF7oN/k62GNnzGv46mfOXpJ6Cv7QWBOwaYthj/mOdiTvj5HufeV1G55IPymSKSReFwQkE4b0lrluTEpyqQ31q1bfewf43mINGb1LdMDME2i+oFLeFuArGZ/fM0vcKHtyaKo5jLNvYij+ydJ7cSTXw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b5YTeIx5; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b5YTeIx5" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-298287a26c3so29022335ad.0 for ; Fri, 05 Dec 2025 09:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764954738; x=1765559538; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=/vBZwIvLvx6D7o9yPmhW2hQH1LVZ8ZbPnLZnaPeYgfI=; b=b5YTeIx5tQetKP0xsFxE6Xqgr9WAqiYEYngVQjIgoDX2C4ZRKp7GYZSP7ZtcQZr2er R4Cz2RAbfV9iq/ksTAFCv+o4JpURo0vMtLMSORnEHm+OCO3z2z3mfZivv/64YEHqZj9h GcVU9Dza2wZwaiRxEGtE2TpZuZpUatV+A1yudGhDm19BYNlaU+TBw1csq/jK6kfqM7UJ thgHXCzMba1QflmatWQwucm8GjeeDPYR6Iph7yrZszQJ4GzsybIoLz7qYWMc8iK7p9iE 8sMPlpWsdq2ZOJO8bh/+cPiK8sv7oeCFB6ktM/IRHzhwsqcY/3IRmpcxHUI5o+eEANZM v+BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764954738; x=1765559538; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/vBZwIvLvx6D7o9yPmhW2hQH1LVZ8ZbPnLZnaPeYgfI=; b=R4lFt1mZluFFk1eqIm0n3Z5urJ5hivqTixWwQuFlb/pZrXCL45JihOwSIPUoofCxu/ DQhQ0MymHwz/AChBAx5C2Mqu4QbxkhAM+Jxu/YAEY54SVZCfUaJYDK6R1uKMcCnJGmIb GQO2bvuWDkbsYAF/vpdmFwX8hQUhWXHOAWb9o8rcT3gq05l+mO7z9BVUcJ1L2z9zg9eW b6B6gPz7cp3jPuNmT2L13eLg0aoDi9uUPYvC3P7VH+jTibHX28C//uF4l0OL1r8bovsj bXaseTaphErf2bncyl+r5K3N3mI7btseRwIY2LJZDgBnAoTyRIjZ/bIvCe1q5to2pkE8 Lbig== X-Forwarded-Encrypted: i=1; AJvYcCW/49DT4eqW2h6aSHa2+0VjVQB1PMIfcZIXVqdUJ/sWW74mP/6sBS47MrAbVffXM6L/kRTrX4rXj+3jQqw=@vger.kernel.org X-Gm-Message-State: AOJu0YwcH28TmrbpTEHxcyVf3Ns4OpQxXO7lcGhyRU+TjyP6RxHVGjpc Uh0wltWdSqh6miLyw2yEyiK8kMjMRnPAW/G+Pmcz62rtHr8NxJDRB7JM X-Gm-Gg: ASbGncuaP07mN45gRaGcDrtUu9BoG7aQN8CmULd6Iw9zqotAXnziHEpSy4opODa5SxN wWLcP8GE+1laR6VYQghoU4y30nAwfQZeuRYYc+F7jOmKYrqmtrSqrzsPxX/76X8g8JROOkpzOoH xYQ2NdYId/05i+Gs/NMZ6jGz2Dz3krvHhqlVDmvt0Q0fGkViXeneOIpBhUR65xBKgUX+pjGmyw6 cR67lHJIzzNkotImZidwotSS4KCwr2XnCMeL7kstXXu88cZKge0uyf7quAq+NiOK2MrAC2jeAR8 /j2SzYeezR8dnIYXjsfhlom36V7hjn84M0xsLbb4rp8uuRbpOYKnH6bchtBAuYzvYnxVTRCBrQT 3XfHFG9qsEIIV2Jf/idEraj8Y98ZHBOlj6qL0H7m0WNmt9FSRkq9FrNRleyfESTCBuhOxG/o9eh L+T7FpNuqccO7fAwZ8hMqQ47Y4EjkFI22nMA== X-Google-Smtp-Source: AGHT+IHedJC93D+L43aGh0gHVYz0R+imftKPymAfmBV+49IIc8qNl+K0a9+Ao52i2Vy/p8ADlA4ahA== X-Received: by 2002:a05:7022:6722:b0:11b:d561:bc10 with SMTP id a92af1059eb24-11df0cae991mr7658546c88.41.1764954737734; Fri, 05 Dec 2025 09:12:17 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11df7576932sm20209499c88.4.2025.12.05.09.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Dec 2025 09:12:17 -0800 (PST) Sender: Guenter Roeck From: Guenter Roeck To: Shuah Khan Cc: Jakub Kicinski , Christian Brauner , Thomas Gleixner , Ingo Molnar , Eric Dumazet , Kees Cook , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, wine-devel@winehq.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Guenter Roeck , Kuniyuki Iwashima Subject: [PATCH v2 06/13] selftest: af_unix: Support compilers without flex-array-member-not-at-end support Date: Fri, 5 Dec 2025 09:10:00 -0800 Message-ID: <20251205171010.515236-7-linux@roeck-us.net> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251205171010.515236-1-linux@roeck-us.net> References: <20251205171010.515236-1-linux@roeck-us.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Fix: gcc: error: unrecognized command-line option =E2=80=98-Wflex-array-member-n= ot-at-end=E2=80=99 by making the compiler option dependent on its support. Fixes: 1838731f1072c ("selftest: af_unix: Add -Wall and -Wflex-array-member= -not-at-end to CFLAGS.") Cc: Kuniyuki Iwashima Signed-off-by: Guenter Roeck --- v2: Just using cc-option is insufficient since it is not defined, and if it is not defined it just disables the option entirely. Include Makefile.compiler and declare the function locally to solve the problem. tools/testing/selftests/net/af_unix/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/af_unix/Makefile b/tools/testing/s= elftests/net/af_unix/Makefile index 3cd677b72072..4c0375e28bbe 100644 --- a/tools/testing/selftests/net/af_unix/Makefile +++ b/tools/testing/selftests/net/af_unix/Makefile @@ -1,4 +1,9 @@ -CFLAGS +=3D $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end +top_srcdir :=3D ../../../../.. +include $(top_srcdir)/scripts/Makefile.compiler + +cc-option =3D $(call __cc-option, $(CC),,$(1),$(2)) + +CFLAGS +=3D $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-no= t-at-end) =20 TEST_GEN_PROGS :=3D \ diag_uid \ --=20 2.45.2