Skip to contentSkip to conversation

sdl: overwrite libpth autodetection

PATCH Superseded Peter Seiderer 2 participants 3 messages Nov 19, 2015

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sdl: overwrite libpth autodetection

The sdl libpth autodetection gets confused in case a host version is present. Overwrite libpth autodection for the target build dependent on BR2_PACKAGE_LIBPTHSEM and BR2_PACKAGE_LIBPTHSEM_COMPAT and use pth-config from staging directory.

Fixes [1]:

checking for pthreads... no
checking for pth-config... /usr/bin/pth-config checking pth... yes
[...]
./src/SDL.c:33:17: fatal error: pth.h: No such file or directory
#include <pth.h>

[1] http://autobuild.buildroot.net/results/733/73330e51b3c099d179004db0b9522ac13358b8f7

---
Changes v1 -> v2:
- add SDL_DEPENDENCIES += libpthsem (suggested by Baruch Siach)
- fix libpth enable logic, needs BR2_PACKAGE_LIBPTHSEM and BR2_PACKAGE_LIBPTHSEM_COMPAT
- overwrite ac_cv_path_PTH_CONFIG to use the right pth-config from staging dir

---
 package/sdl/sdl.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/sdl/sdl.mk +9 -0
index 78eb4dd..e976905 100644
@@ -58,6 +58,15 @@ ifneq ($(BR2_USE_MMU),y)
 SDL_CONF_OPTS += --enable-dga=no
 endif
 
+# overwrite autodection (prevents confusion with host libpth version)
+ifeq ($(BR2_PACKAGE_LIBPTHSEM)$(BR2_PACKAGE_LIBPTHSEM_COMPAT),yy)
+SDL_CONF_OPTS += --enable-pth
+SDL_CONF_ENV += ac_cv_path_PTH_CONFIG=$(STAGING_DIR)/usr/bin/pth-config
+SDL_DEPENDENCIES += libpthsem
+else
+SDL_CONF_OPTS += --disable-pth
+endif
+
 ifeq ($(BR2_PACKAGE_TSLIB),y)
 SDL_DEPENDENCIES += tslib
 endif
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/1 sdl: overwrite libpth autodetection

Hi Peter,

Quoted 33 lines · Peter Seiderer

The sdl libpth autodetection gets confused in case a host version is present. Overwrite libpth autodection for the target build dependent on BR2_PACKAGE_LIBPTHSEM and BR2_PACKAGE_LIBPTHSEM_COMPAT and use pth-config from staging directory.

Fixes [1]:

checking for pthreads... no
checking for pth-config... /usr/bin/pth-config checking pth... yes
[...]
./src/SDL.c:33:17: fatal error: pth.h: No such file or directory
#include <pth.h>

[1] http://autobuild.buildroot.net/results/733/73330e51b3c099d179004db0b9522ac13358b8f7

---
Changes v1 -> v2:
- add SDL_DEPENDENCIES += libpthsem (suggested by Baruch Siach)
- fix libpth enable logic, needs BR2_PACKAGE_LIBPTHSEM and BR2_PACKAGE_LIBPTHSEM_COMPAT
- overwrite ac_cv_path_PTH_CONFIG to use the right pth-config from staging dir

---
 package/sdl/sdl.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/sdl/sdl.mk +0 -0
index 78eb4dd..e976905 100644

package/sdl/sdl.mk ifneq ($(BR2_USE_MMU),y) · line 62

Quoted 5 lines
package/sdl/sdl.mk +2 -0
@@ -58,6 +58,15 @@ ifneq ($(BR2_USE_MMU),y)
 SDL_CONF_OPTS += --enable-dga=no
 endif
 
+# overwrite autodection (prevents confusion with host libpth version)
+ifeq ($(BR2_PACKAGE_LIBPTHSEM)$(BR2_PACKAGE_LIBPTHSEM_COMPAT),yy)

Testing for BR2_PACKAGE_LIBPTHSEM_COMPAT alone should be enough since BR2_PACKAGE_LIBPTHSEM_COMPAT depends on BR2_PACKAGE_LIBPTHSEM.

package/sdl/sdl.mk ifneq ($(BR2_USE_MMU),y) · line 72

Quoted 10 lines
package/sdl/sdl.mk +7 -0
+SDL_CONF_OPTS += --enable-pth
+SDL_CONF_ENV += ac_cv_path_PTH_CONFIG=$(STAGING_DIR)/usr/bin/pth-config
+SDL_DEPENDENCIES += libpthsem
+else
+SDL_CONF_OPTS += --disable-pth
+endif
+
 ifeq ($(BR2_PACKAGE_TSLIB),y)
 SDL_DEPENDENCIES += tslib
 endif

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH v2 1/1 sdl: overwrite libpth autodetection

Hello Baruch,

Quoted 39 lines · Baruch Siach

Hi Peter,

Quoted 36 lines · Peter Seiderer

The sdl libpth autodetection gets confused in case a host version is present. Overwrite libpth autodection for the target build dependent on BR2_PACKAGE_LIBPTHSEM and BR2_PACKAGE_LIBPTHSEM_COMPAT and use pth-config from staging directory.

Fixes [1]:

checking for pthreads... no
checking for pth-config... /usr/bin/pth-config checking pth... yes
[...]
./src/SDL.c:33:17: fatal error: pth.h: No such file or directory
#include <pth.h>

[1] http://autobuild.buildroot.net/results/733/73330e51b3c099d179004db0b9522ac13358b8f7

---
Changes v1 -> v2:
- add SDL_DEPENDENCIES += libpthsem (suggested by Baruch Siach)
- fix libpth enable logic, needs BR2_PACKAGE_LIBPTHSEM and BR2_PACKAGE_LIBPTHSEM_COMPAT
- overwrite ac_cv_path_PTH_CONFIG to use the right pth-config from staging dir

---
 package/sdl/sdl.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/sdl/sdl.mk +0 -0
index 78eb4dd..e976905 100644
@@ -58,6 +58,15 @@ ifneq ($(BR2_USE_MMU),y)
 SDL_CONF_OPTS += --enable-dga=no
 endif
 
Quoted 6 lines

package/sdl/sdl.mk ifneq ($(BR2_USE_MMU),y) · line 62

Quoted 2 lines
package/sdl/sdl.mk +2 -0
+# overwrite autodection (prevents confusion with host libpth version)
+ifeq ($(BR2_PACKAGE_LIBPTHSEM)$(BR2_PACKAGE_LIBPTHSEM_COMPAT),yy)

Testing for BR2_PACKAGE_LIBPTHSEM_COMPAT alone should be enough since BR2_PACKAGE_LIBPTHSEM_COMPAT depends on BR2_PACKAGE_LIBPTHSEM.

O.k, will send patch v3 soon...

Thanks for review...

Regards,
Peter

Quoted 13 lines

package/sdl/sdl.mk ifneq ($(BR2_USE_MMU),y) · line 72

Quoted 10 lines
package/sdl/sdl.mk +7 -0
+SDL_CONF_OPTS += --enable-pth
+SDL_CONF_ENV += ac_cv_path_PTH_CONFIG=$(STAGING_DIR)/usr/bin/pth-config
+SDL_DEPENDENCIES += libpthsem
+else
+SDL_CONF_OPTS += --disable-pth
+endif
+
 ifeq ($(BR2_PACKAGE_TSLIB),y)
 SDL_DEPENDENCIES += tslib
 endif

baruch