[PATCH v7 1/1] selftests: Centralize -D_GNU_SOURCE= to CFLAGS in lib.mk
Shuah Khan
skhan at linuxfoundation.org
Thu Jun 27 11:14:43 PDT 2024
On 6/25/24 16:34, Edward Liaw wrote:
> Centralize the _GNU_SOURCE definition to CFLAGS in lib.mk. Remove
> redundant defines from Makefiles that import lib.mk. Convert any usage
> of "#define _GNU_SOURCE 1" to "#define _GNU_SOURCE".
>
> This uses the form "-D_GNU_SOURCE=", which is equivalent to
> "#define _GNU_SOURCE".
>
> Otherwise using "-D_GNU_SOURCE" is equivalent to "-D_GNU_SOURCE=1" and
> "#define _GNU_SOURCE 1", which is less commonly seen in source code and
> would require many changes in selftests to avoid redefinition warnings.
>
> Suggested-by: John Hubbard <jhubbard at nvidia.com>
> Signed-off-by: Edward Liaw <edliaw at google.com>
> ---
> 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 +-
> tools/testing/selftests/tmpfs/Makefile | 1 -
> 15 files changed, 12 insertions(+), 15 deletions(-)
>
Andrew,
I am seeing merge conflicts with mm and exec tests. Might be
better to have you take this through your tree?
Acked-by: Shuah Khan <skhan at linuxfoundation.org>
thanks,
-- Shuah
More information about the linux-riscv
mailing list