]> Git Repo - linux.git/commit
selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk
authorEdward Liaw <[email protected]>
Tue, 25 Jun 2024 22:34:45 +0000 (22:34 +0000)
committerAndrew Morton <[email protected]>
Wed, 10 Jul 2024 19:14:51 +0000 (12:14 -0700)
commitcc937dad85aea4ab9e4f9827d7ea55932c86906b
treef5f5c54765bc36b954aba8a68e392bd21fe3e28b
parent95139d9408453df05dc4dfde37a0eb70afae0f81
selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk

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.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Edward Liaw <[email protected]>
Suggested-by: John Hubbard <[email protected]>
Acked-by: Shuah Khan <[email protected]>
Reviewed-by: Muhammad Usama Anjum <[email protected]>
Cc: Albert Ou <[email protected]>
Cc: AndrĂ© Almeida <[email protected]>
Cc: Darren Hart <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Eric W. Biederman <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Jarkko Sakkinen <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Kevin Tian <[email protected]>
Cc: Palmer Dabbelt <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Reinette Chatre <[email protected]>
Cc: Sean Christopherson <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
15 files changed:
tools/testing/selftests/exec/Makefile
tools/testing/selftests/futex/functional/Makefile
tools/testing/selftests/intel_pstate/Makefile
tools/testing/selftests/iommu/Makefile
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/lib.mk
tools/testing/selftests/mm/thuge-gen.c
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/tcp_ao/Makefile
tools/testing/selftests/proc/Makefile
tools/testing/selftests/resctrl/Makefile
tools/testing/selftests/ring-buffer/Makefile
tools/testing/selftests/riscv/mm/Makefile
tools/testing/selftests/sgx/Makefile
tools/testing/selftests/tmpfs/Makefile
This page took 0.06852 seconds and 4 git commands to generate.