From 88fdab5d77bf28ddf161171c370902239f771f4e Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sat, 6 Apr 2024 17:01:10 +0200 Subject: [PATCH] nginx: add patch to fix compilation error on mips targets Add patch to fix compilation error on mips targets. This was triggered after enabling LTO. It was discovered that -fPIC is enabled on building dynamic modules in CFLAGS but was missing on linking them. This patch adds the missing -fPIC also on linking. Fixes: 3b13b08ad98d ("nginx: Fix compilation with LTO") Signed-off-by: Christian Marangi --- net/nginx/Makefile | 2 +- net/nginx/patches/nginx/202-fix-fPIC-on-link.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 net/nginx/patches/nginx/202-fix-fPIC-on-link.patch diff --git a/net/nginx/Makefile b/net/nginx/Makefile index 14c856a31b..7478078de3 100644 --- a/net/nginx/Makefile +++ b/net/nginx/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nginx PKG_VERSION:=1.25.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://nginx.org/download/ diff --git a/net/nginx/patches/nginx/202-fix-fPIC-on-link.patch b/net/nginx/patches/nginx/202-fix-fPIC-on-link.patch new file mode 100644 index 0000000000..95b5b6d31a --- /dev/null +++ b/net/nginx/patches/nginx/202-fix-fPIC-on-link.patch @@ -0,0 +1,11 @@ +--- a/auto/make ++++ b/auto/make +@@ -623,7 +623,7 @@ END + modules: $ngx_obj + + $ngx_obj: $ngx_deps$ngx_spacer +- \$(LINK) $ngx_long_start$ngx_binout$ngx_obj$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_module_link ++ \$(LINK) $ngx_pic_opt $ngx_long_start$ngx_binout$ngx_obj$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_module_link + $ngx_long_end + + $ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c