All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] unit: test-rap: disable optimization to speed up compilation
@ 2026-10-10 11:14 Pauli Virtanen
  2026-10-10 16:09 ` [BlueZ] " bluez.test.bot
  2026-10-12 21:50 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2026-10-10 11:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Compilation of this file with optimization takes 4 minutes with ASAN.
Disable optimization to reduce to 2 sec.

autoconf puts global -O2 in CFLAGS that cannot be overridden eg. with
unit_test_bap_CFLAGS. Use pragma instead.
---
 unit/test-rap.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/unit/test-rap.c b/unit/test-rap.c
index b05edf203..338f0babf 100644
--- a/unit/test-rap.c
+++ b/unit/test-rap.c
@@ -9,6 +9,12 @@
 #include <config.h>
 #endif
 
+#if defined(__GNUC__)
+/* Speed up compilation */
+#pragma GCC optimize ("O0")
+#undef _FORTIFY_SOURCE
+#endif
+
 #define _GNU_SOURCE
 #include <unistd.h>
 #include <string.h>
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-12 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-10 11:14 [PATCH BlueZ] unit: test-rap: disable optimization to speed up compilation Pauli Virtanen
2026-10-10 16:09 ` [BlueZ] " bluez.test.bot
2026-10-12 21:50 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.