From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EBC342067; Tue, 23 Jul 2024 18:31:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721759480; cv=none; b=NM9kJU3KYF7RiN6p2t9VvlHm/e3c3mvFOu1iM1uMI3P+41QlCT6ukWUiEbe/xrGX3+d/tM8OgmtDgYcu9CVtY+1R5wqtWt6i570Z+2QGUBRfq0vjZmZid2PcJalS6Dm123aelkdhgMcUYfj67MPrD4G110o28SBY0LnRA79zOnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721759480; c=relaxed/simple; bh=WQAL4eiz1s+Lr8kKq0vKlRbJwpLa1ZicUctWnqFNInI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aTtKehDHQkaSO9ZH9HMaNWWa8ksOIuJh6r5kBWZrksP2Dq6Q3C4/5sk2maQHeE1r8Co89pKKkmmLBNnUxLM4sVgzOYKyaWHga9Ag0+ze0mrIijhmUHdSaXHY4W4pNzEZ0ZnQ+PHyyKZHP7H662FT329qhzO4Q5IAegue7v609Z8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SryRe8GO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SryRe8GO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E784C4AF0A; Tue, 23 Jul 2024 18:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721759480; bh=WQAL4eiz1s+Lr8kKq0vKlRbJwpLa1ZicUctWnqFNInI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SryRe8GOADhMG8oVzM8CN90BgyKKxpqdRhInKd2Eari87QRG7Ir3mOravVDM1RDOm KmWKmU0zdGUGt0Jfqu9G6WdtVj0/E7onaI8v6CR+l7Ge80XN0BkX5w7PAXhvNRTuDk THbpWkyV80j4GWs+BezD95rLzOfgP+MKLxRJWs7M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Edward Liaw , Davidlohr Bueso , John Hubbard , Shuah Khan , Sasha Levin Subject: [PATCH 6.6 024/129] selftests/futex: pass _GNU_SOURCE without a value to the compiler Date: Tue, 23 Jul 2024 20:22:52 +0200 Message-ID: <20240723180405.723937486@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240723180404.759900207@linuxfoundation.org> References: <20240723180404.759900207@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: John Hubbard [ Upstream commit cb708ab9f584f159798b60853edcf0c8b67ce295 ] It's slightly better to set _GNU_SOURCE in the source code, but if one must do it via the compiler invocation, then the best way to do so is this: $(CC) -D_GNU_SOURCE= ...because otherwise, if this form is used: $(CC) -D_GNU_SOURCE ...then that leads the compiler to set a value, as if you had passed in: $(CC) -D_GNU_SOURCE=1 That, in turn, leads to warnings under both gcc and clang, like this: futex_requeue_pi.c:20: warning: "_GNU_SOURCE" redefined Fix this by using the "-D_GNU_SOURCE=" form. Reviewed-by: Edward Liaw Reviewed-by: Davidlohr Bueso Signed-off-by: John Hubbard Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/selftests/futex/functional/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile index a392d0917b4e5..994fa3468f170 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 INCLUDES := -I../include -I../../ $(KHDR_INCLUDES) -CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) $(KHDR_INCLUDES) +CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE= -pthread $(INCLUDES) $(KHDR_INCLUDES) LDLIBS := -lpthread -lrt LOCAL_HDRS := \ -- 2.43.0