stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject [PATCH] STDCXX-507 (or using __declspec(dllexport/dllimport on gcc/cygwin in shared builds)
Date Fri, 07 Dec 2007 18:26:17 GMT
  Today I've verified the patch for STDCXX-507 on gcc 4.2.0 and gcc
3.4.4.

  The patch is here:
https://issues.apache.org/jira/secure/attachment/12371246/cygwin.patch

ChangeLog:

  STDCXX-507
  * include/rw/_defs.h [__CYGWIN__ && _RWSHARED]: #define _RWSTD_EXPORT
macro
using __declspec (dllexport) directiive.
  * include/typeinfo (bad_cast): Don't declare class as _RWSTD_EXPORT.
  Declare as _RWSTD_EXPORT the only members, that doesn't already
present in libc.
  (bad_typeid): Ditto.
  * include/exception (exception): Ditto.
   (bad_exception): Ditto.
  (set_unexpected): Ditto.
  (unexpected): Ditto.
  (set_terminate): Ditto.
  (terminate): Ditto.
  (uncaught_exception): Ditto.
  * include/new (bad_alloc): Ditto.
  * etc/config/gcc.config [CYGWIN] (SHARED_CPPFLAGS): #define _RWSHARED
for shared builds.
  (LDSOFLAGS): turn on exporting of the all symbols (this feature is
disabled by default
  due to using __declspec(dllexport)).
  (LDFLAGS): Force ".exe" executable files extension. 

  Without using of the -export-all-symbols linker option the some
examples and
tests are failed to link due to "undefined reference to the [typeinfo
for ...]".
Where ... is std::istream, std::ostream, std::wistream, std::wostream,
...
I don't know why these typeinfo's are not exported and how to explicitly
export
them. Also the __rw_atomic_addxx() and __rw_atomic_xcghxx() functions
are not
exported because they are defined in assembly file (the gcc and ld
doesn't have
the feature like #pragma comment (linker, "/EXPORT=...") in MSVC). So
the
-export-all-symbols option is needed to deal with "undefined reference"
errors.

  The -force-exe-suffix option is not related to the issue. It's just
forces, that
all executable names will end's with ".exe".

Farid.

Mime
View raw message