mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: ptxdist@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>,
	Clemens Gruber <clemens.gruber@pqgruber.com>
Subject: [ptxdist] [PATCH] gcclibs: install libasan and libubsan
Date: Sat,  3 Sep 2016 22:09:58 +0200	[thread overview]
Message-ID: <20160903200958.23737-1-clemens.gruber@pqgruber.com> (raw)

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

                 reply	other threads:[~2016-09-03 20:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160903200958.23737-1-clemens.gruber@pqgruber.com \
    --to=clemens.gruber@pqgruber.com \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox