From: Edward Liaw <edliaw@google.com>
To: linux-kselftest@vger.kernel.org,
"Eric Biederman" <ebiederm@xmission.com>,
"Kees Cook" <kees@kernel.org>, "Shuah Khan" <shuah@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"André Almeida" <andrealmeid@igalia.com>,
"Jason Gunthorpe" <jgg@ziepe.ca>,
"Kevin Tian" <kevin.tian@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Fenghua Yu" <fenghua.yu@intel.com>,
"Reinette Chatre" <reinette.chatre@intel.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Jarkko Sakkinen" <jarkko@kernel.org>,
"Dave Hansen" <dave.hansen@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, usama.anjum@collabora.com,
seanjc@google.com, kernel-team@android.com,
Edward Liaw <edliaw@google.com>,
linux-mm@kvack.org, iommu@lists.linux.dev, kvm@vger.kernel.org,
netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-sgx@vger.kernel.org
Subject: [PATCH v6 00/13] Centralize _GNU_SOURCE definition into lib.mk
Date: Mon, 24 Jun 2024 23:26:09 +0000 [thread overview]
Message-ID: <20240624232718.1154427-1-edliaw@google.com> (raw)
Centralizes the definition of _GNU_SOURCE into lib.mk and addresses all
resulting macro redefinition warnings.
These patches will need to be merged in one shot to avoid redefinition
warnings.
The initial attempt at this patch was abandoned because it affected
lines in many source files and caused a large amount of churn. However,
from earlier discussions, centralizing _GNU_SOURCE is still desireable.
This attempt limits the changes to 1 source file and 12 Makefiles.
v1: https://lore.kernel.org/linux-kselftest/20240430235057.1351993-1-edliaw@google.com/
v2: https://lore.kernel.org/linux-kselftest/20240507214254.2787305-1-edliaw@google.com/
- Add -D_GNU_SOURCE to KHDR_INCLUDES so that it is in a single
location.
- Remove #define _GNU_SOURCE from source code to resolve redefinition
warnings.
v3: https://lore.kernel.org/linux-kselftest/20240509200022.253089-1-edliaw@google.com/
- Rebase onto linux-next 20240508.
- Split patches by directory.
- Add -D_GNU_SOURCE directly to CFLAGS in lib.mk.
- Delete additional _GNU_SOURCE definitions from source code in
linux-next.
- Delete additional -D_GNU_SOURCE flags from Makefiles.
v4: https://lore.kernel.org/linux-kselftest/20240510000842.410729-1-edliaw@google.com/
- Rebase onto linux-next 20240509.
- Remove Fixes tag from patches that drop _GNU_SOURCE definition.
- Restore space between comment and includes for selftests/damon.
v5: https://lore.kernel.org/linux-kselftest/20240522005913.3540131-1-edliaw@google.com/
- Rebase onto linux-next 20240521
- Drop initial patches that modify KHDR_INCLUDES.
- Incorporate Mark Brown's patch to replace static_assert with warning.
- Don't drop #define _GNU_SOURCE from nolibc and wireguard.
- Change Makefiles for x86 and vDSO to append to CFLAGS.
v6:
- Rewrite patch to use -D_GNU_SOURCE= form in lib.mk.
- Reduce the amount of churn significantly by allowing definition to
coexist with source code macro defines.
Edward Liaw (13):
selftests/mm: Define _GNU_SOURCE to an empty string
selftests: Add -D_GNU_SOURCE= to CFLAGS in lib.mk
selftests/net: Append to lib.mk CFLAGS in Makefile
selftests/exec: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile
selftests/futex: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile
selftests/intel_pstate: Drop redundant -D_GNU_SOURCE CFLAGS in
Makefile
selftests/iommu: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile
selftests/kvm: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile
selftests/proc: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile
selftests/resctrl: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile
selftests/ring-buffer: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile
selftests/riscv: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile
selftests/sgx: Append CFLAGS from lib.mk to HOST_CFLAGS
tools/testing/selftests/exec/Makefile | 1 -
tools/testing/selftests/futex/functional/Makefile | 2 +-
tools/testing/selftests/intel_pstate/Makefile | 2 +-
tools/testing/selftests/iommu/Makefile | 2 --
tools/testing/selftests/kvm/Makefile | 2 +-
tools/testing/selftests/lib.mk | 3 +++
tools/testing/selftests/mm/thuge-gen.c | 2 +-
tools/testing/selftests/net/Makefile | 2 +-
tools/testing/selftests/net/tcp_ao/Makefile | 2 +-
tools/testing/selftests/proc/Makefile | 1 -
tools/testing/selftests/resctrl/Makefile | 2 +-
tools/testing/selftests/ring-buffer/Makefile | 1 -
tools/testing/selftests/riscv/mm/Makefile | 2 +-
tools/testing/selftests/sgx/Makefile | 2 +-
14 files changed, 12 insertions(+), 14 deletions(-)
--
2.45.2.741.gdbec12cfda-goog
next reply other threads:[~2024-06-24 23:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 23:26 Edward Liaw [this message]
2024-06-24 23:26 ` [PATCH v6 01/13] selftests/mm: Define _GNU_SOURCE to an empty string Edward Liaw
2024-06-24 23:26 ` [PATCH v6 02/13] selftests: Add -D_GNU_SOURCE= to CFLAGS in lib.mk Edward Liaw
2024-06-24 23:26 ` [PATCH v6 03/13] selftests/net: Append to lib.mk CFLAGS in Makefile Edward Liaw
2024-06-24 23:26 ` [PATCH v6 04/13] selftests/exec: Drop redundant -D_GNU_SOURCE " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 05/13] selftests/futex: " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 06/13] selftests/intel_pstate: " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 07/13] selftests/iommu: " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 08/13] selftests/kvm: " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 09/13] selftests/proc: " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 10/13] selftests/resctrl: " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 11/13] selftests/ring-buffer: " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 12/13] selftests/riscv: " Edward Liaw
2024-06-24 23:26 ` [PATCH v6 13/13] selftests/sgx: Append CFLAGS from lib.mk to HOST_CFLAGS Edward Liaw
2024-06-25 20:52 ` [PATCH v6 00/13] Centralize _GNU_SOURCE definition into lib.mk Andrew Morton
2024-06-25 23:34 ` Shuah Khan
2024-06-26 0:41 ` Edward Liaw
2024-06-26 1:21 ` Edward Liaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240624232718.1154427-1-edliaw@google.com \
--to=edliaw@google.com \
--cc=akpm@linux-foundation.org \
--cc=andrealmeid@igalia.com \
--cc=aou@eecs.berkeley.edu \
--cc=dave.hansen@linux.intel.com \
--cc=dave@stgolabs.net \
--cc=davem@davemloft.net \
--cc=dvhart@infradead.org \
--cc=ebiederm@xmission.com \
--cc=edumazet@google.com \
--cc=fenghua.yu@intel.com \
--cc=iommu@lists.linux.dev \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kees@kernel.org \
--cc=kernel-team@android.com \
--cc=kevin.tian@intel.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=usama.anjum@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox