diff options
author | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2018-05-04 12:55:48 +0900 |
---|---|---|
committer | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2018-05-04 12:55:48 +0900 |
commit | 2b3e0ef6c095cf6ea920e95fc9826dc39694162a (patch) | |
tree | 40bbaadd8e487f08e56ff3ce6d88243f50024cfd /builds/unix/configure.raw | |
parent | 660afb5ce81ccf3271ec80b6475ec8b16d862a25 (diff) | |
download | freetype2-2b3e0ef6c095cf6ea920e95fc9826dc39694162a.tar.gz |
Support symbol visibility features of Sun / Oracle C compilers.
Reported by Kiyoshi Kanazawa:
https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html
Thanks to the suggestions by Alexei and Alan Coopersmith.
* builds/unix/configure.raw: Check if "-xldscope=hidden" is
accepted, and if so, it is added to CFLAGS. This is the option
making Sun / Oracle C compilers hide the symbols from global
scope.
* include/freetype/config/ftconfig.h: Use "__global" prefix
for FT_EXPORT() macro, if SunPro C is newer than Sun ONE
Studio 8 (2003).
* builds/unix/ftconfig.in: Ditto.
* builds/vms/ftconfig.h: Ditto.
Diffstat (limited to 'builds/unix/configure.raw')
-rw-r--r-- | builds/unix/configure.raw | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index baab79dc5..8eded34b4 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -311,6 +311,14 @@ AC_SUBST([XX_ANSIFLAGS]) # It is recommended that shared libraries hide symbols except those with # explicit __attribute__((visibility("default"))). # +AC_MSG_CHECKING([for -xldscope=hidden compiler flag]) +orig_CFLAGS="${CFLAGS}" +CFLAGS="${CFLAGS} -xldscope=hidden" +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], + AC_MSG_RESULT(yes), + CFLAGS="${orig_CFLAGS}" + AC_MSG_RESULT(no)) + AC_MSG_CHECKING([for -fvisibility=hidden compiler flag]) orig_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -fvisibility=hidden" |