* [Buildroot] [PATCH] package/sdl2_ttf: x-includes and x-libraries must be set for cross-compiling
@ 2016-07-23 10:19 Romain Naour
2016-07-24 13:04 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Romain Naour @ 2016-07-23 10:19 UTC (permalink / raw)
To: buildroot
If those flags are not explicitly passed, the sdl2_ttf configure script
will include -I/usr/include and -L/usr/lib in the compile flags, which
are obviously unsafe for cross-compilation.
"checking for X... libraries /usr/lib, headers /usr/include"
Fixes:
http://autobuild.buildroot.net/results/f96/f968fb31e9882cc856296a7c729d93e345e9e861
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
package/sdl2_ttf/sdl2_ttf.mk | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/package/sdl2_ttf/sdl2_ttf.mk b/package/sdl2_ttf/sdl2_ttf.mk
index 71c5bc7..e1674a1 100644
--- a/package/sdl2_ttf/sdl2_ttf.mk
+++ b/package/sdl2_ttf/sdl2_ttf.mk
@@ -14,4 +14,15 @@ SDL2_TTF_DEPENDENCIES = sdl2 freetype host-pkgconf
SDL2_TTF_CONF_ENV = \
FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config
+# x-includes and x-libraries must be set for cross-compiling
+# By default x_includes and x_libraries contains unsafe paths.
+# (/usr/include and /usr/lib)
+ifeq ($(BR2_PACKAGE_SDL2_X11),y)
+SDL2_TTF_CONF_OPTS += --with-x=$(STAGING_DIR) \
+ --x-includes=$(STAGING_DIR)/usr/include \
+ --x-libraries=$(STAGING_DIR)/usr/lib
+else
+SDL2_TTF_CONF_OPTS += --with-x=no
+endif
+
$(eval $(autotools-package))
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] package/sdl2_ttf: x-includes and x-libraries must be set for cross-compiling
2016-07-23 10:19 [Buildroot] [PATCH] package/sdl2_ttf: x-includes and x-libraries must be set for cross-compiling Romain Naour
@ 2016-07-24 13:04 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-07-24 13:04 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 23 Jul 2016 12:19:42 +0200, Romain Naour wrote:
> +# x-includes and x-libraries must be set for cross-compiling
> +# By default x_includes and x_libraries contains unsafe paths.
> +# (/usr/include and /usr/lib)
> +ifeq ($(BR2_PACKAGE_SDL2_X11),y)
> +SDL2_TTF_CONF_OPTS += --with-x=$(STAGING_DIR) \
I *think* --with-x doesn't look at its argument, so I've changed this
to just --with-x.
> + --x-includes=$(STAGING_DIR)/usr/include \
> + --x-libraries=$(STAGING_DIR)/usr/lib
> +else
> +SDL2_TTF_CONF_OPTS += --with-x=no
And I've changed this to --without-x.
Applied with those changes. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-24 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-23 10:19 [Buildroot] [PATCH] package/sdl2_ttf: x-includes and x-libraries must be set for cross-compiling Romain Naour
2016-07-24 13:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox