Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3] sdl: overwrite libpth autodetection
@ 2015-11-19 21:42 Peter Seiderer
  2015-11-19 22:05 ` Peter Korsgaard
  2015-11-20 22:43 ` Arnout Vandecappelle
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Seiderer @ 2015-11-19 21:42 UTC (permalink / raw)
  To: buildroot

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_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

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v2 -> v3:
  - simplify libpth enable logic, check on BR2_PACKAGE_LIBPTHSEM_COMPAT is enough
   (suggested by Baruch Siach)

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(+)

diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk
index 78eb4dd..cc1ad06 100644
--- a/package/sdl/sdl.mk
+++ b/package/sdl/sdl.mk
@@ -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_COMPAT),y)
+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
-- 
2.1.4

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

* [Buildroot] [PATCH v3] sdl: overwrite libpth autodetection
  2015-11-19 21:42 [Buildroot] [PATCH v3] sdl: overwrite libpth autodetection Peter Seiderer
@ 2015-11-19 22:05 ` Peter Korsgaard
  2015-11-20 22:43 ` Arnout Vandecappelle
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2015-11-19 22:05 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Seiderer <ps.report@gmx.net> writes:

 > 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_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

 > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 > ---
 > Changes v2 -> v3:
 >   - simplify libpth enable logic, check on BR2_PACKAGE_LIBPTHSEM_COMPAT is enough
 >    (suggested by Baruch Siach)

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v3] sdl: overwrite libpth autodetection
  2015-11-19 21:42 [Buildroot] [PATCH v3] sdl: overwrite libpth autodetection Peter Seiderer
  2015-11-19 22:05 ` Peter Korsgaard
@ 2015-11-20 22:43 ` Arnout Vandecappelle
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2015-11-20 22:43 UTC (permalink / raw)
  To: buildroot

On 19-11-15 22:42, Peter Seiderer wrote:
> The sdl libpth autodetection gets confused in case a host
> version is present. Overwrite libpth autodection for the

 For future reference: it's override, not overwrite. You could say "overwrite"
if you had a patch that fixes the autodetection, but you want to say that you
force it not to use autodetection.

 Regards,
 Arnout

> target build dependent on BR2_PACKAGE_LIBPTHSEM_COMPAT and
> use pth-config from staging directory.


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

end of thread, other threads:[~2015-11-20 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 21:42 [Buildroot] [PATCH v3] sdl: overwrite libpth autodetection Peter Seiderer
2015-11-19 22:05 ` Peter Korsgaard
2015-11-20 22:43 ` Arnout Vandecappelle

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