package/rpi-rgb-led-matrix: needs -fPIC

Fix the following build failure raised since the addition of the package
in commit e821078031:

/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 <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Fabrice Fontaine 2021-12-09 22:32:06 +01:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 7d59055f79
commit 04d69e105b

View File

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