Skip to contentSkip to conversation

wiringpi: disable for static build

PATCH New Peter Seiderer 2 participants 2 messages Jun 27, 2018 – Aug 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wiringpi: disable for static build

Static build of the wiringPi package is disabled by the tool author (see wiringPi/noMoreStatic for details) since the version bump to 2.46.

Fixes [1]:

arm-linux-gcc.br_real: error: ../wiringPi/libwiringPi.a: No such file or directory

[1] http://autobuild.buildroot.net/results/a1ca953247475a5f31fe9283ade05c9cba26853b

---
 package/wiringpi/Config.in   |  5 +++--
 package/wiringpi/wiringpi.mk | 28 +++++++---------------------
 2 files changed, 10 insertions(+), 23 deletions(-)
package/wiringpi/Config.in +3 -2
index 2062a6208e..e55a67fbe0 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_WIRINGPI
 	bool "wiringpi"
+	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
@@ -7,6 +8,6 @@ config BR2_PACKAGE_WIRINGPI
 
 	  http://wiringpi.com/
 
-comment "wiringpi needs a toolchain w/ threads"
+comment "wiringpi needs a toolchain w/ threads and dynamic library"
 	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
package/wiringpi/wiringpi.mk +7 -21
index 497a5d1ebe..0c3774917c 100644
@@ -11,34 +11,20 @@ WIRINGPI_LICENSE = LGPL-3.0+
 WIRINGPI_LICENSE_FILES = COPYING.LESSER
 WIRINGPI_INSTALL_STAGING = YES
 
-ifeq ($(BR2_STATIC_LIBS),y)
-WIRINGPI_LIB_BUILD_TARGETS = static
-WIRINGPI_LIB_INSTALL_TARGETS = install-static
-WIRINGPI_BIN_BUILD_TARGETS = gpio-static
-else ifeq ($(BR2_SHARED_LIBS),y)
-WIRINGPI_LIB_BUILD_TARGETS = all
-WIRINGPI_LIB_INSTALL_TARGETS = install
-WIRINGPI_BIN_BUILD_TARGETS = all
-else
-WIRINGPI_LIB_BUILD_TARGETS = all static
-WIRINGPI_LIB_INSTALL_TARGETS = install install-static
-WIRINGPI_BIN_BUILD_TARGETS = all
-endif
-
 define WIRINGPI_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/wiringPi $(WIRINGPI_LIB_BUILD_TARGETS)
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/devLib $(WIRINGPI_LIB_BUILD_TARGETS)
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/gpio $(WIRINGPI_BIN_BUILD_TARGETS)
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/wiringPi all
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/devLib all
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/gpio all
 endef
 
 define WIRINGPI_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/wiringPi $(WIRINGPI_LIB_INSTALL_TARGETS) DESTDIR=$(STAGING_DIR) PREFIX=/usr LDCONFIG=true
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/devLib $(WIRINGPI_LIB_INSTALL_TARGETS) DESTDIR=$(STAGING_DIR) PREFIX=/usr LDCONFIG=true
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/wiringPi install DESTDIR=$(STAGING_DIR) PREFIX=/usr LDCONFIG=true
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/devLib install DESTDIR=$(STAGING_DIR) PREFIX=/usr LDCONFIG=true
 endef
 
 define WIRINGPI_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/wiringPi $(WIRINGPI_LIB_INSTALL_TARGETS) DESTDIR=$(TARGET_DIR) PREFIX=/usr LDCONFIG=true
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/devLib $(WIRINGPI_LIB_INSTALL_TARGETS) DESTDIR=$(TARGET_DIR) PREFIX=/usr LDCONFIG=true
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/wiringPi install DESTDIR=$(TARGET_DIR) PREFIX=/usr LDCONFIG=true
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/devLib install DESTDIR=$(TARGET_DIR) PREFIX=/usr LDCONFIG=true
 	$(INSTALL) -D -m 0755 $(@D)/gpio/gpio $(TARGET_DIR)/usr/bin/gpio
 	$(INSTALL) -D -m 0755 $(@D)/gpio/pintest $(TARGET_DIR)/usr/bin/pintest
 endef
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 wiringpi: disable for static build

Hello,

Quoted 8 lines · Peter Seiderer

Static build of the wiringPi package is disabled by the tool author (see wiringPi/noMoreStatic for details) since the version bump to 2.46.

Fixes [1]:

arm-linux-gcc.br_real: error: ../wiringPi/libwiringPi.a: No such file or directory

Quoted 7 lines

[1] http://autobuild.buildroot.net/results/a1ca953247475a5f31fe9283ade05c9cba26853b

---
 package/wiringpi/Config.in   |  5 +++--
 package/wiringpi/wiringpi.mk | 28 +++++++---------------------
 2 files changed, 10 insertions(+), 23 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com