* [PATCH v2] gcc-runtime: enable sanitizers
@ 2014-09-03 15:11 Dan McGregor
2014-09-03 16:26 ` [PATCH v3] " Dan McGregor
0 siblings, 1 reply; 3+ messages in thread
From: Dan McGregor @ 2014-09-03 15:11 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
From: Dan McGregor <dan.mcgregor@usask.ca>
AddressSanitizer is a fast memory error detector.
ThreadSanitizer detects data races.
UBSanitizer detectes undefined behaviour.
All consist of compiler instrumentation and a run-time library.
The compiler instrumentation was already enabled, this enables
the run-time library component.
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
---
meta/recipes-devtools/gcc/gcc-runtime.inc | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 7ce84f1..e1663d1 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -10,7 +10,9 @@ EXTRA_OECONF_PATHS = "\
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
-RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic"
+SANITIZER_ARCHS = "arm i586 i686 x86-64"
+SANITIZER_TARGET = '${@bb.utils.contains("SANITIZER_ARCHS",
"${TRANSLATED_TARGET_ARCH}", "libsanitizer", "",d)}'
+RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${SANITIZER_TARGET}"
# ?
# libiberty
# libmudflap
@@ -88,6 +90,9 @@ PACKAGES = "\
libatomic \
libatomic-dev \
libatomic-staticdev \
+ libsanitizer \
+ libsanitizer-dev \
+ libsanitizer-staticdev \
"
# The base package doesn't exist, so we clear the recommends.
RRECOMMENDS_${PN}-dbg = ""
@@ -171,6 +176,28 @@ FILES_libatomic-dev = "\
"
FILES_libatomic-staticdev = "${libdir}/libatomic.a"
+FILES_libsanitizer = " \
+ ${libdir}/libasan.so.* \
+ ${libdir}/liblsan.so.* \
+ ${libdir}/libtsan.so.* \
+ ${libdir}/libubsan.so.*"
+FILES_libsanitizer-dev = " \
+ ${libdir}/libsanitizer.spec \
+ ${libdir}/libasan_preinit.o \
+ ${libdir}/libasan.so \
+ ${libdir}/liblsan.so \
+ ${libdir}/libtsan.so \
+ ${libdir}/libubsan.so \
+ ${libdir}/libasan.la \
+ ${libdir}/liblsan.la \
+ ${libdir}/libtsan.la \
+ ${libdir}/libubsan.la"
+FILES_libsanitizer-staticdev = " \
+ ${libdir}/libasan.a \
+ ${libdir}/liblsan.a \
+ ${libdir}/libtsan.a \
+ ${libdir}/libubsan.a"
+
do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v3] gcc-runtime: enable sanitizers
2014-09-03 15:11 [PATCH v2] gcc-runtime: enable sanitizers Dan McGregor
@ 2014-09-03 16:26 ` Dan McGregor
2014-09-03 17:51 ` Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: Dan McGregor @ 2014-09-03 16:26 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
From: Dan McGregor <dan.mcgregor@usask.ca>
AddressSanitizer is a fast memory error detector.
ThreadSanitizer detects data races.
UBSanitizer detectes undefined behaviour.
All consist of compiler instrumentation and a run-time library.
The compiler instrumentation was already enabled, this enables
the run-time library component.
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
---
meta/recipes-devtools/gcc/gcc-runtime.inc | 32 ++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 7ce84f1..f1928b4 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -10,7 +10,9 @@ EXTRA_OECONF_PATHS = "\
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
-RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic"
+SANITIZER_ARCHS = "arm i586 i686 x86-64"
+SANITIZER_TARGET = '${@bb.utils.contains("SANITIZER_ARCHS",
"${TRANSLATED_TARGET_ARCH}", "libsanitizer", "",d)}'
+RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${SANITIZER_TARGET}"
# ?
# libiberty
# libmudflap
@@ -88,6 +90,9 @@ PACKAGES = "\
libatomic \
libatomic-dev \
libatomic-staticdev \
+ libsanitizer \
+ libsanitizer-dev \
+ libsanitizer-staticdev \
"
# The base package doesn't exist, so we clear the recommends.
RRECOMMENDS_${PN}-dbg = ""
@@ -171,6 +176,31 @@ FILES_libatomic-dev = "\
"
FILES_libatomic-staticdev = "${libdir}/libatomic.a"
+FILES_libsanitizer = "\
+ ${libdir}/libasan.so.* \
+ ${libdir}/liblsan.so.* \
+ ${libdir}/libtsan.so.* \
+ ${libdir}/libubsan.so.* \
+"
+FILES_libsanitizer-dev = "\
+ ${libdir}/libsanitizer.spec \
+ ${libdir}/libasan_preinit.o \
+ ${libdir}/libasan.so \
+ ${libdir}/liblsan.so \
+ ${libdir}/libtsan.so \
+ ${libdir}/libubsan.so \
+ ${libdir}/libasan.la \
+ ${libdir}/liblsan.la \
+ ${libdir}/libtsan.la \
+ ${libdir}/libubsan.la \
+"
+FILES_libsanitizer-staticdev = "\
+ ${libdir}/libasan.a \
+ ${libdir}/liblsan.a \
+ ${libdir}/libtsan.a \
+ ${libdir}/libubsan.a \
+"
+
do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] gcc-runtime: enable sanitizers
2014-09-03 16:26 ` [PATCH v3] " Dan McGregor
@ 2014-09-03 17:51 ` Khem Raj
0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2014-09-03 17:51 UTC (permalink / raw)
To: Dan McGregor; +Cc: Patches and discussions about the oe-core layer
On Wed, Sep 3, 2014 at 9:26 AM, Dan McGregor <danismostlikely@gmail.com> wrote:
> From: Dan McGregor <dan.mcgregor@usask.ca>
>
> AddressSanitizer is a fast memory error detector.
> ThreadSanitizer detects data races.
> UBSanitizer detectes undefined behaviour.
>
> All consist of compiler instrumentation and a run-time library.
> The compiler instrumentation was already enabled, this enables
> the run-time library component.
looks good.
>
> Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
> ---
> meta/recipes-devtools/gcc/gcc-runtime.inc | 32 ++++++++++++++++++++++++++++++-
> 1 file changed, 31 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
> b/meta/recipes-devtools/gcc/gcc-runtime.inc
> index 7ce84f1..f1928b4 100644
> --- a/meta/recipes-devtools/gcc/gcc-runtime.inc
> +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
> @@ -10,7 +10,9 @@ EXTRA_OECONF_PATHS = "\
>
> EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
>
> -RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic"
> +SANITIZER_ARCHS = "arm i586 i686 x86-64"
> +SANITIZER_TARGET = '${@bb.utils.contains("SANITIZER_ARCHS",
> "${TRANSLATED_TARGET_ARCH}", "libsanitizer", "",d)}'
> +RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${SANITIZER_TARGET}"
> # ?
> # libiberty
> # libmudflap
> @@ -88,6 +90,9 @@ PACKAGES = "\
> libatomic \
> libatomic-dev \
> libatomic-staticdev \
> + libsanitizer \
> + libsanitizer-dev \
> + libsanitizer-staticdev \
> "
> # The base package doesn't exist, so we clear the recommends.
> RRECOMMENDS_${PN}-dbg = ""
> @@ -171,6 +176,31 @@ FILES_libatomic-dev = "\
> "
> FILES_libatomic-staticdev = "${libdir}/libatomic.a"
>
> +FILES_libsanitizer = "\
> + ${libdir}/libasan.so.* \
> + ${libdir}/liblsan.so.* \
> + ${libdir}/libtsan.so.* \
> + ${libdir}/libubsan.so.* \
> +"
> +FILES_libsanitizer-dev = "\
> + ${libdir}/libsanitizer.spec \
> + ${libdir}/libasan_preinit.o \
> + ${libdir}/libasan.so \
> + ${libdir}/liblsan.so \
> + ${libdir}/libtsan.so \
> + ${libdir}/libubsan.so \
> + ${libdir}/libasan.la \
> + ${libdir}/liblsan.la \
> + ${libdir}/libtsan.la \
> + ${libdir}/libubsan.la \
> +"
> +FILES_libsanitizer-staticdev = "\
> + ${libdir}/libasan.a \
> + ${libdir}/liblsan.a \
> + ${libdir}/libtsan.a \
> + ${libdir}/libubsan.a \
> +"
> +
> do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
> do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
> do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
> --
> 1.9.3
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-03 17:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 15:11 [PATCH v2] gcc-runtime: enable sanitizers Dan McGregor
2014-09-03 16:26 ` [PATCH v3] " Dan McGregor
2014-09-03 17:51 ` Khem Raj
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.