]> git.proxmox.com Git - mirror_zfs.git/commitdiff
build: rename FORCEDEBUG_CPPFLAGS to LIBZPOOL_CPPFLAGS
authorRob Norris <rob.norris@klarasystems.com>
Mon, 26 Aug 2024 23:44:53 +0000 (09:44 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 27 Aug 2024 19:53:27 +0000 (12:53 -0700)
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 <allan@klarasystems.com>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Issue #16476
Closes #16477

cmd/Makefile.am
cmd/raidz_test/Makefile.am
cmd/zdb/Makefile.am
cmd/zstream/Makefile.am
config/Rules.am
lib/libzpool/Makefile.am
tests/zfs-tests/cmd/Makefile.am

index 2bd9d039f20e644a004ffff6668dc225dc73d0a2..96040976e53ed33b1b8ce2c466588470d9e6408d 100644 (file)
@@ -24,7 +24,7 @@ zfs_ids_to_path_LDADD = \
        libzfs.la
 
 
-zhack_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
+zhack_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
 
 sbin_PROGRAMS   += zhack
 CPPCHECKTARGETS += zhack
@@ -39,7 +39,7 @@ zhack_LDADD = \
 
 
 ztest_CFLAGS    = $(AM_CFLAGS) $(KERNEL_CFLAGS)
-ztest_CPPFLAGS  = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
+ztest_CPPFLAGS  = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
 
 sbin_PROGRAMS   += ztest
 CPPCHECKTARGETS += ztest
index 3b8b605683236d07bb980505a108b662b921df01..635216d65d734e7c054e1a3db89db591154cdfc3 100644 (file)
@@ -1,5 +1,5 @@
 raidz_test_CFLAGS   = $(AM_CFLAGS)   $(KERNEL_CFLAGS)
-raidz_test_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
+raidz_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
 
 bin_PROGRAMS    += raidz_test
 CPPCHECKTARGETS += raidz_test
index ebdc19128e1acabbe00962086b91582eacc6c8d6..8a4388bd1884ff2d1a1c8129ab6043a39cfe2980 100644 (file)
@@ -1,4 +1,4 @@
-zdb_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
+zdb_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
 zdb_CFLAGS   = $(AM_CFLAGS) $(LIBCRYPTO_CFLAGS)
 
 sbin_PROGRAMS   += zdb
index f9d0b0cfd2b796b85d5371e8055ea38c9106dd69..be3539fe905d8e672dbe014f986e8b01b8da41cd 100644 (file)
@@ -1,4 +1,4 @@
-zstream_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
+zstream_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
 
 sbin_PROGRAMS   += zstream
 CPPCHECKTARGETS += zstream
index b462826e2c8940d2420f4a5a1f758611f7b53561..9c0714c82513c91ed0b63568cb8905ea9376c423 100644 (file)
@@ -71,4 +71,7 @@ KERNEL_CFLAGS       = $(FRAME_LARGER_THAN)
 LIBRARY_CFLAGS      = -no-suppress
 
 # Forcibly enable asserts/debugging for libzpool &al.
-FORCEDEBUG_CPPFLAGS = -DDEBUG -UNDEBUG -DZFS_DEBUG
+# Since ZFS_DEBUG can change shared data structures, all libzpool users must
+# be compiled with the same flags.
+# See https://github.com/openzfs/zfs/issues/16476
+LIBZPOOL_CPPFLAGS = -DDEBUG -UNDEBUG -DZFS_DEBUG
index 6989fefc6662c29b2829d5348b4050568112d5db..81949bf9e5b81166568d84d4940ec59e6b747885 100644 (file)
@@ -3,7 +3,7 @@ include $(srcdir)/%D%/include/Makefile.am
 libzpool_la_CFLAGS  = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS)
 libzpool_la_CFLAGS += $(ZLIB_CFLAGS)
 
-libzpool_la_CPPFLAGS  = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
+libzpool_la_CPPFLAGS  = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
 libzpool_la_CPPFLAGS += -I$(srcdir)/include/os/@ac_system_l@/zfs
 libzpool_la_CPPFLAGS += -DLIB_ZPOOL_BUILD
 
index 23848a82ffbd11acb42efa6abced0effd1982dcf..a8df06c2e990ef07f69d57a63454c3dd5cdef65b 100644 (file)
@@ -24,7 +24,7 @@ scripts_zfs_tests_bin_PROGRAMS += %D%/badsend
 
 
 scripts_zfs_tests_bin_PROGRAMS += %D%/btree_test
-%C%_btree_test_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
+%C%_btree_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
 %C%_btree_test_LDADD = \
        libzpool.la \
        libzfs_core.la