Another try at fixing linker issue

Fixes https://github.com/harfbuzz/harfbuzz/issues/880
This commit is contained in:
Behdad Esfahbod 2018-03-31 12:15:50 +02:00
parent eff36cd8f0
commit 08b8eb678a
2 changed files with 9 additions and 8 deletions

View File

@ -77,8 +77,7 @@ GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
# Functions, and headers
# Functions and headers
AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l)
save_libs="$LIBS"
@ -96,6 +95,14 @@ if test "x$GCC" = "xyes"; then
# Make symbols link locally
AX_CHECK_LINK_FLAG([[-Bsymbolic-functions]], [LDFLAGS="$LDFLAGS -Bsymbolic-functions"])
# Make it possible to not link to libstdc++
# No threadsafe statics in C++ as we do it ourselves.
# We don't use these features, so it's safe to disable them
# even in the cases where we DO link to libstdc++.
# Put -fno-rtti before $CXXFLAGS such that users can re-enable it
# by overriding CXXFLAGS.
CXXFLAGS="-fno-rtti $CXXFLAGS -fno-exceptions -fno-threadsafe-statics"
# Assorted warnings
CXXFLAGS="$CXXFLAGS -Wcast-align"

View File

@ -28,12 +28,6 @@ HBSOURCES = $(HB_BASE_sources)
HBSOURCES += $(HB_BASE_RAGEL_GENERATED_sources)
HBHEADERS = $(HB_BASE_headers)
# Make sure we don't link to libstdc++
# No threadsafe statics in C++ as we do it ourselves
# We don't use these features, so it's safe to disable them
# even in the cases where we DO link to libstdc++.
AM_CXXFLAGS = -fno-exceptions -fno-threadsafe-statics -fno-rtti
if HAVE_OT
HBSOURCES += $(HB_OT_sources)
HBSOURCES += $(HB_OT_RAGEL_GENERATED_sources)