gcc/libgcc/config/i386/t-slibgcc-cygming
Tristan Gingold bf1431e359 eh_personality.cc (__gxx_personality_seh0): New function.
libstdc++-v3/
	* libsupc++/eh_personality.cc (__gxx_personality_seh0): New function.
	Adjust for SEH.
	* config/abi/pre/gnu.ver: Add __gxx_personality_seh0.

libobjc/
	* exception.c (__gnu_objc_personality_seh0): New function.

libjava/
	* libgcj.ver: Add __gcj_personality_seh0.
	* exception.cc (__gcj_personality_seh0): New function.
	Adjust for SEH.

libgcc/
	* unwind-seh.c: New file.
	* unwind-generic.h: Include windows.h for SEH.
	(_Unwind_Exception): Use 6 private fields for SEH.
	(_GCC_specific_handler): Declare.
	* unwind-c.c (__gcc_personality_seh0): New function.
	Adjust for SEH.
	* config/i386/libgcc-cygming.ver: New file.
	* config/i386/t-seh-eh: New file.
	* config.host (x86_64-*-mingw*): Default to seh.

gcc/
	* opts.c (finish_options): Handle UI_SEH.
	* expr.c (build_personality_function): Handle UI_SEH.
	* dwarf2out.c (dwarf2out_begin_prologue): Handle UI_SEH.
	* coretypes.h (unwind_info_type): Add UI_SEH.
	* config/i386/winnt.c (i386_pe_seh_emit_except_personality):
	New function.
	(i386_pe_seh_init_sections): Likewise.
	* config/i386/cygming.h (TARGET_ASM_EMIT_EXCEPT_PERSONALITY): Define.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* common/config/i386/i386-common.c (TARGET_EXCEPT_UNWIND_INFO): Define.
	(i386_except_unwind_info): New function.


Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r189644
2012-07-19 07:29:24 +00:00

59 lines
2.2 KiB
Plaintext

# Build a shared libgcc library for PECOFF with a DEF file
# with the GNU linker.
#
# mkmap-flat.awk is used with the pe_dll option to produce a DEF instead
# of an ELF map file.
#
# Warning: If SHLIB_SOVERSION or SHLIB_SONAME are updated, LIBGCC_SONAME
# in mingw32.h and SHLIB_MKMAP_OPTS below must be updated also.
SHLIB_EXT = .dll
SHLIB_IMPLIB = @shlib_base_name@.a
SHLIB_SOVERSION = 1
SHLIB_SONAME = @shlib_base_name@_$(EH_MODEL)-$(SHLIB_SOVERSION)$(SHLIB_EXT)
SHLIB_MAP = @shlib_map_file@
SHLIB_OBJS = @shlib_objs@
SHLIB_DIR = @multilib_dir@/shlib
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
# SHLIB_DLLDIR is defined by including one of either t-dlldir or t-dlldir-x
# (native/cross build respectively) in the tmake_file list in
# libgcc/config.host.
ifndef SHLIB_DLLDIR
$(error SHLIB_DLLDIR must be defined)
endif
ifndef SHLIB_PTHREAD_CFLAG
SHLIB_PTHREAD_CFLAG =
endif
ifndef SHLIB_PTHREAD_LDFLAG
SHLIB_PTHREAD_LDFLAG =
endif
SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).def && \
if [ ! -d $(SHLIB_DIR) ]; then \
mkdir $(SHLIB_DIR); \
else true; fi && \
$(CC) $(LIBGCC2_CFLAGS) $(SHLIB_PTHREAD_CFLAG) \
-shared -nodefaultlibs \
$(SHLIB_MAP).def \
-Wl,--out-implib,$(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp \
-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
$(SHLIB_OBJS) ${SHLIB_PTHREAD_LDFLAG} $(SHLIB_LC) && \
if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
else true; fi && \
mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
mv $(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp $(SHLIB_DIR)/$(SHLIB_IMPLIB)
SHLIB_INSTALL = \
$(mkinstalldirs) $(DESTDIR)$(SHLIB_DLLDIR) \
$(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
$(INSTALL) $(SHLIB_DIR)/$(SHLIB_SONAME) \
$(DESTDIR)$(SHLIB_DLLDIR)/$(SHLIB_SONAME); \
$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_IMPLIB) \
$(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_IMPLIB)
SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
# We'd like to use SHLIB_SONAME here too, but shlib_base_name
# does not get substituted before mkmap-flat.awk is run.
SHLIB_MKMAP_OPTS = -v pe_dll=libgcc_s_$(EH_MODEL)-$(SHLIB_SOVERSION)$(SHLIB_EXT)
SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-cygming.ver