diff --git a/winsup/configure.ac b/winsup/configure.ac index 5eb3273d1e..ca2b8c0748 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -110,6 +110,11 @@ AC_CHECK_LIB([bfd], [bfd_init], [true], AM_CONDITIONAL(BUILD_DUMPER, [test "x$ac_cv_lib_bfd_bfd_init" = "xyes"]) +AC_CHECK_LIB([sframe], [sframe_decode], + AC_MSG_NOTICE([Detected libsframe; Assuming that libbfd depends on it]), [true]) + +AM_CONDITIONAL(HAVE_LIBSFRAME, [test "x$ac_cv_lib_sframe_sframe_decode" = "xyes"]) + AC_CONFIG_FILES([ Makefile cygwin/Makefile diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index e32f02b7d0..45f3b0f905 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -545,7 +545,7 @@ get_cygwin_startup_info () child_info *res = (child_info *) si.lpReserved2; if (si.cbReserved2 < EXEC_MAGIC_SIZE || !res - || res->intro != PROC_MAGIC_GENERIC || res->magic != CHILD_INFO_MAGIC) + || res->intro != PROC_MAGIC_GENERIC || res->magic != (CHILD_INFO_MAGIC ^ CYGWIN_VERSION_DLL_COMBINED)) { strace.activate (false); res = NULL; diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index fbb1f0ef43..65dc523ca5 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -817,7 +817,7 @@ int child_info::retry_count = 0; by fork/spawn/exec. */ child_info::child_info (unsigned in_cb, child_info_types chtype, bool need_subproc_ready): - cb (in_cb), intro (PROC_MAGIC_GENERIC), magic (CHILD_INFO_MAGIC), + cb (in_cb), intro (PROC_MAGIC_GENERIC), magic (CHILD_INFO_MAGIC ^ CYGWIN_VERSION_DLL_COMBINED), type (chtype), cygheap (::cygheap), cygheap_max (::cygheap_max), flag (0), retry (child_info::retry_count), rd_proc_pipe (NULL), wr_proc_pipe (NULL), sigmask (_my_tls.sigmask) diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am index e12dfdd007..08f6212324 100644 --- a/winsup/utils/Makefile.am +++ b/winsup/utils/Makefile.am @@ -87,6 +87,10 @@ profiler_CXXFLAGS = -I$(srcdir) -idirafter ${top_srcdir}/cygwin -idirafter ${top profiler_LDADD = $(LDADD) -lntdll cygps_LDADD = $(LDADD) -lpsapi -lntdll +if HAVE_LIBSFRAME +dumper_LDADD += -lsframe +endif + if CROSS_BOOTSTRAP SUBDIRS = mingw endif