From 04d69e105bc0de2926332ace94fb08b87cf7b5f6 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 9 Dec 2021 22:32:06 +0100 Subject: [PATCH] package/rpi-rgb-led-matrix: needs -fPIC Fix the following build failure raised since the addition of the package in commit e821078031e14df69e5142f23e9cb7b5a1ea0e77: /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-buildroot-linux-gnu/9.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: led-matrix.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN10rgb_matrix11FrameCanvasE' which may bind externally can not be used when making a shared object; recompile with -fPIC Fixes: - http://autobuild.buildroot.org/results/be291d6b0efdc1914babfb4a9be5eb863058eaf5 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk b/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk index b220bbc3db..85c1d1a320 100644 --- a/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk +++ b/package/rpi-rgb-led-matrix/rpi-rgb-led-matrix.mk @@ -10,8 +10,12 @@ RPI_RGB_LED_MATRIX_LICENSE = GPL-2.0 RPI_RGB_LED_MATRIX_LICENSE_FILES = COPYING RPI_RGB_LED_MATRIX_INSTALL_STAGING = YES +RPI_RGB_LED_MATRIX_MAKE_OPTS = \ + $(TARGET_CONFIGURE_OPTS) \ + CXXFLAGS="$(TARGET_CXXFLAGS) -fPIC" + define RPI_RGB_LED_MATRIX_BUILD_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/lib all + $(MAKE) $(RPI_RGB_LED_MATRIX_MAKE_OPTS) -C $(@D)/lib all endef define RPI_RGB_LED_MATRIX_INSTALL_STAGING_CMDS @@ -31,7 +35,7 @@ ifeq ($(BR2_PACKAGE_RPI_RGB_LED_MATRIX_IMAGE_VIEWER),y) RPI_RGB_LED_MATRIX_DEPENDENCIES += graphicsmagick define RPI_RGB_LED_MATRIX_BUILD_IMAGE_VIEWER_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) $(RPI_RGB_LED_MATRIX_MAKE_OPTS) \ MAGICK_CXXFLAGS="-I$(STAGING_DIR)/usr/include/GraphicsMagick $(shell $(STAGING_DIR)/usr/bin/GraphicsMagick++-config --cxxflags)" \ MAGICK_LDFLAGS="-L$(STAGING_DIR)/usr/lib $(shell $(STAGING_DIR)/usr/bin/GraphicsMagick++-config --libs)" \ -C $(@D)/utils led-image-viewer @@ -46,7 +50,7 @@ endif ifeq ($(BR2_PACKAGE_RPI_RGB_LED_MATRIX_TEXT_SCROLLER),y) define RPI_RGB_LED_MATRIX_BUILD_TEXT_SCROLLER_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/utils text-scroller + $(MAKE) $(RPI_RGB_LED_MATRIX_MAKE_OPTS) -C $(@D)/utils text-scroller endef RPI_RGB_LED_MATRIX_POST_BUILD_HOOKS += RPI_RGB_LED_MATRIX_BUILD_TEXT_SCROLLER_CMDS @@ -62,7 +66,7 @@ ifeq ($(BR2_PACKAGE_RPI_RGB_LED_MATRIX_VIDEO_VIEWER),y) RPI_RGB_LED_MATRIX_DEPENDENCIES += ffmpeg define RPI_RGB_LED_MATRIX_BUILD_VIDEO_VIEWER_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) $(RPI_RGB_LED_MATRIX_MAKE_OPTS) \ AV_CXXFLAGS="$(shell $(HOST_DIR)/bin/pkg-config --cflags libavcodec libavformat libswscale libavutil)" \ AV_LDFLAGS="$(shell $(HOST_DIR)/bin/pkg-config --libs libavcodec libavformat libswscale libavutil)" \ -C $(@D)/utils video-viewer