GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Link libstdc++ statically on linux · netty/netty-tcnative@a288f03

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • openssl-dynamic/src/main/native-package/m4
    • tcnative.m4
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎openssl-dynamic/src/main/native-package/m4/tcnative.m4‎

Copy file name to clipboardExpand all lines: openssl-dynamic/src/main/native-package/m4/tcnative.m4
+15-1Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,21 @@ AC_DEFUN([TCN_CHECK_STATIC],[
275275
LD_FLAGS_STATIC="-Wl,-exported_symbol,_JNI_*"
276276
;;
277277
*linux*)
278-
LD_FLAGS_STATIC="-Wl,--exclude-libs,ALL"
278+
dnl On linux we also statically link libstdc++ etc to make it as backward / forward compatible as possible.
279+
LD_FLAGS_STATIC="-static-libstdc++ -static-libgcc -l:libgcc.a -l:libstdc++.a -Wl,--exclude-libs,ALL"
280+
281+
dnl Cleanup libtool postdeps so it will not link against libtdc++ dynamically.
282+
AC_MSG_NOTICE([Cleanup libtool C++ postdeps: $postdeps_CXX])
283+
tmppostdeps=;
284+
for x in ${postdeps_CXX};
285+
do
286+
case $x in
287+
-lstdc++) true; ;;
288+
-lgcc_s) true; ;;
289+
*) tmppostdeps=${tmppostdeps}${tmppostdeps:+ }$x; ;;
290+
esac;
291+
done;
292+
postdeps_CXX="${tmppostdeps}";
279293
;;
280294
*)
281295
LD_FLAGS_STATIC=""

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.