From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (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 4E43D33A70F for ; Fri, 5 Dec 2025 17:12:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954748; cv=none; b=LrqBRyf0Wkyrez0eVRkCwHnMCMI76tAnJkLG7XiLuxLq305SjwW3YCcri6lzkyexkQOjnEh6JMQgQykb4LwAMukot54sej4dboXk2+o1NNXDW6gEDAfpxmu1YMTpyNRgoeoivAr7ZGPcNMSAnR+1UbynUKizXaEQ+NTGr67Paz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954748; c=relaxed/simple; bh=M2vFDyyUfG7JkznxChmdBB4qNaHZV2aWYVJ2i7s0Hfk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QlAICWHGT4pojdHzwTzzt45K8GlVHSyA6xd+gphHf4FxsFTeitXPFNCtujygxWOq9QR8Mv5wLnrl45p1vemYTIZ4A4HQB/ZD4yihC4B6ZD2GyRNdoxGNLJu53ymvKSLLmz5YmQ/7lkhMQypq1TfZS/Bed/d9sVLCbO5MqOWieBA= 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.215.178 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-pg1-f178.google.com with SMTP id 41be03b00d2f7-bc0e89640b9so1555139a12.1 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=Sh6XNEChQK5sbQAPRVV08a3zMI/f0AFM6lY+oahK1YHgA/W5ouMLFHh7nu7PCfTZok onfCemB8YN812zIiaCzbUT9wfXgb4eRqTFKZbmHtzF2PA6k3bhx/24zI3IRZyB1NeMNP prvRKfCtrDk43j2+kleExYY/jKzGN8D8MpUCNB0HO3hguXJJRYA3ZoL5fhBwN35Cm9sY 20JYnOpHG9z5iFXQKDS3ekyJQMNPjT0EamlwOSYFARKYQ1xLDLygZiVMhnPUUTx5Ebsc d7O9CzMDfjCCrQqUPgLjCVDhO6zJzZZXLV0xBgvccorBfRyJGZinADb/KEIxXXCuYxIP G+KA== X-Forwarded-Encrypted: i=1; AJvYcCWrmynaKlMYfi2HJldGYZAviEmA3A7u3ZgEayEHloNS8oIqQ47JzgShHGa25ye1+5tG9VM=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8XSlp9uIpLQVDPV3fuR79cI2NzsLX5weEh1WuXJUg5/jBSvQJ 0DdpRbE41E7EyRjIiXgmeXoSLsosrWD3DXlJCqLfNB2I841GwSt8XKOw X-Gm-Gg: ASbGncvtF8gXKNwX8vTcuKOLZSlw6vDGjyOPT87byS9xHqvcMxnOMtP9aV8c+3msO19 3ejNdbbnGZqGFnJb8xOgNybuwxchLNhn9Fm2QJd8OtcEKQcdj9vsvRrx/SjrpFcytHXaGhWkeBt ikIX3oA9k5V74vOfRauZ4VCWAjf8g8FjOGsKXPyXfq3IbxGnU4bl+y8YE5vNjNfSFmloEvP400P rb18wRmkSOp6q+s+VIPs5+V8iomWapibq4+NgONpfh5AUBIA4AuAG05uOjLQ9UfbwYP2Gaa+Cee rziaTMGddklt5izzEpdyRpr1jCvT9v5BbJcpfbhWXHDUc7Jy9q7wESdJ/L1xZiFwomIDjgvOX18 n9txT5J/URQfC/yafCFfDRCvCWRuRRdhcIZiQv2gOjBBrY5kxupfj31R+aogy2MSMEjbFr5gn+5 0eihAh2pdnL9EiC0JkfjtwwvdzPNnaVZc0Rw== 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: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: gcc: error: unrecognized command-line option ‘-Wflex-array-member-not-at-end’ 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/selftests/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 += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end +top_srcdir := ../../../../.. +include $(top_srcdir)/scripts/Makefile.compiler + +cc-option = $(call __cc-option, $(CC),,$(1),$(2)) + +CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end) TEST_GEN_PROGS := \ diag_uid \ -- 2.45.2