Skip to contentSkip to conversation

package/sdl_image: fix WebP dynamically loaded on host build

PATCH New Paul Cercueil 2 participants 3 messages Jul 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/sdl_image: fix WebP dynamically loaded on host build

Just like with libjpeg and libpng, we don't want libwebp to be dynamically loaded by SDL_image at runtime.

---
 package/sdl_image/sdl_image.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/sdl_image/sdl_image.mk +2 -1
index ee0712cc27..46a28799cf 100644
@@ -43,7 +43,8 @@ HOST_SDL_IMAGE_CONF_OPTS = \
 	--disable-static \
 	--disable-jpg-shared \
 	--disable-png-shared \
-	--disable-tif-shared
+	--disable-tif-shared \
+	--disable-webp-shared
 
 HOST_SDL_IMAGE_DEPENDENCIES = host-libjpeg host-libpng host-sdl
 
Signature · 1 line
2.27.0
#1 lore raw

PATCH 2/2 package/sdl_image: disable dynamic loading of libraries

The thing with Buildroot, is that we know in advance what will be in the root filesystem. Therefore, we don't need SDL_image to probe for the presence of libpng, libjpeg, libtiff or libwebp and dynamically load them; SDL_image can be linked to them directly at compilation time.

---
 package/sdl_image/sdl_image.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/sdl_image/sdl_image.mk +4 -0
index 46a28799cf..95a03a3956 100644
@@ -16,6 +16,10 @@ SDL_IMAGE_CONF_OPTS = \
 	--with-sdl-exec-prefix=$(STAGING_DIR)/usr \
 	--disable-sdltest \
 	--disable-static \
+	--disable-jpg-shared \
+	--disable-png-shared \
+	--disable-tif-shared \
+	--disable-webp-shared \
 	--enable-bmp=$(if $(BR2_PACKAGE_SDL_IMAGE_BMP),yes,no) \
 	--enable-gif=$(if $(BR2_PACKAGE_SDL_IMAGE_GIF),yes,no) \
 	--enable-jpg=$(if $(BR2_PACKAGE_SDL_IMAGE_JPEG),yes,no) \
Signature · 1 line
2.27.0
#2 lore raw

PATCH 1/2 package/sdl_image: fix WebP dynamically loaded on host build

In reply to Paul Cercueil
Quoted 7 lines · On Sun, 12 Jul 2020 21:57:11 +0200 Paul Cercueil <[email protected]> wrote:

Just like with libjpeg and libpng, we don't want libwebp to be dynamically loaded by SDL_image at runtime.

---
 package/sdl_image/sdl_image.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Both applied to master. Thanks!

Thomas

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