This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Build libgcc_s on Windows
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: "Aaron W. LaFramboise" <aaronavay62 at aaronwl dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Danny Smith <dansmister at gmail dot com>, libstdc++ at gcc dot gnu dot org
- Date: Tue, 19 Aug 2008 17:54:59 +0200
- Subject: Re: [PATCH] Build libgcc_s on Windows
- References: <48A9C461.9010901@aaronwl.com> <48AA7D7F.1050709@gnu.org> <48AABF97.80202@aaronwl.com>
Aaron W. LaFramboise wrote:
Paolo Bonzini wrote:
+ if (pe_dll) {
+ # This matches SHLIB_SONAME in config/i386/t-cygming.
+ print "LIBRARY " pe_dll;
+ print "EXPORTS";
+ }
so that in the future it will suffice to have Windows maintainer
approval if you change the soname.
I actually tried this, but this doesn't work, because at the time mkmap
is run, the base soname has not yet been substituted, so you end up with
@something@_1.dll or something. Maybe I'll think of a more creative way
to do this so its not duplicated.
Right. I guess your patch is then okay from this build maintainer.
Howeever, if you want to do this cleanup, it's easy enough: in
libgcc/Makefile.in you should change $(SHLIB_MKMAP_OPTS) to $(subst
@shlib_base_name@,libgcc_s,$(SHLIB_MKMAP_OPTS)).
Bonus points if you change all the occurrences of
$(subst @multilib_flags@,$(CFLAGS) -B./,$(subst \
@multilib_dir@,$(MULTIDIR),$(subst \
@shlib_objs@,$(objects),$(subst \
@shlib_base_name@,SOME_BASE_NAME,$(subst \
@shlib_map_file@,$(mapfile),$(subst \
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
@shlib_slibdir@,$(shlib_slibdir),$(SOME_VAR))))))))
to something like
$(call replace_shlib_vars,SOME_BASE_NAME,$(SOME_VAR))
using an auxiliary variable definition like this one:
replace_shlib_vars = $(subst @multilib_flags@,$(CFLAGS) -B./,$(subst \
@multilib_dir@,$(MULTIDIR),$(subst \
@shlib_objs@,$(objects),$(subst \
@shlib_base_name@,$(1),$(subst \
@shlib_map_file@,$(mapfile),$(subst \
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
@shlib_slibdir@,$(shlib_slibdir),$(2))))))))
Thanks in advance, :-P
Paolo