mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] gcclibs: install libasan and libubsan
@ 2016-09-03 20:09 Clemens Gruber
  0 siblings, 0 replies; only message in thread
From: Clemens Gruber @ 2016-09-03 20:09 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich, Clemens Gruber

Those runtime libraries are required if programs are compiled with
-fsanitize=address to find memory errors or -fsanitize=undefined to
detect undefined behavior.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>

---
Note:
The leak and thread sanitizers were left out, because they only work on
the x86_64 platform.

 rules/gcclibs.in   | 24 ++++++++++++++++++++++++
 rules/gcclibs.make |  8 ++++++++
 2 files changed, 32 insertions(+)

diff --git a/rules/gcclibs.in b/rules/gcclibs.in
index b444183..38f58fb 100644
--- a/rules/gcclibs.in
+++ b/rules/gcclibs.in
@@ -35,4 +35,28 @@ config GCCLIBS_GCJ
 	  Installs the GNU Java Library
 	  libgcj
 
+config GCCLIBS_LIBASAN
+	bool "libasan"
+	select GCCLIBS
+	select GCCLIBS_GCC_S
+	select LIBC_DL
+	select LIBC_M
+	select LIBC_PTHREAD
+	select LIBC_RT
+	help
+	  Installs the AddressSanitizer runtime library
+	  libasan
+
+config GCCLIBS_LIBUBSAN
+	bool "libubsan"
+	select GCCLIBS
+	select GCCLIBS_GCC_S
+	select LIBC_DL
+	select LIBC_M
+	select LIBC_PTHREAD
+	select LIBC_RT
+	help
+	  Installs the UndefinedBehaviorSanitizer runtime library
+	  libubsan
+
 endmenu
diff --git a/rules/gcclibs.make b/rules/gcclibs.make
index a1079c2..f8688c3 100644
--- a/rules/gcclibs.make
+++ b/rules/gcclibs.make
@@ -47,6 +47,14 @@ ifdef PTXCONF_GCCLIBS_GCJ
 	@$(call install_copy_toolchain_lib, gcclibs, libgcj.so)
 endif
 
+ifdef PTXCONF_GCCLIBS_LIBASAN
+	@$(call install_copy_toolchain_lib, gcclibs, libasan.so)
+endif
+
+ifdef PTXCONF_GCCLIBS_LIBUBSAN
+	@$(call install_copy_toolchain_lib, gcclibs, libubsan.so)
+endif
+
 	@$(call install_finish, gcclibs)
 
 	@$(call touch)
-- 
2.9.3


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-03 20:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-03 20:09 [ptxdist] [PATCH] gcclibs: install libasan and libubsan Clemens Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox