Skip to content
Snippets Groups Projects
Commit c2f0061e authored by Andreas Gnau's avatar Andreas Gnau :speech_balloon:
Browse files

nginx: Fix compilation with LTO


When CONFIG_USE_LTO=y, the int-size detection script will fail because a
variable gets optimised out. Mark it as volatile to fix the issue.

Signed-off-by: default avatarAndreas Gnau <andreas.gnau@iopsys.eu>
(cherry picked from commit 3b13b08ad98dd15999e83c98f80674c9965d7a10)
parent c186667d
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=nginx
PKG_VERSION:=1.25.0
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nginx.org/download/
......@@ -23,7 +23,7 @@ PKG_CPE_ID:=cpe:/a:nginx:nginx
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_FLAGS:=gc-sections
PKG_BUILD_FLAGS:=gc-sections lto
PKG_CONFIG_DEPENDS := \
CONFIG_NGINX_DAV \
......
......@@ -4,7 +4,7 @@
$NGX_INCLUDE_INTTYPES_H
$NGX_INCLUDE_AUTO_CONFIG_H
+char object_code_block[] = {
+volatile char object_code_block[] = {
+ '\n', 'e', '4', 'V', 'A',
+ '0', 'x', ('0' + sizeof($ngx_type)),
+ 'Y', '3', 'p', 'M', '\n'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment