Skip to content

Commit b3b7491

Browse files
robnbehlendorf
authored andcommitted
build: rename FORCEDEBUG_CPPFLAGS to LIBZPOOL_CPPFLAGS
This is just a very small attempt to make it more obvious that these flags aren't optional for libzpool-using programs, by not making it seem like there's an option to say "well, I don't _want_ to force debugging". Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Issue #16476 Closes #16477
1 parent 92fca1c commit b3b7491

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

cmd/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ zfs_ids_to_path_LDADD = \
2424
libzfs.la
2525

2626

27-
zhack_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
27+
zhack_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
2828

2929
sbin_PROGRAMS += zhack
3030
CPPCHECKTARGETS += zhack
@@ -39,7 +39,7 @@ zhack_LDADD = \
3939

4040

4141
ztest_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
42-
ztest_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
42+
ztest_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
4343

4444
sbin_PROGRAMS += ztest
4545
CPPCHECKTARGETS += ztest

cmd/raidz_test/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
raidz_test_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
2-
raidz_test_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
2+
raidz_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
33

44
bin_PROGRAMS += raidz_test
55
CPPCHECKTARGETS += raidz_test

cmd/zdb/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
zdb_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
1+
zdb_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
22
zdb_CFLAGS = $(AM_CFLAGS) $(LIBCRYPTO_CFLAGS)
33

44
sbin_PROGRAMS += zdb

cmd/zstream/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
zstream_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
1+
zstream_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
22

33
sbin_PROGRAMS += zstream
44
CPPCHECKTARGETS += zstream

config/Rules.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,7 @@ KERNEL_CFLAGS = $(FRAME_LARGER_THAN)
7171
LIBRARY_CFLAGS = -no-suppress
7272

7373
# Forcibly enable asserts/debugging for libzpool &al.
74-
FORCEDEBUG_CPPFLAGS = -DDEBUG -UNDEBUG -DZFS_DEBUG
74+
# Since ZFS_DEBUG can change shared data structures, all libzpool users must
75+
# be compiled with the same flags.
76+
# See https://github.com/openzfs/zfs/issues/16476
77+
LIBZPOOL_CPPFLAGS = -DDEBUG -UNDEBUG -DZFS_DEBUG

lib/libzpool/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include $(srcdir)/%D%/include/Makefile.am
33
libzpool_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS)
44
libzpool_la_CFLAGS += $(ZLIB_CFLAGS)
55

6-
libzpool_la_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
6+
libzpool_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
77
libzpool_la_CPPFLAGS += -I$(srcdir)/include/os/@ac_system_l@/zfs
88
libzpool_la_CPPFLAGS += -DLIB_ZPOOL_BUILD
99

tests/zfs-tests/cmd/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ scripts_zfs_tests_bin_PROGRAMS += %D%/badsend
2424

2525

2626
scripts_zfs_tests_bin_PROGRAMS += %D%/btree_test
27-
%C%_btree_test_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
27+
%C%_btree_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
2828
%C%_btree_test_LDADD = \
2929
libzpool.la \
3030
libzfs_core.la

0 commit comments

Comments
 (0)