mtd: fix build on riscv
PATCH 1/1 mtd: fix build on riscv
Define _REENTRANT otherwise pthread detection will fail
Fixes:
- http://autobuild.buildroot.org/results/b0e7978a997a2aae383161455b5d898b8c28e2e1
--- package/mtd/mtd.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/mtd/mtd.mk +7 -0
@@ -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
Signature · 1 line
2.14.1
PATCH 1/1 mtd: fix build on riscv
Quoted 15 lines · Fabrice Fontaine
Define
_REENTRANTotherwise pthread detection will failFixes:
- http://autobuild.buildroot.org/results/b0e7978a997a2aae383161455b5d898b8c28e2e1Signed-off-by Fabrice Fontaine <[email protected]>--- package/mtd/mtd.mk | 7 +++++++ 1 file changed, 7 insertions(+)package/mtd/mtd.mk +0
-0
package/mtd/mtd.mk MTD_LICENSE = GPL-2.0 · line 18
Quoted 8 lines
package/mtd/mtd.mk +5
-0@@ -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
Quoted 6 lines
package/mtd/mtd.mk +2
-0+endif + ifeq ($(BR2_PACKAGE_MTD_JFFS_UTILS),y) MTD_DEPENDENCIES += zlib lzo host-pkgconf MTD_CONF_OPTS += --with-jffs
PATCH 1/1 mtd: fix build on riscv
Hello,
Quoted 7 lines · Arnout Vandecappelle
package/mtd/mtd.mk MTD_LICENSE = GPL-2.0 · line 18
Quoted 5 lines
package/mtd/mtd.mk +5
-0+# 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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Thomas Petazzoni
AppliedPATCH 1/1 mtd: fix build on riscv
In reply to Fabrice FontaineHello,
Quoted 9 lines · Fabrice Fontaine
Define
_REENTRANTotherwise pthread detection will failFixes:
- http://autobuild.buildroot.org/results/b0e7978a997a2aae383161455b5d898b8c28e2e1Signed-off-by Fabrice Fontaine <[email protected]>--- package/mtd/mtd.mk | 7 +++++++ 1 file changed, 7 insertions(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com