* [Buildroot] [PATCH 1/1] mtd: fix build on riscv
@ 2018-11-20 18:52 Fabrice Fontaine
2018-11-20 23:34 ` Arnout Vandecappelle
2018-11-21 19:59 ` Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2018-11-20 18:52 UTC (permalink / raw)
To: buildroot
Define _REENTRANT otherwise pthread detection will fail
Fixes:
- http://autobuild.buildroot.org/results/b0e7978a997a2aae383161455b5d898b8c28e2e1
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/mtd/mtd.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
index 13e501fc33..2d627ffa3d 100644
--- a/package/mtd/mtd.mk
+++ b/package/mtd/mtd.mk
@@ -11,6 +11,13 @@ MTD_LICENSE = GPL-2.0
MTD_LICENSE_FILES = COPYING
MTD_INSTALL_STAGING = YES
+# gcc on riscv doesn't define _REENTRANT when -pthread is passed while
+# it should. Compensate this deficiency here otherwise mtd configure
+# script doesn't find that thread support is enabled.
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS):$(BR2_riscv),y:y)
+MTD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_REENTRANT"
+endif
+
ifeq ($(BR2_PACKAGE_MTD_JFFS_UTILS),y)
MTD_DEPENDENCIES += zlib lzo host-pkgconf
MTD_CONF_OPTS += --with-jffs
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] mtd: fix build on riscv
2018-11-20 18:52 [Buildroot] [PATCH 1/1] mtd: fix build on riscv Fabrice Fontaine
@ 2018-11-20 23:34 ` Arnout Vandecappelle
2018-11-21 8:39 ` Thomas Petazzoni
2018-11-21 19:59 ` Thomas Petazzoni
1 sibling, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2018-11-20 23:34 UTC (permalink / raw)
To: buildroot
On 20/11/2018 19:52, Fabrice Fontaine wrote:
> Define _REENTRANT otherwise pthread detection will fail
>
> Fixes:
> - http://autobuild.buildroot.org/results/b0e7978a997a2aae383161455b5d898b8c28e2e1
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/mtd/mtd.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
> index 13e501fc33..2d627ffa3d 100644
> --- a/package/mtd/mtd.mk
> +++ b/package/mtd/mtd.mk
> @@ -11,6 +11,13 @@ MTD_LICENSE = GPL-2.0
> MTD_LICENSE_FILES = COPYING
> MTD_INSTALL_STAGING = YES
>
> +# gcc on riscv doesn't define _REENTRANT when -pthread is passed while
> +# it should. Compensate this deficiency here otherwise mtd configure
> +# script doesn't find that thread support is enabled.
> +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS):$(BR2_riscv),y:y)
> +MTD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_REENTRANT"
Patching gcc sounds more and more attractive...
Regards,
Arnout
> +endif
> +
> ifeq ($(BR2_PACKAGE_MTD_JFFS_UTILS),y)
> MTD_DEPENDENCIES += zlib lzo host-pkgconf
> MTD_CONF_OPTS += --with-jffs
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] mtd: fix build on riscv
2018-11-20 23:34 ` Arnout Vandecappelle
@ 2018-11-21 8:39 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-11-21 8:39 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 21 Nov 2018 00:34:30 +0100, Arnout Vandecappelle wrote:
> > +# gcc on riscv doesn't define _REENTRANT when -pthread is passed while
> > +# it should. Compensate this deficiency here otherwise mtd configure
> > +# script doesn't find that thread support is enabled.
> > +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS):$(BR2_riscv),y:y)
> > +MTD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_REENTRANT"
>
> Patching gcc sounds more and more attractive...
Yes, definitely. We should do that.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] mtd: fix build on riscv
2018-11-20 18:52 [Buildroot] [PATCH 1/1] mtd: fix build on riscv Fabrice Fontaine
2018-11-20 23:34 ` Arnout Vandecappelle
@ 2018-11-21 19:59 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-11-21 19:59 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 20 Nov 2018 19:52:37 +0100, Fabrice Fontaine wrote:
> Define _REENTRANT otherwise pthread detection will fail
>
> Fixes:
> - http://autobuild.buildroot.org/results/b0e7978a997a2aae383161455b5d898b8c28e2e1
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/mtd/mtd.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-21 19:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20 18:52 [Buildroot] [PATCH 1/1] mtd: fix build on riscv Fabrice Fontaine
2018-11-20 23:34 ` Arnout Vandecappelle
2018-11-21 8:39 ` Thomas Petazzoni
2018-11-21 19:59 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox