This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Libstdc++ as DLL on windows, alternative approach [was Re: cygwin patch review]
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, libstdc++ at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>, Danny Smith <dansmister at gmail dot com>, "Aaron W. LaFramboise (GCC)" <aaronavay62 at aaronwl dot com>, Kai Tietz <ktietz70 at googlemail dot com>
- Date: Mon, 23 Nov 2009 09:41:39 -0800
- Subject: Re: Libstdc++ as DLL on windows, alternative approach [was Re: cygwin patch review]
- References: <20091019092452.2e271791@mcgee.artheist.org> <4AFC8EC3.10502@gmail.com> <20091119093347.797df3ff@mcgee.artheist.org> <4B06CAEA.5080705@gmail.com>
> > I like this plan. What's the PR number? And can you affix your
> > patch from here to it:
> > http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00979.html
>
> This is now PR 42123. (The WIP patch is on the right lines but not
> quite correct yet, details in the PR.)
Thanks for this.
> - can your OK cover the c++-related change to LINK_SPEC in gcc/gcc.c
> or do I need to get another maintainer (probably jsm) for that?
You'll need ok from the appropriate maintainer. Looks ok to me.
> - is it OK even with the change to the c++config hunk mentioned above?
Yes.
> - is it OK even in stage 3?
Yes.
> gcc/ChangeLog:
>
> * configure.ac (USE_CYGWIN_LIBSTDCXX_WRAPPERS): Define to
> reflect status of AC_CHECK_FUNC for Cygwin DLL libstdc++ support
> wrappers.
> * configure: Regenerate.
> * config.in: Regenerate.
>
> * config/i386/cygwin.h (CXX_WRAP_SPEC_LIST): Define list of
> --wrap options for Cygwin DLL libstdc++ support wrappers.
> (CXX_WRAP_SPEC_OPT): Define spec to use wrappers or not by
> default according to defined value of USE_CYGWIN_LIBSTDCXX_WRAPPERS.
> (CXX_WRAP_SPEC): Define entire wrapper spec in or out
> according to whether USE_CYGWIN_LIBSTDCXX_WRAPPERS is even defined or
> not. (LINK_SPEC): Include CXX_WRAP_SPEC.
> * gcc/config/i386/winnt.c (wrapper_strcmp): New qsort helper
> function. (i386_find_on_wrapper_list): Check if a function is found
> on the list of libstdc++ wrapper options.
> (i386_pe_file_end): If we are importing a wrapped function,
> also emit an external declaration for the real version.
> * config/i386/cygming.opt (muse-libstdc-wrappers): New option
> for Cygwin targets. Update copyright year.
>
> * gcc.c (LINK_COMMAND_SPEC): Allow and ignore
> -static-libstdc++ similarly to -static.
>
> gcc/cp/ChangeLog:
>
> * g++spec.c (SKIPOPT): Delete.
> (lang_specific_driver): Do not skip -static-libstdc++ option.
>
All this looks ok to me but I cannot approve.
> libstdc++-v3/ChangeLog:
>
> * libstdc++-v3/acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Don't
> disable on PE targets.
> * libstdc++-v3/configure: Regenerate.
> * libstdc++-v3/configure.host: Add libtool DLL options for
> Cygwin and MinGW platforms.
>
> * libstdc++-v3/include/bits/c++config
> (_GLIBCXX_VISIBILITY_ATTR): On platforms that don't support
> visibility, allow them to declare a macro _GLIBCXX_PSEUDO_VISIBILITY
> that is applied in place of visibility. (_GLIBCXX_PSEUDO_VISIBILITY):
> Supply empty default if not declared by CPU- or OS-specific headers.
>
> * libstdc++-v3/config/os/newlib/os_defines.h
> (_GLIBCXX_PSEUDO_VISIBILITY_default): New macro for dllimport.
> (_GLIBCXX_PSEUDO_VISIBILITY_hidden): New empty macro.
> (_GLIBCXX_PSEUDO_VISIBILITY): Evaluate to one of the above.
> * libstdc++-v3/config/os/mingw32/os_defines.h
> (_GLIBCXX_PSEUDO_VISIBILITY_default,
> _GLIBCXX_PSEUDO_VISIBILITY_hidden,
> _GLIBCXX_PSEUDO_VISIBILITY): Likewise.
OK.
best,
benjamin