and for the record the (for now ?) useless infra i have written. As you can
see, nothing is done as libunwind_la_SOURCES_os_win32 is empty.

On Wed, Mar 16, 2016 at 8:44 AM, Vincent Torri <[email protected]>
wrote:

> just fyi, the output of configure on Windows, in case you see something
> that can help me
>
> Vincent
>
> On Wed, Mar 16, 2016 at 8:40 AM, Vincent Torri <[email protected]>
> wrote:
>
>> if you look at the patch :
>>
>> 1) unwind.h : there is no more #ifdef __LP64__
>> 2) AddressSpace.hpp, UnwindLevel1-gcc-ext.c and assembly.h do not exist
>> anymore
>>
>> so i doubt that there is any interest in trying to apply the patch.
>>
>> i'm very interested in adding windows support, but i have to understabd
>> the libunwind internal first. The i have to write some os-win32.c at least
>>
>> Vincent
>>
>>
>>
>> On Wed, Mar 16, 2016 at 8:22 AM, C Bergström <[email protected]>
>> wrote:
>>
>>> I don't have any Windows engineers to update this patch, but if
>>> there's anyone who would rebase it for some bounty let me know. I'd
>>> love to see some level of Win support available.
>>>
>>> Thanks
>>>
>>> On Wed, Mar 16, 2016 at 3:17 PM, Martin Hundebøll <[email protected]>
>>> wrote:
>>> > Hi Vincet,
>>> >
>>> > Thanks for taking the time to consider this. Guess I'll just disable
>>> out
>>> > libunwind in our mingw build.
>>> >
>>> > // Martin
>>> >
>>> > On 2016-03-16 07:35, Vincent Torri wrote:
>>> >>
>>> >> Hello
>>> >>
>>> >> unfortunately, this patch can not apply anymore, due to internal
>>> changes
>>> >> in libunwind.
>>> >>
>>> >> also, i've seen some use of the long type (in unwind.h for example),
>>> >> which is always 32 bits long on Windows, even on Windows 64 bit. I
>>> don't
>>> >> know if it is a problem or not
>>> >>
>>> >> Also, now, in src/ there are some OS specific files (about shared mem
>>> >> and ELF). There are shared mem API on Windows, but i don't know what i
>>> >> would do with ELF stuff...
>>> >>
>>> >> I have added some infra in the autotools for Windows, but with no
>>> >> windows source code, it's a bit useless...
>>> >>
>>> >> Vincent Torri
>>> >>
>>> >>
>>> >> On Tue, Mar 15, 2016 at 9:44 PM, Martin Hundebøll <
>>> [email protected]
>>> >> <mailto:[email protected]>> wrote:
>>> >>
>>> >>     Hi Vincent / libunwind dev
>>> >>
>>> >>     I came across this patch and I propose it being included in
>>> upstream
>>> >>     libunwind:
>>> >>
>>> >>
>>> https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-libunwind-svn/0001-libunwind-add-support-for-mingw-w64.patch
>>> >>
>>> >>     Thanks,
>>> >>     Martin
>>> >>
>>> >>
>>> >>     On 2015-12-13 09:29, Vincent Torri wrote:
>>> >>
>>> >>         Hello
>>> >>
>>> >>         I am writing a small valgrind-like program on Windows, to
>>> detect
>>> >>         memleak and some errors that valgrind's memcheck identifies.
>>> >>
>>> >>         Currently, for the backtrace, I use the Windows API if
>>> compiled
>>> >> with
>>> >>         vc++, and libbfd if compiled with gcc (mingw-w64). libbfd
>>> works
>>> >> well
>>> >>         (i get file, function ad line number that I want), but the
>>> >>         licence is
>>> >>         a problem (GPL v3).
>>> >>
>>> >>         libdwarf seems big, libunwind seems smaller, and according to
>>> the
>>> >>         documentation, libunwind can manage DWARF format
>>> >>
>>> >>         If I'm not mistaken, the GNU linker provides debugging
>>> >>         informations in
>>> >>         the DWARF format on Windows.
>>> >>
>>> >>         I have 2 questions:
>>> >>
>>> >>         1) Do you think that libunwind could indeed provide backtrace
>>> from
>>> >>         programs/libraries linked with the GNU linker on Windows ?
>>> >>
>>> >>         2) if yes, as i am quite interested to have libunwind on
>>> Windows,
>>> >>         compiling it with MSYS/mingw-w64 (not vc++), where should I
>>> >>         start, and
>>> >>         which files should I look first ?
>>> >>
>>> >>         Note that I would like to provide patches upstream, not to
>>> fork
>>> >>         libunwind.
>>> >>
>>> >>         thank you
>>> >>
>>> >>         Vincent Torri
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>     --
>>> >>     Kind Regards,
>>> >>     Martin Hundebøll
>>> >>     Kildeagervej 166
>>> >>     8361 Hasselager
>>> >>
>>> >>     +45 25 56 24 38
>>> >>     [email protected] <mailto:[email protected]>
>>> >>
>>> >>     _______________________________________________
>>> >>     Libunwind-devel mailing list
>>> >>     [email protected] <mailto:[email protected]>
>>> >>     https://lists.nongnu.org/mailman/listinfo/libunwind-devel
>>> >>
>>> >>
>>> >
>>> > _______________________________________________
>>> > Libunwind-devel mailing list
>>> > [email protected]
>>> > https://lists.nongnu.org/mailman/listinfo/libunwind-devel
>>>
>>
>>
>
diff --git a/configure.ac b/configure.ac
index 85d78f8..0ad20f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
-LT_INIT
+LT_INIT([win32-dll])
 AM_PROG_AS
 AM_PROG_CC_C_O
 
@@ -160,6 +160,7 @@ AM_CONDITIONAL(OS_LINUX, expr x$target_os : xlinux 
>/dev/null)
 AM_CONDITIONAL(OS_HPUX, expr x$target_os : xhpux >/dev/null)
 AM_CONDITIONAL(OS_FREEBSD, expr x$target_os : xfreebsd >/dev/null)
 AM_CONDITIONAL(OS_QNX, expr x$target_os : xnto-qnx >/dev/null)
+AM_CONDITIONAL(OS_WIN32, expr x$target_os : xmingw32 >/dev/null)
 
 AC_MSG_CHECKING([for ELF helper width])
 case "${target_arch}" in
diff --git a/src/Makefile.am b/src/Makefile.am
index 5d87475..82ab658 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -152,6 +152,8 @@ libunwind_la_SOURCES_os_freebsd = os-freebsd.c
 
 libunwind_la_SOURCES_os_qnx = os-qnx.c
 
+libunwind_la_SOURCES_os_win32 = 
+
 libunwind_dwarf_common_la_SOURCES = dwarf/global.c
 
 libunwind_dwarf_local_la_SOURCES = \
@@ -486,6 +488,11 @@ if OS_QNX
  libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_qnx_local)
 endif
 
+if OS_WIN32
+ libunwind_la_SOURCES_os       = $(libunwind_la_SOURCES_os_win32)
+ libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_win32_local)
+endif
+
 if ARCH_AARCH64
  lib_LTLIBRARIES += libunwind-aarch64.la
  libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64)
@@ -652,6 +659,9 @@ endif
 #
 libunwind_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -XCClinker -nostdlib \
                        $(LDFLAGS_STATIC_LIBCXA) -version-info $(SOVERSION)
+if OS_WIN32
+libunwind_la_LDFLAGS += -no-undefined
+endif
 libunwind_la_LIBADD  += -lc $(LIBCRTS)
 libunwind_la_LIBADD += $(LIBLZMA)
 
@@ -670,6 +680,7 @@ EXTRA_DIST =        $(libunwind_la_SOURCES_aarch64)         
        \
                $(libunwind_la_SOURCES_os_linux)                \
                $(libunwind_la_SOURCES_os_hpux)                 \
                $(libunwind_la_SOURCES_os_qnx)                  \
+               $(libunwind_la_SOURCES_os_win32)                \
                $(libunwind_la_SOURCES_common)                  \
                $(libunwind_la_SOURCES_local)                   \
                $(libunwind_la_SOURCES_generic)                 \
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to