Skip to content

Commit

Permalink
nginx: Do not link against libia2.a unless IA2 is enabled
Browse files Browse the repository at this point in the history
libia2.a requires the runtime initialization code that is not included
unless IA2_ENABLE=1. If we try to link it without enabling the
initialization code, we will get a missing symbol now.
  • Loading branch information
rinon committed Sep 27, 2023
1 parent 9ae671d commit ae723b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion external/nginx/auto/make
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ IA2_ENABLE = 1

IA2_CALLGATES_TARGET = $NGX_OBJS/libia2_callgates.so
ifneq (\$(IA2_ENABLE),0)
IA2_LIB = \$(IA2_ROOT)/libia2/liblibia2.a
IA2_CALLGATES = $NGX_OBJS/libia2_callgates.so
else
IA2_LIB =
IA2_CALLGATES =
endif

Expand Down Expand Up @@ -297,7 +299,7 @@ $NGX_OBJS/ngx_rtmp_module_tls_padded.so: $NGX_OBJS/ngx_rtmp_module.so
\$(PAD_TLS) --allow-no-tls $NGX_OBJS/ngx_rtmp_module_tls_padded.so

$NGX_OBJS${ngx_dirsep}nginx$ngx_binext: $ngx_deps \$(IA2_CALLGATES) $NGX_OBJS/ngx_rtmp_module_tls_padded.so$ngx_spacer
\$(LINK) $ngx_long_start\$(IA2_LDFLAGS)$ngx_long_cont\$(IA2_PREREWRITER_LDFLAGS)$ngx_long_cont$ngx_binout$NGX_OBJS${ngx_dirsep}nginx$ngx_binext$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_main_link \$(IA2_ROOT)/libia2/liblibia2.a $NGX_OBJS/ngx_rtmp_module_tls_padded.so
\$(LINK) $ngx_long_start\$(IA2_LDFLAGS)$ngx_long_cont\$(IA2_PREREWRITER_LDFLAGS)$ngx_long_cont$ngx_binout$NGX_OBJS${ngx_dirsep}nginx$ngx_binext$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_main_link \$(IA2_LIB) $NGX_OBJS/ngx_rtmp_module_tls_padded.so
$ngx_rcc
$ngx_long_end

Expand Down

0 comments on commit ae723b0

Please sign in to comment.