From 445badfa8bada57bb9526a81846878ef688878fb Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Jan 2025 21:21:11 +0100 Subject: [PATCH] package/perl: properly pass CFLAGS/LDFLAGS when building host-perl HOST_CFLAGS and HOST_LDFLAGS are currently not accounted for when building host-perl. In particular, it means that executables built/installed by host-perl do not have a RPATH pointing to HOST_DIR/lib, which can cause issues as libcrypt.so can now be provided by host-libxcrypt. This was causing check-host-rpath to complain in the situation where: 1. host-perl was built, with no RPATH, linked against the system libcrypt.so 2. host-libxcrypt was built afterwards, installed as HOST_DIR/lib/libcrypt.so, which made check-host-rpath complain as HOST_DIR/bin/perl is linked against a library present in HOST_DIR/lib but doesn't have a RPATH to HOST_DIR/lib Fixes: http://autobuild.buildroot.net/results/d4348d7f872ccd734795a1d071960a696148ed6a/ Signed-off-by: Thomas Petazzoni Acked-by: Francois Perrad Signed-off-by: Julien Olivain (cherry picked from commit 65127a8a772132c3d0905241563d1978a2b332ba) Signed-off-by: Peter Korsgaard --- package/perl/perl.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/perl/perl.mk b/package/perl/perl.mk index 9de0425e87..1bc8c99278 100644 --- a/package/perl/perl.mk +++ b/package/perl/perl.mk @@ -98,7 +98,9 @@ endef HOST_PERL_CONF_OPTS = \ -des \ -Dprefix="$(HOST_DIR)" \ - -Dcc="$(HOSTCC)" + -Dcc="$(HOSTCC)" \ + -Dccflags="$(HOST_CFLAGS)" \ + -Dldflags="$(HOST_LDFLAGS)" define HOST_PERL_CONFIGURE_CMDS (cd $(@D); $(HOST_MAKE_ENV) HOSTCC='$(HOSTCC_NOCCACHE)' \