stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <>
Subject [jira] Updated: (STDCXX-1031) [gcc 4.0] make use of gcc 4.1 -fvisibility option
Date Sat, 14 Feb 2009 23:19:59 GMT


Martin Sebor updated STDCXX-1031:

    Environment: gcc 4.0 and better on ELF targets  (was: gcc 4.1 and better on ELF targets)
        Summary: [gcc 4.0] make use of gcc 4.1 -fvisibility option  (was: [gcc 4.1] make use
of gcc 4.1 -fvisibility option)

The option is available in gcc 4.0: see {{[-fvisibility |]}}
in the GCC 4.0.4 manual.

> [gcc 4.0] make use of gcc 4.1 -fvisibility option
> -------------------------------------------------
>                 Key: STDCXX-1031
>                 URL:
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: Build and Installation
>    Affects Versions: 4.2.1
>         Environment: gcc 4.0 and better on ELF targets
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>             Fix For: 4.2.2
> The gcc 4.1 {{[-fvisibility |]}}
option is said to
> {quote}
> ??...very substantially improve linking and load times of shared object libraries, produce
more optimized code, provide near-perfect API export and prevent symbol clashes. It is *strongly*
recommended that you use this in any shared objects you distribute.??
> {quote}
> In order for stdcxx users to benefit as described in the gcc manual we should make use
of the {{-fvisibility=hidden}} option in conjunction with {{[\_\_attribute\_\_((visibility("default")))
on exported interfaces as the gcc manual recommends.
> Besides adding the {{-fvisibility=hidden}} option to the command line when building shared
libraries with gcc, the implementation involves defining the {{_RWSTD_EXPORT}} macro for gcc
as follows:
> {code}
> #define _RWSTD_EXPORT __attribute__ ((visibility ("default")))
> {code}
> Note that since gcc requires the {{\_\_attribute\_\_}} decoration only on function declarations
and issues a warning when it appears on definitions so the {{_RWSTD_EXPORT}} macro must not
be used on definitions.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message