Skip to content

Commit 1158d32

Browse files
committed
Make: use C++ linker for BoringSSL.
"-lstdc++" is insufficient for static linking on Debian and Ubuntu.
1 parent f24f4b7 commit 1158d32

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

build/build-boringssl-static.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ BUILD_ENV += OPENSSL_STATIC=1
1313

1414
NGINX_CONFIGURE = \
1515
$(NGINX_CONFIGURE_BASE) \
16-
--with-cc-opt="-I$(LIBSSL_SRCDIR)/include" \
17-
--with-ld-opt="-L$(LIBSSL_BUILDDIR) -lstdc++" \
16+
--with-cc=c++ \
17+
--with-cc-opt="-xc -I$(LIBSSL_SRCDIR)/include" \
18+
--with-ld-opt="-L$(LIBSSL_BUILDDIR)" \
1819
--with-debug \
1920
--add-module="$(CURDIR)"
2021

build/build-boringssl.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ TEST_NGINX_GLOBALS += load_module $(NGINX_BUILT_MODULE);
2727

2828
NGINX_CONFIGURE = \
2929
$(NGINX_CONFIGURE_BASE) \
30-
--with-cc-opt="-I$(LIBSSL_SRCDIR)/include" \
31-
--with-ld-opt="-L$(LIBSSL_BUILDDIR) -lstdc++" \
30+
--with-cc=c++ \
31+
--with-cc-opt="-xc -I$(LIBSSL_SRCDIR)/include" \
32+
--with-ld-opt="-L$(LIBSSL_BUILDDIR)" \
3233
--with-debug \
3334
--add-dynamic-module="$(CURDIR)"
3435

0 commit comments

Comments
 (0)