Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] libcorrect: fix debug build
@ 2018-11-19 17:46 Fabrice Fontaine
  2018-11-19 20:42 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2018-11-19 17:46 UTC (permalink / raw)
  To: buildroot

If BR2_ENABLE_DEBUG is set, Debug release will be used and as a result
-fsanitize=address will be added to CFLAGS which will fail on some
toolchains because it requires asan library

So add -DCMAKE_BUILD_TYPE=Release unconditionally

Fixes:
 - http://autobuild.buildroot.net/results/221d6a418e75b39fe645c3a56cee676518d2cff6

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libcorrect/libcorrect.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/libcorrect/libcorrect.mk b/package/libcorrect/libcorrect.mk
index 0a84aa5c26..cb25e0d0cd 100644
--- a/package/libcorrect/libcorrect.mk
+++ b/package/libcorrect/libcorrect.mk
@@ -9,5 +9,7 @@ LIBCORRECT_SITE = $(call github,quiet,libcorrect,$(LIBCORRECT_VERSION))
 LIBCORRECT_LICENSE = BSD-3-Clause
 LIBCORRECT_LICENSE_FILES = LICENSE
 LIBCORRECT_INSTALL_STAGING = YES
+# Debug release adds -fsanitize=address so always use Release
+LIBCORRECT_CONF_OPTS = -DCMAKE_BUILD_TYPE=Release
 
 $(eval $(cmake-package))
-- 
2.14.1

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

* [Buildroot] [PATCH 1/1] libcorrect: fix debug build
  2018-11-19 17:46 [Buildroot] [PATCH 1/1] libcorrect: fix debug build Fabrice Fontaine
@ 2018-11-19 20:42 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-11-19 20:42 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 19 Nov 2018 18:46:29 +0100, Fabrice Fontaine wrote:
> If BR2_ENABLE_DEBUG is set, Debug release will be used and as a result
> -fsanitize=address will be added to CFLAGS which will fail on some
> toolchains because it requires asan library
> 
> So add -DCMAKE_BUILD_TYPE=Release unconditionally
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/221d6a418e75b39fe645c3a56cee676518d2cff6
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/libcorrect/libcorrect.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/libcorrect/libcorrect.mk b/package/libcorrect/libcorrect.mk
> index 0a84aa5c26..cb25e0d0cd 100644
> --- a/package/libcorrect/libcorrect.mk
> +++ b/package/libcorrect/libcorrect.mk
> @@ -9,5 +9,7 @@ LIBCORRECT_SITE = $(call github,quiet,libcorrect,$(LIBCORRECT_VERSION))
>  LIBCORRECT_LICENSE = BSD-3-Clause
>  LIBCORRECT_LICENSE_FILES = LICENSE
>  LIBCORRECT_INSTALL_STAGING = YES
> +# Debug release adds -fsanitize=address so always use Release
> +LIBCORRECT_CONF_OPTS = -DCMAKE_BUILD_TYPE=Release

This is a bit of a hack. What about making upstream check if
-fsanitize=address is supported by the toolchain before using it ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-11-19 20:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-19 17:46 [Buildroot] [PATCH 1/1] libcorrect: fix debug build Fabrice Fontaine
2018-11-19 20:42 ` Thomas Petazzoni

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