From bb4e052de364d2d850a400ba68fd1ed57fbd2aa9 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Tue, 28 Jan 2020 17:18:44 +0100 Subject: [PATCH 01/15] bump libtool patches, drop old As config.sub does accept host triplets like i686-msvc16-winnt, there is no need for the automake-*-winnt and gnuconfig-winnt patches any more. Drop patches for libtool older than 2.4.6, this should be acceptable. Drop patches related to Interix, we are on Cygwin now. --- parity.patches/automake-1.10-winnt.patch | 17 - parity.patches/automake-1.4-p6-winnt.patch | 20 - parity.patches/automake-1.5-winnt.patch | 19 - parity.patches/automake-1.6.3-winnt.patch | 20 - parity.patches/automake-1.7.9-winnt.patch | 20 - parity.patches/automake-1.8.5-winnt.patch | 20 - parity.patches/automake-1.9.6-winnt.patch | 20 - parity.patches/gnuconfig-winnt.patch | 18 - ...ite.at-prefer-diff-strip-trailing-cr.patch | 81 - ...-demo.at-use-mode-execute-not-EXEEXT.patch | 52 - ...ule_cmds-preset-more-variables-used-.patch | 37 - ...nt-with-Parity-a-wrapper-around-msvc.patch | 223 --- ...tool.m4-For-MS-dumpbin-drop-CR-first.patch | 32 + ...-imports-with-GNU-ld-on-64bit-window.patch | 65 + ...valid-C-symbol-names-from-MS-dumpbi.patch} | 56 +- ...rt-symlink-targets-to-contain-blanks.patch | 51 + ...port-file_magic-with-path-to-dep.lib.patch | 192 +++ ...-find-NAME.lib-with-lNAME-eventually.patch | 87 ++ ...-import-sym-may-be-beyond-100th-line.patch | 40 + ...-with-Parity-2-a-wrapper-around-MSVC.patch | 624 ++++++++ ...ool.m4-For-MS-dumpbin-drop-CR-first.patch} | 12 +- ...-imports-with-GNU-ld-on-64bit-window.patch | 65 + ...nvalid-C-symbol-names-from-MS-dumpbi.patch | 81 + ...rt-symlink-targets-to-contain-blanks.patch | 51 + ...port-file_magic-with-path-to-dep.lib.patch | 192 +++ ...-find-NAME.lib-with-lNAME-eventually.patch | 87 ++ ...-import-sym-may-be-beyond-100th-line.patch | 40 + ...-with-Parity-2-a-wrapper-around-MSVC.patch | 624 ++++++++ parity.patches/lt-1.5.24-parity.patch | 1221 --------------- parity.patches/lt-1.5.26-parity.patch | 1176 --------------- parity.patches/lt-2.2.6a-parity.patch | 1308 ----------------- parity.patches/parity.runtimelinking.patch | 910 ------------ parity.patches/vista-cc89-nostrict.patch | 11 - 33 files changed, 2272 insertions(+), 5200 deletions(-) delete mode 100644 parity.patches/automake-1.10-winnt.patch delete mode 100644 parity.patches/automake-1.4-p6-winnt.patch delete mode 100644 parity.patches/automake-1.5-winnt.patch delete mode 100644 parity.patches/automake-1.6.3-winnt.patch delete mode 100644 parity.patches/automake-1.7.9-winnt.patch delete mode 100644 parity.patches/automake-1.8.5-winnt.patch delete mode 100644 parity.patches/automake-1.9.6-winnt.patch delete mode 100644 parity.patches/gnuconfig-winnt.patch delete mode 100644 parity.patches/libtool-2.4.6-40/0001-testsuite.at-prefer-diff-strip-trailing-cr.patch delete mode 100644 parity.patches/libtool-2.4.6-40/0004-demo.at-use-mode-execute-not-EXEEXT.patch delete mode 100644 parity.patches/libtool-2.4.6-40/0005-ltdl.m4-ltfn_module_cmds-preset-more-variables-used-.patch delete mode 100644 parity.patches/libtool-2.4.6-40/0006-support-winnt-with-Parity-a-wrapper-around-msvc.patch create mode 100644 parity.patches/libtool-2.4.6-44-gb9b44533/0001-libtool.m4-For-MS-dumpbin-drop-CR-first.patch create mode 100644 parity.patches/libtool-2.4.6-44-gb9b44533/0002-libtool-fix-data-imports-with-GNU-ld-on-64bit-window.patch rename parity.patches/{libtool-2.4.6-40/0003-libtool.m4-preload-valid-C-symbol-names-only.patch => libtool-2.4.6-44-gb9b44533/0003-libtool-ignore-invalid-C-symbol-names-from-MS-dumpbi.patch} (50%) create mode 100644 parity.patches/libtool-2.4.6-44-gb9b44533/0004-libtool-support-symlink-targets-to-contain-blanks.patch create mode 100644 parity.patches/libtool-2.4.6-44-gb9b44533/0005-libtool-support-file_magic-with-path-to-dep.lib.patch create mode 100644 parity.patches/libtool-2.4.6-44-gb9b44533/0006-libtool-find-NAME.lib-with-lNAME-eventually.patch create mode 100644 parity.patches/libtool-2.4.6-44-gb9b44533/0007-libtool-first-import-sym-may-be-beyond-100th-line.patch create mode 100644 parity.patches/libtool-2.4.6-44-gb9b44533/0008-support-winnt-with-Parity-2-a-wrapper-around-MSVC.patch rename parity.patches/{libtool-2.4.6-40/0002-libtool.m4-For-MS-dumpbin-drop-CR-first.patch => libtool-2.4.6/0001-libtool.m4-For-MS-dumpbin-drop-CR-first.patch} (83%) create mode 100644 parity.patches/libtool-2.4.6/0002-libtool-fix-data-imports-with-GNU-ld-on-64bit-window.patch create mode 100644 parity.patches/libtool-2.4.6/0003-libtool-ignore-invalid-C-symbol-names-from-MS-dumpbi.patch create mode 100644 parity.patches/libtool-2.4.6/0004-libtool-support-symlink-targets-to-contain-blanks.patch create mode 100644 parity.patches/libtool-2.4.6/0005-libtool-support-file_magic-with-path-to-dep.lib.patch create mode 100644 parity.patches/libtool-2.4.6/0006-libtool-find-NAME.lib-with-lNAME-eventually.patch create mode 100644 parity.patches/libtool-2.4.6/0007-libtool-first-import-sym-may-be-beyond-100th-line.patch create mode 100644 parity.patches/libtool-2.4.6/0008-support-winnt-with-Parity-2-a-wrapper-around-MSVC.patch delete mode 100644 parity.patches/lt-1.5.24-parity.patch delete mode 100644 parity.patches/lt-1.5.26-parity.patch delete mode 100644 parity.patches/lt-2.2.6a-parity.patch delete mode 100644 parity.patches/parity.runtimelinking.patch delete mode 100755 parity.patches/vista-cc89-nostrict.patch diff --git a/parity.patches/automake-1.10-winnt.patch b/parity.patches/automake-1.10-winnt.patch deleted file mode 100644 index ec98f90..0000000 --- a/parity.patches/automake-1.10-winnt.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -ru ./automake-1.10.orig/lib/config.guess ./automake-1.10/lib/config.guess ---- ./automake-1.10.orig/lib/config.guess 2008-02-06 11:53:40 +0100 -+++ ./automake-1.10/lib/config.guess 2008-02-06 11:54:02 +0100 -@@ -791,7 +791,13 @@ - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then - echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} diff --git a/parity.patches/automake-1.4-p6-winnt.patch b/parity.patches/automake-1.4-p6-winnt.patch deleted file mode 100644 index b67d941..0000000 --- a/parity.patches/automake-1.4-p6-winnt.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ru ./automake-1.4-p6.orig/config.guess ./automake-1.4-p6/config.guess ---- ./automake-1.4-p6.orig/config.guess 2008-02-06 11:40:47 +0100 -+++ ./automake-1.4-p6/config.guess 2008-02-06 11:49:49 +0100 -@@ -765,8 +765,14 @@ - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; -- x86:Interix*:3*) -- echo i386-pc-interix3 -+ x86:Interix*:[3456]*) -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? diff --git a/parity.patches/automake-1.5-winnt.patch b/parity.patches/automake-1.5-winnt.patch deleted file mode 100644 index 7a6b373..0000000 --- a/parity.patches/automake-1.5-winnt.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -ru ./automake-1.5.orig/lib/config.guess ./automake-1.5/lib/config.guess ---- ./automake-1.5.orig/lib/config.guess 2008-02-06 11:40:48 +0100 -+++ ./automake-1.5/lib/config.guess 2008-02-06 11:50:36 +0100 -@@ -745,6 +745,15 @@ - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; -+ x86:Interix*:[3456]*) -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi -+ exit 0;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we diff --git a/parity.patches/automake-1.6.3-winnt.patch b/parity.patches/automake-1.6.3-winnt.patch deleted file mode 100644 index 2a43e3e..0000000 --- a/parity.patches/automake-1.6.3-winnt.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ru ./automake-1.6.3.orig/lib/config.guess ./automake-1.6.3/lib/config.guess ---- ./automake-1.6.3.orig/lib/config.guess 2008-02-06 11:40:52 +0100 -+++ ./automake-1.6.3/lib/config.guess 2008-02-06 11:51:04 +0100 -@@ -765,8 +765,14 @@ - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; -- x86:Interix*:3*) -- echo i386-pc-interix3 -+ x86:Interix*:[3456]*) -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? diff --git a/parity.patches/automake-1.7.9-winnt.patch b/parity.patches/automake-1.7.9-winnt.patch deleted file mode 100644 index edd4d87..0000000 --- a/parity.patches/automake-1.7.9-winnt.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ru ./automake-1.7.9.orig/lib/config.guess ./automake-1.7.9/lib/config.guess ---- ./automake-1.7.9.orig/lib/config.guess 2008-02-06 11:40:57 +0100 -+++ ./automake-1.7.9/lib/config.guess 2008-02-06 11:51:38 +0100 -@@ -777,8 +777,14 @@ - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -+ x86:Interix*:[3456]*) -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit 0 ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks diff --git a/parity.patches/automake-1.8.5-winnt.patch b/parity.patches/automake-1.8.5-winnt.patch deleted file mode 100644 index 74a9f8f..0000000 --- a/parity.patches/automake-1.8.5-winnt.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ru ./automake-1.8.5.orig/lib/config.guess ./automake-1.8.5/lib/config.guess ---- ./automake-1.8.5.orig/lib/config.guess 2008-02-06 11:41:02 +0100 -+++ ./automake-1.8.5/lib/config.guess 2008-02-06 11:52:01 +0100 -@@ -812,8 +812,14 @@ - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -+ x86:Interix*:[3456]*) -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit 0 ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks diff --git a/parity.patches/automake-1.9.6-winnt.patch b/parity.patches/automake-1.9.6-winnt.patch deleted file mode 100644 index b2e5fea..0000000 --- a/parity.patches/automake-1.9.6-winnt.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ru ./automake-1.9.6.orig/lib/config.guess ./automake-1.9.6/lib/config.guess ---- ./automake-1.9.6.orig/lib/config.guess 2008-02-06 11:41:04 +0100 -+++ ./automake-1.9.6/lib/config.guess 2008-02-06 11:52:26 +0100 -@@ -779,8 +779,14 @@ - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -+ x86:Interix*:[3456]*) -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks diff --git a/parity.patches/gnuconfig-winnt.patch b/parity.patches/gnuconfig-winnt.patch deleted file mode 100644 index 86d9cf7..0000000 --- a/parity.patches/gnuconfig-winnt.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ru gnuconfig.orig/config.guess gnuconfig/config.guess ---- gnuconfig.orig/config.guess 2008-02-06 11:57:30 +0100 -+++ gnuconfig/config.guess 2008-02-06 11:59:05 +0100 -@@ -792,7 +792,13 @@ - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) -- echo i586-pc-interix${UNAME_RELEASE} -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit ;; - EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} diff --git a/parity.patches/libtool-2.4.6-40/0001-testsuite.at-prefer-diff-strip-trailing-cr.patch b/parity.patches/libtool-2.4.6-40/0001-testsuite.at-prefer-diff-strip-trailing-cr.patch deleted file mode 100644 index 5386ddf..0000000 --- a/parity.patches/libtool-2.4.6-40/0001-testsuite.at-prefer-diff-strip-trailing-cr.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 451b4bb15010ec11a6015877e6259f8359479c68 Mon Sep 17 00:00:00 2001 -From: Michael Haubenwallner -Date: Wed, 3 May 2017 16:32:41 +0200 -Subject: [PATCH 1/6] testsuite.at: prefer diff --strip-trailing-cr - -With respect to the usage of carriage return, output of test executables -depends on the compiler used rather than the host os. For example, -while Cygwin does not use CR but LF only, overriding CC=cl.exe suddenly -gives CR+LF, causing various tests to fail for no good reason. -Instead, use --strip-trailing-cr flag (to GNU diff) if possible. - -* tests/testsuite.at (PREPARE_TESTS): When diff supports the ---strip-trailing-cr flag, create wrapper function to add that flag and -define _fn_at_host_data_convert_line_endings function as noop. -(LT_AT_HOST_DATA): Use _fn_at_host_data_convert_line_endings function. ---- - tests/testsuite.at | 41 ++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 38 insertions(+), 3 deletions(-) - -diff --git a/tests/testsuite.at b/tests/testsuite.at -index 5dbf266c..e7d9ec63 100644 ---- a/tests/testsuite.at -+++ b/tests/testsuite.at -@@ -62,6 +62,43 @@ esac - . "$abs_top_srcdir/build-aux/funclib.sh" - . "$abs_top_srcdir/build-aux/extract-trace" - -+# Setting CC without --host may lead to use of carriage return (CR) even -+# on hosts otherwise known to not use CR, like with CC=cl on Cygwin. -+# Fortunately, GNU diff provides the --strip-trailing-cr flag, which -+# allows us to prevent tests from failing just because of CR usage: -+# If diff supports --strip-trailing-cr, wrap it to add the flag when -+# at_test='diff -u' is used, and do not convert comparison files. -+# Otherwise, add CR to AT_HOST_DATA files for mingw host as before. -+case `diff --help 2>&1`,$host_os in # ( -+*--strip-trailing-cr*,*) -+ lt_at_IFS=[$]IFS -+ IFS=: -+ for lt_at_p in [$]PATH; do -+ IFS=[$]lt_at_IFS -+ if test -x "[$]lt_at_p/diff"; then -+ eval 'diff() { -+ if test x-u = "x[$]1"; then -+ "'[$]lt_at_p'"/diff --strip-trailing-cr "[$]@" -+ else -+ "'[$]lt_at_p'"/diff "[$]@" -+ fi -+ }' -+ _fn_at_host_data_convert_line_endings() { :; } -+ break -+ fi -+ done -+ IFS=[$]lt_at_IFS -+ $as_unset lt_at_p lt_at_IFS -+ ;; -+*,mingw*) -+ _fn_at_host_data_convert_line_endings() { -+ awk '{printf ("%s\r\n", [$]0);}' < "[$]1" > "[$]1.t" && mv -f "[$]1.t" "[$]1" -+ } -+ ;; -+*) -+ _fn_at_host_data_convert_line_endings() { :; } -+ ;; -+esac - - # Unset some MAKE... variables that may cause $MAKE to act like a - # recursively invoked sub-make. Any $MAKE invocation in a test is -@@ -274,9 +311,7 @@ AT_CHECK([test -z "$leftovers"]) - # Ensure correct line ending for expected output of host executables. - m4_define([LT_AT_HOST_DATA], - [AT_DATA([$1], [$2]) --case $host_os in mingw*) -- awk '{printf ("%s\r\n", [$]0);}' < $1 > $1.t && mv -f $1.t $1 ;; --esac]) -+_fn_at_host_data_convert_line_endings $1]) - - - # LT_AT_UNIFY_NL(FILE, [RESULT-FILE]) --- -2.16.0 - diff --git a/parity.patches/libtool-2.4.6-40/0004-demo.at-use-mode-execute-not-EXEEXT.patch b/parity.patches/libtool-2.4.6-40/0004-demo.at-use-mode-execute-not-EXEEXT.patch deleted file mode 100644 index e0ed7f3..0000000 --- a/parity.patches/libtool-2.4.6-40/0004-demo.at-use-mode-execute-not-EXEEXT.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 34b3979241f20949499ee2cb2b2f6ad69409866e Mon Sep 17 00:00:00 2001 -From: Michael Haubenwallner -Date: Tue, 2 May 2017 15:56:50 +0200 -Subject: [PATCH 4/6] demo.at: use mode=execute, not EXEEXT - ---- - tests/demo.at | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tests/demo.at b/tests/demo.at -index b09b1f7d..310b592c 100644 ---- a/tests/demo.at -+++ b/tests/demo.at -@@ -357,7 +357,7 @@ prefix=`pwd`/_inst - m4_define([_LT_CHECK_EXECUTE], - [LT_AT_CHECK_EXECUTE([$1], - [./hell_static], [./hell]) --AT_CHECK([./helldl$EXEEXT | -+AT_CHECK([$LIBTOOL --mode=execute ./helldl | - $EGREP '(Welcome to .*GNU Hell|unsupported)'], 0, [ignore]) - ]) - -@@ -371,7 +371,7 @@ PATH=$prefix/lib:$PATH - - LT_AT_CHECK_EXECUTE([install], - [$prefix/bin/hell_static], [$prefix/bin/hell]) --AT_CHECK([$prefix/bin/helldl$EXEEXT | -+AT_CHECK([$LIBTOOL --mode=execute $prefix/bin/helldl | - $EGREP '(Welcome to .*GNU Hell|unsupported)'], 0, [ignore]) - ]) - -@@ -737,7 +737,7 @@ eval "`$LIBTOOL --config | $EGREP '^shlibpath_overrides_runpath='`" - eval "`$LIBTOOL --config | $EGREP '^hardcode_(action|direct|into_libs)='`" - - # Allow the binary to link on-demand if need be. --./hell$EXEEXT >/dev/null || : -+$LIBTOOL --mode=execute ./hell >/dev/null || : - - # Remove libhello.la from build tree. - rm -f libhello.la "$objdir"/libhello.* -@@ -746,7 +746,7 @@ rm -f libhello.la "$objdir"/libhello.* - # when the uninstalled libs are missing, or relinking at install time - # is necessary, and the uninstalled ./hell has only the uninstalled - # library paths hardcoded. --AT_CHECK([./hell$EXEEXT >/dev/null || test relink,yes = "$hardcode_action,$hardcode_direct"]) -+AT_CHECK([$LIBTOOL --mode=execute ./hell >/dev/null || test relink,yes = "$hardcode_action,$hardcode_direct"]) - - # Link an incomplete libhello.la. - LT_AT_MAKE([libhello.la], [libhello_la_OBJECTS=hello.lo]) --- -2.16.0 - diff --git a/parity.patches/libtool-2.4.6-40/0005-ltdl.m4-ltfn_module_cmds-preset-more-variables-used-.patch b/parity.patches/libtool-2.4.6-40/0005-ltdl.m4-ltfn_module_cmds-preset-more-variables-used-.patch deleted file mode 100644 index 89c2e8b..0000000 --- a/parity.patches/libtool-2.4.6-40/0005-ltdl.m4-ltfn_module_cmds-preset-more-variables-used-.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 4f3f3a96fc4b71a40a1cc20024e894dc4780bc69 Mon Sep 17 00:00:00 2001 -From: Michael Haubenwallner -Date: Wed, 13 Sep 2017 18:26:23 +0200 -Subject: [PATCH 5/6] ltdl.m4(ltfn_module_cmds): preset more variables used in - commands - ---- - m4/ltdl.m4 | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 -index 5a18333a..52890905 100644 ---- a/m4/ltdl.m4 -+++ b/m4/ltdl.m4 -@@ -825,13 +825,15 @@ _LT_EOF - # $module_cmds or $archive_cmds type content. - ltfn_module_cmds () - {( # subshell avoids polluting parent global environment -+ release=; major=; versuffix=; verstring=; deplibs=; os2dllname= -+ ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag= -+ libobjs=$libname.$ac_objext; rpath=/not-exists; output_objdir=. -+ eval shared_ext=\"$shrext_cmds\" -+ lib=`eval "set dummy $library_names_spec $libname$libltdl_cv_shlibext"; echo @S|@2` -+ soname=`eval "set dummy $soname_spec $libname$libltdl_cv_shlibext"; echo @S|@2` - module_cmds_save_ifs=$IFS; IFS='~' - for cmd in @S|@1; do - IFS=$module_cmds_save_ifs -- libobjs=$libname.$ac_objext; lib=$libname$libltdl_cv_shlibext -- rpath=/not-exists; soname=$libname$libltdl_cv_shlibext; output_objdir=. -- major=; versuffix=; verstring=; deplibs= -- ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag= - eval $cmd - done - IFS=$module_cmds_save_ifs --- -2.16.0 - diff --git a/parity.patches/libtool-2.4.6-40/0006-support-winnt-with-Parity-a-wrapper-around-msvc.patch b/parity.patches/libtool-2.4.6-40/0006-support-winnt-with-Parity-a-wrapper-around-msvc.patch deleted file mode 100644 index 8469a8f..0000000 --- a/parity.patches/libtool-2.4.6-40/0006-support-winnt-with-Parity-a-wrapper-around-msvc.patch +++ /dev/null @@ -1,223 +0,0 @@ -From 0a5c5fc5a00e1f839ba41d7ea47e113be606f986 Mon Sep 17 00:00:00 2001 -From: Michael Haubenwallner -Date: Tue, 2 May 2017 14:00:33 +0200 -Subject: [PATCH 6/6] support winnt with Parity, a wrapper around msvc - ---- - build-aux/ltmain.in | 4 +-- - m4/libtool.m4 | 85 ++++++++++++++++++++++++++++++++++++++++++++++++----- - m4/ltdl.m4 | 3 ++ - 3 files changed, 82 insertions(+), 10 deletions(-) - -diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in -index bbc76433..9cc9f727 100644 ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -2783,7 +2783,7 @@ extern \"C\" { - func_basename "$dlprefile" - name=$func_basename_result - case $host in -- *cygwin* | *mingw* | *cegcc* ) -+ *cygwin* | *mingw* | *cegcc* | *winnt* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" -@@ -6096,7 +6096,7 @@ func_mode_link () - fi - case $host in - # special handling for platforms with PE-DLLs. -- *cygwin* | *mingw* | *cegcc* ) -+ *cygwin* | *mingw* | *cegcc* | *winnt* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present -diff --git a/m4/libtool.m4 b/m4/libtool.m4 -index 982e82ec..9f516777 100644 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -169,6 +169,16 @@ AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([LT_PATH_LD])dnl - AC_REQUIRE([LT_PATH_NM])dnl - dnl -+# On winnt, the Microsoft compiler (or compatible) is used behind the scenes. -+# While wrappers around it may be capable of resolving symbolic links, the -+# compiler (cl.exe) chokes on header files which are symlinked, as the -+# wrapper cannot know about them. -+# Everybody would be happy with ln -s, except libtoolize without --copy. -+# There ln -s breaks the testsuite, since it tries to compile symlinked -+# source, which is not supported by the compiler. -+case $LN_S,$host_os in -+,winnt*|"ln -s",winnt*) LN_S="cp -p" ;; -+esac - AC_REQUIRE([AC_PROG_LN_S])dnl - test -z "$LN_S" && LN_S="ln -s" - _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -@@ -1741,7 +1751,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - -- interix*) -+ interix* | winnt*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; -@@ -2224,9 +2234,18 @@ if test -z "$STRIP"; then - AC_MSG_RESULT([no]) - else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then -- old_striplib="$STRIP --strip-debug" -- striplib="$STRIP --strip-unneeded" -- AC_MSG_RESULT([yes]) -+ case $host_os in -+ winnt*) -+ # Stripping is not save here, since POSIXish host utils may -+ # be detected, but we operate on native windows libraries. -+ AC_MSG_RESULT([no]) -+ ;; -+ *) -+ old_striplib="$STRIP --strip-debug" -+ striplib="$STRIP --strip-unneeded" -+ AC_MSG_RESULT([yes]) -+ ;; -+ esac - else - case $host_os in - darwin*) -@@ -2543,6 +2562,25 @@ bsdi[[45]]*) - # libtool to hard-code these into programs - ;; - -+winnt*) -+ libext=lib -+ libname_spec='$name' -+ version_type=windows -+ need_version=no -+ need_lib_prefix=no -+ shrext_cmds=.dll -+ library_names_spec='$libname$shared_ext.$libext' -+ soname_spec='$libname$release$versuffix$shared_ext' -+ hardcode_into_libs=yes -+ sys_lib_search_path_spec= -+ sys_lib_dlsearch_path_spec= -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ postinstall_cmds='$install_prog $dir/$dlname $destdir~test ! -f $dir/${dlname%.dll}.pdb || $install_prog $dir/${dlname%.dll}.pdb $destdir' -+ postuninstall_cmds='func_append rmfiles " $odir/$dlname $odir/${dlname%.dll}.pdb"' -+ dynamic_linker='Win32 link.exe with Parity extensions' -+ ;; -+ - cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll -@@ -3486,7 +3524,7 @@ cygwin*) - lt_cv_file_magic_cmd='func_win32_libid' - ;; - --mingw* | pw32*) -+mingw* | pw32* | winnt*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. -@@ -3863,7 +3901,7 @@ AC_DEFUN([LT_LIB_M], - [AC_REQUIRE([AC_CANONICAL_HOST])dnl - LIBM= - case $host in --*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) -+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin* | *-*-winnt*) - # These system don't have libm, or don't need it - ;; - *-ncr-sysv4.3*) -@@ -4322,6 +4360,11 @@ m4_if([$1], [CXX], [ - ;; - esac - ;; -+ winnt*) -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). -@@ -4686,6 +4729,12 @@ m4_if([$1], [CXX], [ - esac - ;; - -+ winnt*) -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; -+ - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -@@ -4949,6 +4998,9 @@ m4_if([$1], [CXX], [ - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds - ;; -+ winnt*) -+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' -+ ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) -@@ -5007,8 +5059,7 @@ dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in -- cygwin* | mingw* | pw32* | cegcc*) -- # FIXME: the MSVC++ port hasn't been tested in a loooong time -+ cygwin* | mingw* | pw32* | cegcc* | winnt*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then -@@ -5579,6 +5630,15 @@ _LT_EOF - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - -+ winnt*) -+ _LT_TAGVAR(hardcode_direct, $1)=no -+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $output_objdir/$soname -Wl,--out-implib,$lib' -+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ ;; -+ - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. -@@ -6655,6 +6715,15 @@ if test yes != "$_lt_caught_CXX_error"; then - esac - ;; - -+ winnt*) -+ _LT_TAGVAR(hardcode_direct, $1)=no -+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $output_objdir/$soname -Wl,--out-implib,$lib' -+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ ;; -+ - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) -diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 -index 52890905..b21ee450 100644 ---- a/m4/ltdl.m4 -+++ b/m4/ltdl.m4 -@@ -533,6 +533,9 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen], - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - libltdl_cv_sys_dlopen_deplibs=yes - ;; -+ winnt*) -+ lt_cv_sys_dlopen_deplibs=yes -+ ;; - esac - ]) - if test yes != "$lt_cv_sys_dlopen_deplibs"; then --- -2.16.0 - diff --git a/parity.patches/libtool-2.4.6-44-gb9b44533/0001-libtool.m4-For-MS-dumpbin-drop-CR-first.patch b/parity.patches/libtool-2.4.6-44-gb9b44533/0001-libtool.m4-For-MS-dumpbin-drop-CR-first.patch new file mode 100644 index 0000000..fb84a63 --- /dev/null +++ b/parity.patches/libtool-2.4.6-44-gb9b44533/0001-libtool.m4-For-MS-dumpbin-drop-CR-first.patch @@ -0,0 +1,32 @@ +From 712a79e15ec49ceddae2ee056b63baf443f4b9c9 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Thu, 11 May 2017 14:10:17 +0200 +Subject: [PATCH 1/8] libtool.m4: For MS dumpbin drop CR first. + +On Cygwin, gawk-4.1.4-3 and newer do not treat the input stream as text +any more, leaving us behind with carriage return in symbol names. +* m4/libtool.m4 (lt_cv_sys_global_symbol_pipe): In AWK script for MS +dumpbin drop CR first. +--- + m4/libtool.m4 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index f2d1f398..416ff1cc 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -4033,8 +4033,10 @@ for ac_symprfx in "" "_"; do + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++ or ICC, +- # which start with @ or ?. ++ # which start with @ or ?. And Cygwin gawk-4.1.4-3 and newer ++ # treats input as binary, have to drop carriage return first. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ ++" {sub(/\\r\$/,\"\")};"\ + " {last_section=section; section=\$ 3};"\ + " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ + " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6-44-gb9b44533/0002-libtool-fix-data-imports-with-GNU-ld-on-64bit-window.patch b/parity.patches/libtool-2.4.6-44-gb9b44533/0002-libtool-fix-data-imports-with-GNU-ld-on-64bit-window.patch new file mode 100644 index 0000000..c1c5b91 --- /dev/null +++ b/parity.patches/libtool-2.4.6-44-gb9b44533/0002-libtool-fix-data-imports-with-GNU-ld-on-64bit-window.patch @@ -0,0 +1,65 @@ +From 6fcce83a58fc7436728ee9cc904f73b635e32777 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Wed, 2 Oct 2019 12:04:17 +0200 +Subject: [PATCH 2/8] libtool: fix data imports with GNU ld on 64bit windows + +Using '_nm__' to match symbols from GNU ld to enable special data import +treatment on windows targets does rely on the leading underscore being +stripped from the __nm_ prefix rather than the subsequent symbol name. +This does fail on 64bit Windows targets, because there is no leading +underscore with symbol names any more. + +* m4/libtool.m4 (lt_cv_sys_global_symbol_pipe): Strip the leading +underscore, if any, from the symbol name that follows the optional +__imp_ or __nm_ prefix, rather than from that prefix. +* build-aux/ltmain.in (func_generate_dlsyms): Account for the global +symbol pipe leaving the __nm_ prefix intact now, but stripping the +leading underscore, if any, from the subsequent symbol name instead. +--- + build-aux/ltmain.in | 2 +- + m4/libtool.m4 | 9 +++++++-- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 96b37003..ad154fb8 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -2810,7 +2810,7 @@ extern \"C\" { + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | +- $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" ++ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/ __nm_/ /' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 416ff1cc..05bf608c 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -4026,7 +4026,12 @@ esac + for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. +- symxfrm="\\1 $ac_symprfx\\2 \\2" ++ # In Windows import libraries, symbols may be prefixed with __imp_, as well ++ # as __nm_ when using GNU ld. The leading underscore (in 32bit) comes after ++ # the __imp_ and __nm_ prefix, so make sure to strip the underscore from the ++ # symbol name instead of the __imp_ or __nm_ prefix, leaving these prefixes ++ # intact in the symbol pipe output. ++ symxfrm="\\1 \\2$ac_symprfx\\3 \\2\\3" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then +@@ -4052,7 +4057,7 @@ for ac_symprfx in "" "_"; do + " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ + " ' prfx=^$ac_symprfx]" + else +- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" ++ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\(__imp_\|__nm_\)\{0,1\}$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6-40/0003-libtool.m4-preload-valid-C-symbol-names-only.patch b/parity.patches/libtool-2.4.6-44-gb9b44533/0003-libtool-ignore-invalid-C-symbol-names-from-MS-dumpbi.patch similarity index 50% rename from parity.patches/libtool-2.4.6-40/0003-libtool.m4-preload-valid-C-symbol-names-only.patch rename to parity.patches/libtool-2.4.6-44-gb9b44533/0003-libtool-ignore-invalid-C-symbol-names-from-MS-dumpbi.patch index 49d19e9..1a3510f 100644 --- a/parity.patches/libtool-2.4.6-40/0003-libtool.m4-preload-valid-C-symbol-names-only.patch +++ b/parity.patches/libtool-2.4.6-44-gb9b44533/0003-libtool-ignore-invalid-C-symbol-names-from-MS-dumpbi.patch @@ -1,18 +1,24 @@ -From 9abea1755c0d0a04719c0c434c35e4641cbaace3 Mon Sep 17 00:00:00 2001 +From 8103602f55b7ba4ec6bf857b258b409c3800cfed Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner -Date: Tue, 16 May 2017 11:49:05 +0200 -Subject: [PATCH 3/6] libtool.m4: preload valid C symbol names only +Date: Thu, 3 Oct 2019 16:17:14 +0200 +Subject: [PATCH 3/8] libtool: ignore invalid C symbol names from MS dumpbin -* m4/libtool.m4 (global_symbol_to_import, global_symbol_to_cdecl, -global_symbol_to_c_name_address, -global_symbol_to_c_name_address_lib_prefix): List valid C symbol names -only in lt__LTX_preloaded_symbols array. +With 64bit MSVC cl.exe, and since VS 2012 even with 32bit, binary files +may contain (C)ommon symbols. Their name likely is not valid to be used +as symbol name in the C programming language, and should be ignored in +the global symbol pipe. This does fix test cases 27-29, 31-37 and 109. + +* libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): For the global symbol pipe, +accept symbol names that are valid for the C language only. And when +parsing MS dumpbin output, decorate symbols from section UNDEF but +nonzero value as (C)ommon instead of (D)ata, even if they likely are +ignored later on because of having an invalid C language symbol name. --- - m4/libtool.m4 | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) + m4/libtool.m4 | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/m4/libtool.m4 b/m4/libtool.m4 -index 7608d1a4..982e82ec 100644 +index 05bf608c..0d0280d2 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -3977,13 +3977,13 @@ esac @@ -20,17 +26,17 @@ index 7608d1a4..982e82ec 100644 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" -+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/\1/p'" ++ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" -+ lt_cdecl_hook=" -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern __declspec(dllimport) char \1;/p'" -+ lt_c_name_hook=" -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) 0},/p'" ++ lt_cdecl_hook=" -e 's/^I .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/extern __declspec(dllimport) char \1;/p'" ++ lt_c_name_hook=" -e 's/^I .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -+ -e 's/^I .* \(lib[[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) 0},/p'\ -+ -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"lib\1\", (void *) 0},/p'" ++ -e 's/^I .* \(lib[[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) 0},/p'\ ++ -e 's/^I .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= @@ -40,15 +46,15 @@ index 7608d1a4..982e82ec 100644 $lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" -+" -e 's/^T .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern int \1();/p'"\ -+" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern char \1;/p'" ++" -e 's/^T .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/extern int \1();/p'"\ ++" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" -+" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) \&\1},/p'" ++" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. @@ -57,11 +63,19 @@ index 7608d1a4..982e82ec 100644 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" -+" -e 's/^$symcode$symcode* .* \(lib[[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) \&\1},/p'"\ -+" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"lib\1\", (void *) \&\1},/p'" ++" -e 's/^$symcode$symcode* .* \(lib[[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) \&\1},/p'"\ ++" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= +@@ -4052,6 +4052,7 @@ for ac_symprfx in "" "_"; do + " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ + " {if(hide[section]) next};"\ + " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ ++" \$ 0~/ [0-9a-fA-F]*[1-9a-fA-F][0-9a-fA-F]* UNDEF /{f=\"C\"};"\ + " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ + " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ + " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -- -2.16.0 +2.22.0 diff --git a/parity.patches/libtool-2.4.6-44-gb9b44533/0004-libtool-support-symlink-targets-to-contain-blanks.patch b/parity.patches/libtool-2.4.6-44-gb9b44533/0004-libtool-support-symlink-targets-to-contain-blanks.patch new file mode 100644 index 0000000..754d3a6 --- /dev/null +++ b/parity.patches/libtool-2.4.6-44-gb9b44533/0004-libtool-support-symlink-targets-to-contain-blanks.patch @@ -0,0 +1,51 @@ +From 79e0cbfc9907d1aa3c5e66b23c49ebd0fa8f6eaa Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Tue, 26 Nov 2019 15:36:39 +0100 +Subject: [PATCH 4/8] libtool: support symlink targets to contain blanks + +Because we do not support blanks in path names in general, users may +provide symlinks without blanks, where only the symlink target may +contain blanks. As we do not really store the symlink target for later +use, it is quite easy to support symlink targets containing blanks. +This may allow the user to drop the 8dot3 filename support from Windows +based file systems. + +* build-aux/ltmain.in (func_win32_libid): Quote the file name argument. +(func_mode_link): Properly quote file names while resolving symlinks. +--- + build-aux/ltmain.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index ad154fb8..b8ff2fe4 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -3026,14 +3026,14 @@ func_win32_libid () + $debug_cmd + + win32_libid_type=unknown +- win32_fileres=`file -L $1 2>/dev/null` ++ win32_fileres=`file -L "$1" 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. +- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | ++ if eval $OBJDUMP -f \"\$1\" | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") +@@ -7418,7 +7418,7 @@ EOF + # but so what? + potlib=$potent_lib + while test -h "$potlib" 2>/dev/null; do +- potliblink=`ls -ld $potlib | $SED 's/.* -> //'` ++ potliblink=`ls -ld "$potlib" | $SED 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6-44-gb9b44533/0005-libtool-support-file_magic-with-path-to-dep.lib.patch b/parity.patches/libtool-2.4.6-44-gb9b44533/0005-libtool-support-file_magic-with-path-to-dep.lib.patch new file mode 100644 index 0000000..77d9d9a --- /dev/null +++ b/parity.patches/libtool-2.4.6-44-gb9b44533/0005-libtool-support-file_magic-with-path-to-dep.lib.patch @@ -0,0 +1,192 @@ +From eb128d54fea5f1bcf88ab239de39c766f5845513 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Wed, 6 Nov 2019 18:30:03 +0100 +Subject: [PATCH 5/8] libtool: support file_magic with /path/to/dep.lib + +Some platforms use same file name extension for both static and import +libraries, and an argument "import.lib" is valid both with or without a +path component when creating a shared library, and should not be added +to the static archive when it is an import library. + +* build-aux/ltmain.in (func_mode_link): Support deplibs_check_method +being "file_magic" for a linker argument *.$libext, searching libpath if +necessary, to detect import libs to be handled like a -lNAME argument. +--- + build-aux/ltmain.in | 118 +++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 107 insertions(+), 11 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index b8ff2fe4..73c51d06 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -4711,6 +4711,9 @@ func_mode_link () + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + ++ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" ++ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" ++ + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg=$1 +@@ -5506,9 +5509,60 @@ func_mode_link () + ;; + + *.$libext) +- # An archive. +- func_append deplibs " $arg" +- func_append old_deplibs " $arg" ++ # With MSVC cl.exe, even dynamic deplibs are added as NAME.lib, ++ # so we need to distinguish based on their file type whether we ++ # have to treat them as static archive or dynamic import lib. ++ found= ++ case $linkmode,$arg in ++ *,*[\\/]*) ++ searchdirs= ++ if test -f "$arg"; then ++ found=$arg ++ fi ++ ;; ++ lib,*) ++ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" ++ ;; ++ *) ++ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" ++ ;; ++ esac ++ for searchdir in $searchdirs; do ++ if test -f "$searchdir/$arg"; then ++ found=$searchdir/$arg ++ break ++ fi ++ done ++ case $found,$deplibs_check_method in ++ ,*) ;; # nothing found ++ *,file_magic*) ++ file_magic_regex=`set dummy $deplibs_check_method; shift ++ expr "$deplibs_check_method" : "\$1 \(.*\)"` ++ while test -h "$found" 2>/dev/null; do ++ # Follow soft links. ++ if ls -lLd "$found" 2>/dev/null | ++ $GREP " -> " >/dev/null; then ++ break # found a soft link cycle ++ fi ++ foundlink=`ls -ld "$found" | $SED 's/.* -> //'` ++ case $foundlink in ++ [\\/]* | [A-Za-z]:[\\/]*) found=$foundlink;; ++ *) found=`$ECHO "$found" | $SED 's|[^/]*$||'`"$foundlink";; ++ esac ++ done ++ if eval $file_magic_cmd \"\$found\" | ++ $SED -e 10q | ++ $EGREP "$file_magic_regex" > /dev/null; then ++ found=implib ++ fi ++ ;; ++ esac ++ if test implib = "$found"; then ++ func_append deplibs " $arg" ++ else ++ func_append deplibs " $arg" ++ func_append old_deplibs " $arg" ++ fi + continue + ;; + +@@ -5567,8 +5621,6 @@ func_mode_link () + else + shlib_search_path= + fi +- eval sys_lib_search_path=\"$sys_lib_search_path_spec\" +- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" +@@ -5875,26 +5927,69 @@ func_mode_link () + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) +- valid_a_lib=false ++ valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then +- valid_a_lib=: ++ valid_a_lib=warn + fi + ;; + pass_all) +- valid_a_lib=: ++ valid_a_lib=warn ++ ;; ++ file_magic*) ++ # Check for import lib having .$libext. ++ potlib= ++ case $deplib in ++ */* | *\\*) ++ potlib=$deplib ++ ;; ++ *) ++ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" ++ for searchdir in $searchdirs; do ++ test -e "$searchdir/$deplib" || continue ++ potlib="$searchdir/$deplib" ++ break ++ done ++ ;; ++ esac ++ while test -h "$potlib" 2>/dev/null; do ++ # Follow soft links. ++ if ls -lLd "$potlib" 2>/dev/null | ++ $GREP " -> " >/dev/null; then ++ break # found a soft link cycle ++ fi ++ potliblink=`ls -ld "$potlib" | $SED 's/.* -> //'` ++ case $potliblink in ++ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; ++ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; ++ esac ++ done ++ set dummy $deplibs_check_method; shift ++ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` ++ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | ++ $SED -e 10q | ++ $EGREP "$file_magic_regex" > /dev/null; then ++ valid_a_lib=yes ++ fi + ;; + esac +- if $valid_a_lib; then ++ case $valid_a_lib in ++ yes) ++ # handle like a shared lib with -lNAME ++ deplibs="$deplib $deplibs" ++ newdependency_libs="$deplib $newdependency_libs" ++ ;; ++ warn) + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" +- else ++ ;; ++ *) + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" +@@ -5902,7 +5997,8 @@ func_mode_link () + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." +- fi ++ ;; ++ esac + ;; + esac + continue +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6-44-gb9b44533/0006-libtool-find-NAME.lib-with-lNAME-eventually.patch b/parity.patches/libtool-2.4.6-44-gb9b44533/0006-libtool-find-NAME.lib-with-lNAME-eventually.patch new file mode 100644 index 0000000..c5c2ef3 --- /dev/null +++ b/parity.patches/libtool-2.4.6-44-gb9b44533/0006-libtool-find-NAME.lib-with-lNAME-eventually.patch @@ -0,0 +1,87 @@ +From 4fbed43077bb248cda7af30440a21198d1f87815 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Tue, 26 Nov 2019 15:05:45 +0100 +Subject: [PATCH 6/8] libtool: find NAME.lib with -lNAME eventually + +With MSVC like compilers, libname_spec may omit the lib prefix, and we +may use $libext even for the dynamic import library. When the package +manager does build the shared library only and subsequently does remove +the .la file, we won't find any library with -lNAME. + +* build-aux/ltmain.in (func_mode_link): Use $library_names_spec in +addition to the traditional file names when searching for library files +upon the -lNAME linker option. +--- + build-aux/ltmain.in | 30 ++++++++++++++++++++++++------ + 1 file changed, 24 insertions(+), 6 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 73c51d06..19257a55 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -5787,17 +5787,26 @@ func_mode_link () + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result ++ release= ++ major= ++ versuffix= ++ module_save=$module ++ module=no ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" ++ eval search_names=\"lib$name.la $library_names_spec lib$name$shared_ext lib$name.so $libname.$libext lib$name.$libext lib$name.a\" ++ module=$module_save + if test lib = "$linkmode"; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do +- for search_ext in .la $std_shrext .so .a; do ++ for search_name in $search_names; do + # Search the libtool library +- lib=$searchdir/lib$name$search_ext ++ lib=$searchdir/$search_name + if test -f "$lib"; then +- if test .la = "$search_ext"; then ++ if test "lib$name.la" = "$search_name"; then + found=: + else + found=false +@@ -7486,7 +7495,12 @@ EOF + esac + fi + if test -n "$a_deplib"; then +- libname=`eval "\\$ECHO \"$libname_spec\""` ++ module_save=$module ++ module=no ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" ++ eval search_names=\"$library_names_spec\" ++ module=$module_save + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else +@@ -7494,12 +7508,16 @@ EOF + fi + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do ++ potential_libs= ++ for search_name in $search_names; do ++ potential_libs="$potential_libs `ls $i/$search_name 2>/dev/null`" ++ done + if test yes = "$want_nocaseglob"; then + shopt -s nocaseglob +- potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ potential_libs="$potential_libs `ls $i/$libnameglob[.-]* 2>/dev/null`" + $nocaseglob + else +- potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ potential_libs="$potential_libs `ls $i/$libnameglob[.-]* 2>/dev/null`" + fi + for potent_lib in $potential_libs; do + # Follow soft links. +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6-44-gb9b44533/0007-libtool-first-import-sym-may-be-beyond-100th-line.patch b/parity.patches/libtool-2.4.6-44-gb9b44533/0007-libtool-first-import-sym-may-be-beyond-100th-line.patch new file mode 100644 index 0000000..3b641a6 --- /dev/null +++ b/parity.patches/libtool-2.4.6-44-gb9b44533/0007-libtool-first-import-sym-may-be-beyond-100th-line.patch @@ -0,0 +1,40 @@ +From 5f1a9bd2ed0e0f3a9809c5297627221182e86748 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Wed, 4 Dec 2019 14:33:51 +0100 +Subject: [PATCH 7/8] libtool: first import sym may be beyond 100th line + +When using some nm to identify an import lib along import symbols, +limiting the search to the first 100 lines is insufficient. For +example, in the MS Windows 10 SDK, for ws2_32.lib the first import +symbol is listed at line 165, and for ksuser.lib this is line 1688. + +* build-aux/ltmain.in (func_win32_libid): Drop line number limit when +using some POSIX nm to query for the first import symbol listed. +--- + build-aux/ltmain.in | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 19257a55..a0b35dd9 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -3049,12 +3049,10 @@ func_win32_libid () + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' +- 1,100{ +- / I /{ +- s|.*|import| +- p +- q +- } ++ / I /{ ++ s|.*|import| ++ p ++ q + }'` + ;; + esac +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6-44-gb9b44533/0008-support-winnt-with-Parity-2-a-wrapper-around-MSVC.patch b/parity.patches/libtool-2.4.6-44-gb9b44533/0008-support-winnt-with-Parity-2-a-wrapper-around-MSVC.patch new file mode 100644 index 0000000..43020af --- /dev/null +++ b/parity.patches/libtool-2.4.6-44-gb9b44533/0008-support-winnt-with-Parity-2-a-wrapper-around-MSVC.patch @@ -0,0 +1,624 @@ +From 20353cc5acb1d6d110f914d314a95ac7ba931321 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Tue, 2 May 2017 14:00:33 +0200 +Subject: [PATCH 8/8] support winnt with Parity-2, a wrapper around MSVC + +For a CHOST triplet matching *-*-winnt*, per MSVC tradition: +create the static library libNAME.lib, +create the dynamic library NAME{release}{version}.dll, +create the import library NAME.lib. +--- + build-aux/ltmain.in | 55 +++++++------- + libltdl/libltdl/lt_system.h | 2 +- + m4/libtool.m4 | 141 +++++++++++++++++++++++++++++++++--- + m4/ltdl.m4 | 5 +- + tests/bindir.at | 4 +- + tests/lt_dladvise.at | 2 +- + tests/testsuite.at | 4 +- + 7 files changed, 169 insertions(+), 44 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index a0b35dd9..ebd709cd 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -521,7 +521,7 @@ libtool_validate_options () + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 +- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) ++ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2* | *winnt*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; +@@ -1542,7 +1542,7 @@ func_mode_compile () + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in +- cygwin* | mingw* | pw32* | os2* | cegcc*) ++ cygwin* | mingw* | pw32* | os2* | cegcc* | winnt*) + pic_mode=default + ;; + esac +@@ -2416,7 +2416,7 @@ func_mode_install () + 'exit $?' + tstripme=$stripme + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | mingw* | pw32* | cegcc* | winnt*) + case $realname in + *.dll.a) + tstripme= +@@ -2529,7 +2529,7 @@ func_mode_install () + + # Do a test to see if this is really a libtool program. + case $host in +- *cygwin* | *mingw*) ++ *cygwin* | *mingw* | *winnt*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result +@@ -2757,7 +2757,7 @@ extern \"C\" { + $RM $export_symbols + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | winnt*) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; +@@ -2769,7 +2769,7 @@ extern \"C\" { + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | winnt*) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; +@@ -2783,7 +2783,7 @@ extern \"C\" { + func_basename "$dlprefile" + name=$func_basename_result + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | *winnt* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" +@@ -2958,7 +2958,7 @@ static const void *lt_preloaded_setup() { + # Transform the symbol file into the correct name. + symfileobj=$output_objdir/${my_outputname}S.$objext + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | winnt*) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` +@@ -3432,7 +3432,7 @@ func_exec_program_core () + " + case $host in + # Backslashes separate directories on plain windows +- *-*-mingw | *-*-os2* | *-cegcc*) ++ *-*-mingw | *-*-os2* | *-cegcc* | *-*-winnt*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 +@@ -3855,7 +3855,7 @@ main (int argc, char *argv[]) + { + EOF + case $host in +- *mingw* | *cygwin* ) ++ *mingw* | *cygwin* | *winnt*) + # make stdout use "unix" line endings + echo " setmode(1,_O_BINARY);" + ;; +@@ -3958,7 +3958,7 @@ EOF + EOF + + case $host_os in +- mingw*) ++ mingw* | winnt*) + cat <<"EOF" + { + char* p; +@@ -4000,7 +4000,7 @@ EOF + EOF + + case $host_os in +- mingw*) ++ mingw* | winnt*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + newargz = prepare_spawn (newargz); +@@ -4419,7 +4419,7 @@ lt_update_lib_path (const char *name, const char *value) + + EOF + case $host_os in +- mingw*) ++ mingw* | winnt*) + cat <<"EOF" + + /* Prepares an argument vector before calling spawn(). +@@ -4594,7 +4594,7 @@ func_mode_link () + $debug_cmd + + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc* | *-*-winnt*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # what system we are compiling for in order to pass an extra +@@ -5096,7 +5096,7 @@ func_mode_link () + ;; + esac + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc* | *-*-winnt*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; +@@ -5116,7 +5116,7 @@ func_mode_link () + -l*) + if test X-lc = "X$arg" || test X-lm = "X$arg"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku* | *-*-winnt*) + # These systems don't actually have a C or math library (as such) + continue + ;; +@@ -5199,7 +5199,7 @@ func_mode_link () + + -no-install) + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc* | *-*-winnt*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" +@@ -6199,7 +6199,7 @@ func_mode_link () + fi + case $host in + # special handling for platforms with PE-DLLs. +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | *winnt* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present +@@ -6343,7 +6343,7 @@ func_mode_link () + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in +- *cygwin* | *mingw* | *cegcc* | *os2*) ++ *cygwin* | *mingw* | *cegcc* | *os2* | *winnt*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no +@@ -6413,7 +6413,7 @@ func_mode_link () + elif test -n "$soname_spec"; then + # bleh windows + case $host in +- *cygwin* | mingw* | *cegcc* | *os2*) ++ *cygwin* | mingw* | *cegcc* | *os2* | winnt*) + func_arith $current - $age + major=$func_arith_result + versuffix=-$major +@@ -7323,7 +7323,7 @@ func_mode_link () + if test yes = "$build_libtool_libs"; then + if test -n "$rpath"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku* | *-*-winnt*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) +@@ -7846,7 +7846,7 @@ EOF + + orig_export_symbols= + case $host_os in +- cygwin* | mingw* | cegcc*) ++ cygwin* | mingw* | cegcc* | winnt*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + func_dll_def_p "$export_symbols" || { +@@ -8516,7 +8516,7 @@ EOF + esac + fi + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc* | *-*-winnt*) + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; +@@ -8594,7 +8594,7 @@ EOF + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false + ;; +- *cygwin* | *mingw* ) ++ *cygwin* | *mingw* | *winnt* ) + test yes = "$build_libtool_libs" || wrappers_required=false + ;; + *) +@@ -8748,7 +8748,7 @@ EOF + *) exeext= ;; + esac + case $host in +- *cygwin* | *mingw* ) ++ *cygwin* | *mingw* | *winnt* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result +@@ -8775,7 +8775,8 @@ EOF + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then +- $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result ++ # the running shell may be a Cygwin shell using binmode ++ $cwrapper --lt-dump-script | $SED -e "s/\\r//g" > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi +@@ -9082,7 +9083,7 @@ EOF + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in +- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) ++ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll | *winnt*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" +diff --git a/libltdl/libltdl/lt_system.h b/libltdl/libltdl/lt_system.h +index 68947ebd..a9efc933 100644 +--- a/libltdl/libltdl/lt_system.h ++++ b/libltdl/libltdl/lt_system.h +@@ -134,7 +134,7 @@ or obtained by writing to the Free Software Foundation, Inc., + # define LT_PATHSEP_CHAR ':' + #endif + +-#if defined _MSC_VER /* Visual Studio */ ++#if defined _MSC_VER && !defined(R_OK)/* Visual Studio */ + # define R_OK 4 + #endif + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 0d0280d2..c2fa2d0a 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -169,6 +169,16 @@ AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([LT_PATH_LD])dnl + AC_REQUIRE([LT_PATH_NM])dnl + dnl ++# On winnt, the Microsoft compiler (or compatible) is used behind the scenes. ++# While wrappers around it may be capable of resolving symbolic links, the ++# compiler (cl.exe) chokes on header files which are symlinked, as the ++# wrapper cannot know about them. ++# Everybody would be happy with ln -s, except libtoolize without --copy. ++# There ln -s breaks the testsuite, since it tries to compile symlinked ++# source, which is not supported by the compiler. ++case $LN_S,$host_os in ++,winnt*|"ln -s",winnt*) LN_S="cp -p" ;; ++esac + AC_REQUIRE([AC_PROG_LN_S])dnl + test -z "$LN_S" && LN_S="ln -s" + _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +@@ -1741,7 +1751,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + +- interix*) ++ interix* | winnt*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; +@@ -2224,9 +2234,18 @@ if test -z "$STRIP"; then + AC_MSG_RESULT([no]) + else + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then +- old_striplib="$STRIP --strip-debug" +- striplib="$STRIP --strip-unneeded" +- AC_MSG_RESULT([yes]) ++ case $host_os in ++ winnt*) ++ # Stripping is not save here, since POSIXish host utils may ++ # be detected, but we operate on native windows libraries. ++ AC_MSG_RESULT([no]) ++ ;; ++ *) ++ old_striplib="$STRIP --strip-debug" ++ striplib="$STRIP --strip-unneeded" ++ AC_MSG_RESULT([yes]) ++ ;; ++ esac + else + case $host_os in + darwin*) +@@ -2380,6 +2399,38 @@ BEGIN {RS = " "; FS = "/|\n";} { + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` + else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ++ case $host_os in ++ winnt*) ++ sys_lib_search_path_spec=`$CC -print-search-dirs | ++ $AWK '/^libraries:/{sub(/^libraries: *=?/,""); print}'` ++ # The space separated shell string breaks on characters like blanks and ++ # parentheses often found in Windows directory names. Fortunately, the ++ # 8.3 DOS format does not use these characters, but that might be disabled. ++ # First, convert to 8.3 DOS format to remove invalid characters eventually. ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec"` ++ # Second, converting back to unix format does preserve 8.3 path parts. ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec"` ++ # Finally, convert to the space separated list, but filter out path names ++ # with invalid characters: They were created while 8.3 DOS file name ++ # creation was disabled for that partition. ++ lt_search_path_spec=$sys_lib_search_path_spec ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS; ++ IFS=$PATH_SEPARATOR ++ for lt_path in $lt_search_path_spec ++ do ++ IFS=$lt_save_ifs ++ case $lt_path in ++ *[[' ()']]*) ++ AC_MSG_WARN([missing 8.3 path name to find libs in $lt_path]) ++ continue ++ ;; ++ esac ++ sys_lib_search_path_spec="$sys_lib_search_path_spec${sys_lib_search_path_spec:+ }$lt_path" ++ done ++ IFS=$lt_save_ifs ++ ;; ++ esac + fi]) + library_names_spec= + libname_spec='lib$name' +@@ -2543,6 +2594,39 @@ bsdi[[45]]*) + # libtool to hard-code these into programs + ;; + ++winnt*) ++ # The real dll is NAME.dll, ++ # the import lib is NAME.lib, but ++ # the static lib is libNAME.lib, which requires libname_spec=lib$name. ++ # Upon /path/to/*.lib, we use deplibs_check_method=file_magic to ++ # accept NAME.lib as import lib, but reject static libNAME.lib. ++ libext=lib ++ version_type=windows ++ need_version=no ++ need_lib_prefix=no ++ shrext_cmds=.dll ++ library_names_spec='${libname#lib}.$libext' ++ soname_spec='${libname#lib}$release$versuffix$shared_ext' ++ sys_lib_dlsearch_path_spec= ++ shlibpath_var=PATH ++ shlibpath_overrides_runpath=yes ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \$file`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname~ ++ chmod a+x \$dldir/$dlname~ ++ if test -f $dir/${dlname%.dll}.pdb; then $install_prog $dir/${dlname%.dll}.pdb \$dldir/${dlname%.dll}.pdb; fi~ ++ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then ++ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; ++ fi' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ func_append rmfiles " \$dlpath \${dlpath%.dll}.pdb"' ++ dynamic_linker='Win32 link.exe with Parity extensions' ++ ;; ++ + cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll +@@ -3486,7 +3570,7 @@ cygwin*) + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +-mingw* | pw32*) ++mingw* | pw32* | winnt*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. +@@ -3863,7 +3947,7 @@ AC_DEFUN([LT_LIB_M], + [AC_REQUIRE([AC_CANONICAL_HOST])dnl + LIBM= + case $host in +-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin* | *-*-winnt*) + # These system don't have libm, or don't need it + ;; + *-ncr-sysv4.3*) +@@ -3938,7 +4022,7 @@ case $host_os in + aix*) + symcode='[[BCDT]]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | mingw* | pw32* | cegcc* | winnt*) + symcode='[[ABCDGISTW]]' + ;; + hpux*) +@@ -3990,6 +4074,16 @@ else + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= ++ case $host_os in ++ winnt*) ++ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^D [[^ ]]* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/\1/p'" ++ lt_cdecl_hook=" -e 's/^D [[^ ]]* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/extern __declspec(dllimport) char \1;/p'" ++ lt_c_name_hook=" -e 's/^D [[^ ]]* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) 0},/p'" ++ lt_c_name_lib_hook="\ ++ -e 's/^D [[^ ]]* \(lib[[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) 0},/p'\ ++ -e 's/^D [[^ ]]* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"lib\1\", (void *) 0},/p'" ++ ;; ++ esac + fi + + # Transform an extracted symbol line into a proper C declaration. +@@ -4328,6 +4422,11 @@ m4_if([$1], [CXX], [ + ;; + esac + ;; ++ winnt*) ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ++ ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). +@@ -4692,6 +4791,12 @@ m4_if([$1], [CXX], [ + esac + ;; + ++ winnt*) ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ++ ;; ++ + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but +@@ -4955,6 +5060,9 @@ m4_if([$1], [CXX], [ + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds + ;; ++ winnt*) ++ _LT_TAGVAR(exclude_expsyms, $1)='__NULL_IMPORT_DESCRIPTOR|__IMPORT_DESCRIPTOR_.*' ++ ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl* | icl*) +@@ -5013,7 +5121,7 @@ dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | mingw* | pw32* | cegcc* | winnt*) + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. +@@ -5585,6 +5693,13 @@ _LT_EOF + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + ++ winnt*) ++ _LT_TAGVAR(exclude_expsyms, $1)='__NULL_IMPORT_DESCRIPTOR|__IMPORT_DESCRIPTOR_.*' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $output_objdir/$soname -Wl,--out-implib,$lib' ++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ ;; ++ + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. +@@ -6661,6 +6776,12 @@ if test yes != "$_lt_caught_CXX_error"; then + esac + ;; + ++ winnt*) ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $output_objdir/$soname -Wl,--out-implib,$lib' ++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ ;; ++ + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl* | ,icl* | no,icl*) +@@ -8345,12 +8466,12 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl + AC_MSG_CHECKING([how to convert $build file names to $host format]) + AC_CACHE_VAL(lt_cv_to_host_file_cmd, + [case $host in +- *-*-mingw* ) ++ *-*-mingw* | *-*-winnt* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; +- *-*-cygwin* ) ++ *-*-cygwin* | *-*-winnt* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix +diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 +index fe96546c..2bdd37b2 100644 +--- a/m4/ltdl.m4 ++++ b/m4/ltdl.m4 +@@ -533,6 +533,9 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; ++ winnt*) ++ lt_cv_sys_dlopen_deplibs=yes ++ ;; + esac + ]) + if test yes != "$lt_cv_sys_dlopen_deplibs"; then +@@ -712,7 +715,7 @@ darwin[[1567]].*) + beos*) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" + ;; +-cygwin* | mingw* | pw32*) ++cygwin* | mingw* | pw32* | winnt*) + AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include ]]) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" + ;; +diff --git a/tests/bindir.at b/tests/bindir.at +index af364c14..3c52366a 100644 +--- a/tests/bindir.at ++++ b/tests/bindir.at +@@ -65,7 +65,7 @@ AT_SETUP([bindir basic lib test]) + + bindirneeded=: + case $host_os in +- cygwin*|mingw*|cegcc*) ++ cygwin*|mingw*|cegcc*|winnt*) + ;; + *) + bindirneeded=false +@@ -174,7 +174,7 @@ AT_SETUP([bindir install tests]) + + bindirneeded=: + case $host_os in +- cygwin*|mingw*|cegcc*) ++ cygwin*|mingw*|cegcc*|winnt*) + ;; + *) + bindirneeded=false +diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at +index 5d30d20a..3bc07366 100644 +--- a/tests/lt_dladvise.at ++++ b/tests/lt_dladvise.at +@@ -332,7 +332,7 @@ have_shared=false + $LIBTOOL --features | $GREP 'enable shared libraries' >/dev/null && have_shared=: + + case $host_os,$have_shared in +-cygwin* | mingw* | cegcc* | *,false) ++cygwin* | mingw* | cegcc* | winnt* | *,false) + # These hosts do not support linking without -no-undefined + CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0" + ;; +diff --git a/tests/testsuite.at b/tests/testsuite.at +index d561c2a4..4ed74ce4 100644 +--- a/tests/testsuite.at ++++ b/tests/testsuite.at +@@ -274,7 +274,7 @@ AT_CHECK([test -z "$leftovers"]) + # Ensure correct line ending for expected output of host executables. + m4_define([LT_AT_HOST_DATA], + [AT_DATA([$1], [$2]) +-case $host_os in mingw*) ++case $host_os in mingw*|winnt*) + awk '{printf ("%s\r\n", [$]0);}' < $1 > $1.t && mv -f $1.t $1 ;; + esac]) + +@@ -285,7 +285,7 @@ esac]) + # If RESULT-FILE is given, FILE is left untouched. If not, convert in-place. + m4_define([LT_AT_UNIFY_NL], + [case $host_os in +- mingw*) ++ mingw*|winnt*) + tr -d '\015' < $1 > m4_ifval([$2], [$2], [$1.t + mv -f $1.t $1]) ;; m4_ifval([$2], [ + *) +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6-40/0002-libtool.m4-For-MS-dumpbin-drop-CR-first.patch b/parity.patches/libtool-2.4.6/0001-libtool.m4-For-MS-dumpbin-drop-CR-first.patch similarity index 83% rename from parity.patches/libtool-2.4.6-40/0002-libtool.m4-For-MS-dumpbin-drop-CR-first.patch rename to parity.patches/libtool-2.4.6/0001-libtool.m4-For-MS-dumpbin-drop-CR-first.patch index 76ba85c..a2788ab 100644 --- a/parity.patches/libtool-2.4.6-40/0002-libtool.m4-For-MS-dumpbin-drop-CR-first.patch +++ b/parity.patches/libtool-2.4.6/0001-libtool.m4-For-MS-dumpbin-drop-CR-first.patch @@ -1,10 +1,10 @@ -From 41f4c9b9074a1174e8d228a2496d61bd39f76e45 Mon Sep 17 00:00:00 2001 +From 0b5d6cb140a26cb731201da0cdf417c0c51a76c2 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Thu, 11 May 2017 14:10:17 +0200 -Subject: [PATCH 2/6] libtool.m4: For MS dumpbin drop CR first. +Subject: [PATCH 1/8] libtool.m4: For MS dumpbin drop CR first. On Cygwin, gawk-4.1.4-3 and newer do not treat the input stream as text -any more, leaving us behind with carrage return in symbol names. +any more, leaving us behind with carriage return in symbol names. * m4/libtool.m4 (lt_cv_sys_global_symbol_pipe): In AWK script for MS dumpbin drop CR first. --- @@ -12,10 +12,10 @@ dumpbin drop CR first. 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/m4/libtool.m4 b/m4/libtool.m4 -index 597c6042..7608d1a4 100644 +index a3bc337b..5802b948 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 -@@ -4033,8 +4033,10 @@ for ac_symprfx in "" "_"; do +@@ -4011,8 +4011,10 @@ for ac_symprfx in "" "_"; do # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, @@ -28,5 +28,5 @@ index 597c6042..7608d1a4 100644 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -- -2.16.0 +2.22.0 diff --git a/parity.patches/libtool-2.4.6/0002-libtool-fix-data-imports-with-GNU-ld-on-64bit-window.patch b/parity.patches/libtool-2.4.6/0002-libtool-fix-data-imports-with-GNU-ld-on-64bit-window.patch new file mode 100644 index 0000000..e076427 --- /dev/null +++ b/parity.patches/libtool-2.4.6/0002-libtool-fix-data-imports-with-GNU-ld-on-64bit-window.patch @@ -0,0 +1,65 @@ +From f579f65cf54b6c01a2aa81287290b1b00b3aa286 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Wed, 2 Oct 2019 12:04:17 +0200 +Subject: [PATCH 2/8] libtool: fix data imports with GNU ld on 64bit windows + +Using '_nm__' to match symbols from GNU ld to enable special data import +treatment on windows targets does rely on the leading underscore being +stripped from the __nm_ prefix rather than the subsequent symbol name. +This does fail on 64bit Windows targets, because there is no leading +underscore with symbol names any more. + +* m4/libtool.m4 (lt_cv_sys_global_symbol_pipe): Strip the leading +underscore, if any, from the symbol name that follows the optional +__imp_ or __nm_ prefix, rather than from that prefix. +* build-aux/ltmain.in (func_generate_dlsyms): Account for the global +symbol pipe leaving the __nm_ prefix intact now, but stripping the +leading underscore, if any, from the subsequent symbol name instead. +--- + build-aux/ltmain.in | 2 +- + m4/libtool.m4 | 9 +++++++-- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index d5cf07a6..b9617ec8 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -2795,7 +2795,7 @@ extern \"C\" { + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | +- $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" ++ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/ __nm_/ /' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 5802b948..1118d22e 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -4004,7 +4004,12 @@ esac + for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. +- symxfrm="\\1 $ac_symprfx\\2 \\2" ++ # In Windows import libraries, symbols may be prefixed with __imp_, as well ++ # as __nm_ when using GNU ld. The leading underscore (in 32bit) comes after ++ # the __imp_ and __nm_ prefix, so make sure to strip the underscore from the ++ # symbol name instead of the __imp_ or __nm_ prefix, leaving these prefixes ++ # intact in the symbol pipe output. ++ symxfrm="\\1 \\2$ac_symprfx\\3 \\2\\3" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then +@@ -4030,7 +4035,7 @@ for ac_symprfx in "" "_"; do + " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ + " ' prfx=^$ac_symprfx]" + else +- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" ++ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\(__imp_\|__nm_\)\{0,1\}$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6/0003-libtool-ignore-invalid-C-symbol-names-from-MS-dumpbi.patch b/parity.patches/libtool-2.4.6/0003-libtool-ignore-invalid-C-symbol-names-from-MS-dumpbi.patch new file mode 100644 index 0000000..ae38fb6 --- /dev/null +++ b/parity.patches/libtool-2.4.6/0003-libtool-ignore-invalid-C-symbol-names-from-MS-dumpbi.patch @@ -0,0 +1,81 @@ +From e2c0b31941f6f018cdfb3fb09db62ddea6780c67 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Thu, 3 Oct 2019 16:17:14 +0200 +Subject: [PATCH 3/8] libtool: ignore invalid C symbol names from MS dumpbin + +With 64bit MSVC cl.exe, and since VS 2012 even with 32bit, binary files +may contain (C)ommon symbols. Their name likely is not valid to be used +as symbol name in the C programming language, and should be ignored in +the global symbol pipe. This does fix test cases 27-29, 31-37 and 109. + +* libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): For the global symbol pipe, +accept symbol names that are valid for the C language only. And when +parsing MS dumpbin output, decorate symbols from section UNDEF but +nonzero value as (C)ommon instead of (D)ata, even if they likely are +ignored later on because of having an invalid C language symbol name. +--- + m4/libtool.m4 | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 1118d22e..5aa47720 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -3955,13 +3955,13 @@ esac + + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. +- lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" ++ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. +- lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" +- lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" ++ lt_cdecl_hook=" -e 's/^I .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/extern __declspec(dllimport) char \1;/p'" ++ lt_c_name_hook=" -e 's/^I .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ +- -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ +- -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" ++ -e 's/^I .* \(lib[[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) 0},/p'\ ++ -e 's/^I .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"lib\1\", (void *) 0},/p'" + else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= +@@ -3975,22 +3975,22 @@ fi + # so use this general approach. + lt_cv_sys_global_symbol_to_cdecl="sed -n"\ + $lt_cdecl_hook\ +-" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +-" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" ++" -e 's/^T .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/extern int \1();/p'"\ ++" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address + lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ + $lt_c_name_hook\ + " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +-" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" ++" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) \&\1},/p'" + + # Transform an extracted symbol line into symbol name with lib prefix and + # symbol address. + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ + $lt_c_name_lib_hook\ + " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +-" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +-" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" ++" -e 's/^$symcode$symcode* .* \(lib[[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) \&\1},/p'"\ ++" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"lib\1\", (void *) \&\1},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -4030,6 +4030,7 @@ for ac_symprfx in "" "_"; do + " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ + " {if(hide[section]) next};"\ + " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ ++" \$ 0~/ [0-9a-fA-F]*[1-9a-fA-F][0-9a-fA-F]* UNDEF /{f=\"C\"};"\ + " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ + " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ + " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6/0004-libtool-support-symlink-targets-to-contain-blanks.patch b/parity.patches/libtool-2.4.6/0004-libtool-support-symlink-targets-to-contain-blanks.patch new file mode 100644 index 0000000..21fdf1f --- /dev/null +++ b/parity.patches/libtool-2.4.6/0004-libtool-support-symlink-targets-to-contain-blanks.patch @@ -0,0 +1,51 @@ +From b7c7d85606e73be2bac552e055521fc2c6236ee0 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Tue, 26 Nov 2019 15:36:39 +0100 +Subject: [PATCH 4/8] libtool: support symlink targets to contain blanks + +Because we do not support blanks in path names in general, users may +provide symlinks without blanks, where only the symlink target may +contain blanks. As we do not really store the symlink target for later +use, it is quite easy to support symlink targets containing blanks. +This may allow the user to drop the 8dot3 filename support from Windows +based file systems. + +* build-aux/ltmain.in (func_win32_libid): Quote the file name argument. +(func_mode_link): Properly quote file names while resolving symlinks. +--- + build-aux/ltmain.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index b9617ec8..89691055 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -3011,14 +3011,14 @@ func_win32_libid () + $debug_cmd + + win32_libid_type=unknown +- win32_fileres=`file -L $1 2>/dev/null` ++ win32_fileres=`file -L "$1" 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. +- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | ++ if eval $OBJDUMP -f \"\$1\" | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") +@@ -7398,7 +7398,7 @@ EOF + # but so what? + potlib=$potent_lib + while test -h "$potlib" 2>/dev/null; do +- potliblink=`ls -ld $potlib | $SED 's/.* -> //'` ++ potliblink=`ls -ld "$potlib" | $SED 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6/0005-libtool-support-file_magic-with-path-to-dep.lib.patch b/parity.patches/libtool-2.4.6/0005-libtool-support-file_magic-with-path-to-dep.lib.patch new file mode 100644 index 0000000..64e05fa --- /dev/null +++ b/parity.patches/libtool-2.4.6/0005-libtool-support-file_magic-with-path-to-dep.lib.patch @@ -0,0 +1,192 @@ +From 635055d0a33ee60f51db7eee6f056632b6a5f373 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Wed, 6 Nov 2019 18:30:03 +0100 +Subject: [PATCH 5/8] libtool: support file_magic with /path/to/dep.lib + +Some platforms use same file name extension for both static and import +libraries, and an argument "import.lib" is valid both with or without a +path component when creating a shared library, and should not be added +to the static archive when it is an import library. + +* build-aux/ltmain.in (func_mode_link): Support deplibs_check_method +being "file_magic" for a linker argument *.$libext, searching libpath if +necessary, to detect import libs to be handled like a -lNAME argument. +--- + build-aux/ltmain.in | 118 +++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 107 insertions(+), 11 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 89691055..ac3a0411 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -4695,6 +4695,9 @@ func_mode_link () + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + ++ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" ++ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" ++ + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg=$1 +@@ -5486,9 +5489,60 @@ func_mode_link () + ;; + + *.$libext) +- # An archive. +- func_append deplibs " $arg" +- func_append old_deplibs " $arg" ++ # With MSVC cl.exe, even dynamic deplibs are added as NAME.lib, ++ # so we need to distinguish based on their file type whether we ++ # have to treat them as static archive or dynamic import lib. ++ found= ++ case $linkmode,$arg in ++ *,*[\\/]*) ++ searchdirs= ++ if test -f "$arg"; then ++ found=$arg ++ fi ++ ;; ++ lib,*) ++ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" ++ ;; ++ *) ++ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" ++ ;; ++ esac ++ for searchdir in $searchdirs; do ++ if test -f "$searchdir/$arg"; then ++ found=$searchdir/$arg ++ break ++ fi ++ done ++ case $found,$deplibs_check_method in ++ ,*) ;; # nothing found ++ *,file_magic*) ++ file_magic_regex=`set dummy $deplibs_check_method; shift ++ expr "$deplibs_check_method" : "\$1 \(.*\)"` ++ while test -h "$found" 2>/dev/null; do ++ # Follow soft links. ++ if ls -lLd "$found" 2>/dev/null | ++ $GREP " -> " >/dev/null; then ++ break # found a soft link cycle ++ fi ++ foundlink=`ls -ld "$found" | $SED 's/.* -> //'` ++ case $foundlink in ++ [\\/]* | [A-Za-z]:[\\/]*) found=$foundlink;; ++ *) found=`$ECHO "$found" | $SED 's|[^/]*$||'`"$foundlink";; ++ esac ++ done ++ if eval $file_magic_cmd \"\$found\" | ++ $SED -e 10q | ++ $EGREP "$file_magic_regex" > /dev/null; then ++ found=implib ++ fi ++ ;; ++ esac ++ if test implib = "$found"; then ++ func_append deplibs " $arg" ++ else ++ func_append deplibs " $arg" ++ func_append old_deplibs " $arg" ++ fi + continue + ;; + +@@ -5547,8 +5601,6 @@ func_mode_link () + else + shlib_search_path= + fi +- eval sys_lib_search_path=\"$sys_lib_search_path_spec\" +- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" +@@ -5855,26 +5907,69 @@ func_mode_link () + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) +- valid_a_lib=false ++ valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then +- valid_a_lib=: ++ valid_a_lib=warn + fi + ;; + pass_all) +- valid_a_lib=: ++ valid_a_lib=warn ++ ;; ++ file_magic*) ++ # Check for import lib having .$libext. ++ potlib= ++ case $deplib in ++ */* | *\\*) ++ potlib=$deplib ++ ;; ++ *) ++ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" ++ for searchdir in $searchdirs; do ++ test -e "$searchdir/$deplib" || continue ++ potlib="$searchdir/$deplib" ++ break ++ done ++ ;; ++ esac ++ while test -h "$potlib" 2>/dev/null; do ++ # Follow soft links. ++ if ls -lLd "$potlib" 2>/dev/null | ++ $GREP " -> " >/dev/null; then ++ break # found a soft link cycle ++ fi ++ potliblink=`ls -ld "$potlib" | $SED 's/.* -> //'` ++ case $potliblink in ++ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; ++ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; ++ esac ++ done ++ set dummy $deplibs_check_method; shift ++ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` ++ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | ++ $SED -e 10q | ++ $EGREP "$file_magic_regex" > /dev/null; then ++ valid_a_lib=yes ++ fi + ;; + esac +- if $valid_a_lib; then ++ case $valid_a_lib in ++ yes) ++ # handle like a shared lib with -lNAME ++ deplibs="$deplib $deplibs" ++ newdependency_libs="$deplib $newdependency_libs" ++ ;; ++ warn) + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" +- else ++ ;; ++ *) + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" +@@ -5882,7 +5977,8 @@ func_mode_link () + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." +- fi ++ ;; ++ esac + ;; + esac + continue +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6/0006-libtool-find-NAME.lib-with-lNAME-eventually.patch b/parity.patches/libtool-2.4.6/0006-libtool-find-NAME.lib-with-lNAME-eventually.patch new file mode 100644 index 0000000..e8288eb --- /dev/null +++ b/parity.patches/libtool-2.4.6/0006-libtool-find-NAME.lib-with-lNAME-eventually.patch @@ -0,0 +1,87 @@ +From 4155745e11010326aa4a211cbc45f8e5d2206367 Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Tue, 26 Nov 2019 15:05:45 +0100 +Subject: [PATCH 6/8] libtool: find NAME.lib with -lNAME eventually + +With MSVC like compilers, libname_spec may omit the lib prefix, and we +may use $libext even for the dynamic import library. When the package +manager does build the shared library only and subsequently does remove +the .la file, we won't find any library with -lNAME. + +* build-aux/ltmain.in (func_mode_link): Use $library_names_spec in +addition to the traditional file names when searching for library files +upon the -lNAME linker option. +--- + build-aux/ltmain.in | 30 ++++++++++++++++++++++++------ + 1 file changed, 24 insertions(+), 6 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index ac3a0411..6f4fdaef 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -5767,17 +5767,26 @@ func_mode_link () + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result ++ release= ++ major= ++ versuffix= ++ module_save=$module ++ module=no ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" ++ eval search_names=\"lib$name.la $library_names_spec lib$name$shared_ext lib$name.so $libname.$libext lib$name.$libext lib$name.a\" ++ module=$module_save + if test lib = "$linkmode"; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do +- for search_ext in .la $std_shrext .so .a; do ++ for search_name in $search_names; do + # Search the libtool library +- lib=$searchdir/lib$name$search_ext ++ lib=$searchdir/$search_name + if test -f "$lib"; then +- if test .la = "$search_ext"; then ++ if test "lib$name.la" = "$search_name"; then + found=: + else + found=false +@@ -7466,7 +7475,12 @@ EOF + esac + fi + if test -n "$a_deplib"; then +- libname=`eval "\\$ECHO \"$libname_spec\""` ++ module_save=$module ++ module=no ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" ++ eval search_names=\"$library_names_spec\" ++ module=$module_save + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else +@@ -7474,12 +7488,16 @@ EOF + fi + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do ++ potential_libs= ++ for search_name in $search_names; do ++ potential_libs="$potential_libs `ls $i/$search_name 2>/dev/null`" ++ done + if test yes = "$want_nocaseglob"; then + shopt -s nocaseglob +- potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ potential_libs="$potential_libs `ls $i/$libnameglob[.-]* 2>/dev/null`" + $nocaseglob + else +- potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ potential_libs="$potential_libs `ls $i/$libnameglob[.-]* 2>/dev/null`" + fi + for potent_lib in $potential_libs; do + # Follow soft links. +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6/0007-libtool-first-import-sym-may-be-beyond-100th-line.patch b/parity.patches/libtool-2.4.6/0007-libtool-first-import-sym-may-be-beyond-100th-line.patch new file mode 100644 index 0000000..437cbf7 --- /dev/null +++ b/parity.patches/libtool-2.4.6/0007-libtool-first-import-sym-may-be-beyond-100th-line.patch @@ -0,0 +1,40 @@ +From bd6d014bc91b527b3b1a8db02f2758702d7b8e6e Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Wed, 4 Dec 2019 14:33:51 +0100 +Subject: [PATCH 7/8] libtool: first import sym may be beyond 100th line + +When using some nm to identify an import lib along import symbols, +limiting the search to the first 100 lines is insufficient. For +example, in the MS Windows 10 SDK, for ws2_32.lib the first import +symbol is listed at line 165, and for ksuser.lib this is line 1688. + +* build-aux/ltmain.in (func_win32_libid): Drop line number limit when +using some POSIX nm to query for the first import symbol listed. +--- + build-aux/ltmain.in | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 6f4fdaef..e02d5ea9 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -3034,12 +3034,10 @@ func_win32_libid () + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' +- 1,100{ +- / I /{ +- s|.*|import| +- p +- q +- } ++ / I /{ ++ s|.*|import| ++ p ++ q + }'` + ;; + esac +-- +2.22.0 + diff --git a/parity.patches/libtool-2.4.6/0008-support-winnt-with-Parity-2-a-wrapper-around-MSVC.patch b/parity.patches/libtool-2.4.6/0008-support-winnt-with-Parity-2-a-wrapper-around-MSVC.patch new file mode 100644 index 0000000..157a5e9 --- /dev/null +++ b/parity.patches/libtool-2.4.6/0008-support-winnt-with-Parity-2-a-wrapper-around-MSVC.patch @@ -0,0 +1,624 @@ +From 445af14334f9ba04930101c208d91e523846d68c Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Tue, 2 May 2017 14:00:33 +0200 +Subject: [PATCH 8/8] support winnt with Parity-2, a wrapper around MSVC + +For a CHOST triplet matching *-*-winnt*, per MSVC tradition: +create the static library libNAME.lib, +create the dynamic library NAME{release}{version}.dll, +create the import library NAME.lib. +--- + build-aux/ltmain.in | 55 +++++++------- + libltdl/libltdl/lt_system.h | 2 +- + m4/libtool.m4 | 141 +++++++++++++++++++++++++++++++++--- + m4/ltdl.m4 | 5 +- + tests/bindir.at | 4 +- + tests/lt_dladvise.at | 2 +- + tests/testsuite.at | 4 +- + 7 files changed, 169 insertions(+), 44 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index e02d5ea9..8aed79c0 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -506,7 +506,7 @@ libtool_validate_options () + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 +- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) ++ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2* | *winnt*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; +@@ -1527,7 +1527,7 @@ func_mode_compile () + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in +- cygwin* | mingw* | pw32* | os2* | cegcc*) ++ cygwin* | mingw* | pw32* | os2* | cegcc* | winnt*) + pic_mode=default + ;; + esac +@@ -2401,7 +2401,7 @@ func_mode_install () + 'exit $?' + tstripme=$stripme + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | mingw* | pw32* | cegcc* | winnt*) + case $realname in + *.dll.a) + tstripme= +@@ -2514,7 +2514,7 @@ func_mode_install () + + # Do a test to see if this is really a libtool program. + case $host in +- *cygwin* | *mingw*) ++ *cygwin* | *mingw* | *winnt*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result +@@ -2742,7 +2742,7 @@ extern \"C\" { + $RM $export_symbols + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | winnt*) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; +@@ -2754,7 +2754,7 @@ extern \"C\" { + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | winnt*) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; +@@ -2768,7 +2768,7 @@ extern \"C\" { + func_basename "$dlprefile" + name=$func_basename_result + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | *winnt* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" +@@ -2943,7 +2943,7 @@ static const void *lt_preloaded_setup() { + # Transform the symbol file into the correct name. + symfileobj=$output_objdir/${my_outputname}S.$objext + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | winnt*) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` +@@ -3416,7 +3416,7 @@ func_exec_program_core () + " + case $host in + # Backslashes separate directories on plain windows +- *-*-mingw | *-*-os2* | *-cegcc*) ++ *-*-mingw | *-*-os2* | *-cegcc* | *-*-winnt*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 +@@ -3839,7 +3839,7 @@ main (int argc, char *argv[]) + { + EOF + case $host in +- *mingw* | *cygwin* ) ++ *mingw* | *cygwin* | *winnt*) + # make stdout use "unix" line endings + echo " setmode(1,_O_BINARY);" + ;; +@@ -3942,7 +3942,7 @@ EOF + EOF + + case $host_os in +- mingw*) ++ mingw* | winnt*) + cat <<"EOF" + { + char* p; +@@ -3984,7 +3984,7 @@ EOF + EOF + + case $host_os in +- mingw*) ++ mingw* | winnt*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + newargz = prepare_spawn (newargz); +@@ -4403,7 +4403,7 @@ lt_update_lib_path (const char *name, const char *value) + + EOF + case $host_os in +- mingw*) ++ mingw* | winnt*) + cat <<"EOF" + + /* Prepares an argument vector before calling spawn(). +@@ -4578,7 +4578,7 @@ func_mode_link () + $debug_cmd + + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc* | *-*-winnt*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # what system we are compiling for in order to pass an extra +@@ -5080,7 +5080,7 @@ func_mode_link () + ;; + esac + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc* | *-*-winnt*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; +@@ -5100,7 +5100,7 @@ func_mode_link () + -l*) + if test X-lc = "X$arg" || test X-lm = "X$arg"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku* | *-*-winnt*) + # These systems don't actually have a C or math library (as such) + continue + ;; +@@ -5183,7 +5183,7 @@ func_mode_link () + + -no-install) + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc* | *-*-winnt*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" +@@ -6179,7 +6179,7 @@ func_mode_link () + fi + case $host in + # special handling for platforms with PE-DLLs. +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* | *winnt* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present +@@ -6323,7 +6323,7 @@ func_mode_link () + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in +- *cygwin* | *mingw* | *cegcc* | *os2*) ++ *cygwin* | *mingw* | *cegcc* | *os2* | *winnt*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no +@@ -6393,7 +6393,7 @@ func_mode_link () + elif test -n "$soname_spec"; then + # bleh windows + case $host in +- *cygwin* | mingw* | *cegcc* | *os2*) ++ *cygwin* | mingw* | *cegcc* | *os2* | winnt*) + func_arith $current - $age + major=$func_arith_result + versuffix=-$major +@@ -7303,7 +7303,7 @@ func_mode_link () + if test yes = "$build_libtool_libs"; then + if test -n "$rpath"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku* | *-*-winnt*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) +@@ -7826,7 +7826,7 @@ EOF + + orig_export_symbols= + case $host_os in +- cygwin* | mingw* | cegcc*) ++ cygwin* | mingw* | cegcc* | winnt*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + func_dll_def_p "$export_symbols" || { +@@ -8496,7 +8496,7 @@ EOF + esac + fi + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc* | *-*-winnt*) + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; +@@ -8574,7 +8574,7 @@ EOF + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false + ;; +- *cygwin* | *mingw* ) ++ *cygwin* | *mingw* | *winnt* ) + test yes = "$build_libtool_libs" || wrappers_required=false + ;; + *) +@@ -8727,7 +8727,7 @@ EOF + *) exeext= ;; + esac + case $host in +- *cygwin* | *mingw* ) ++ *cygwin* | *mingw* | *winnt* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result +@@ -8754,7 +8754,8 @@ EOF + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then +- $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result ++ # the running shell may be a Cygwin shell using binmode ++ $cwrapper --lt-dump-script | $SED -e "s/\\r//g" > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi +@@ -9059,7 +9060,7 @@ EOF + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in +- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) ++ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll | *winnt*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" +diff --git a/libltdl/libltdl/lt_system.h b/libltdl/libltdl/lt_system.h +index a9bc7ecb..59b77570 100644 +--- a/libltdl/libltdl/lt_system.h ++++ b/libltdl/libltdl/lt_system.h +@@ -134,7 +134,7 @@ or obtained by writing to the Free Software Foundation, Inc., + # define LT_PATHSEP_CHAR ':' + #endif + +-#if defined _MSC_VER /* Visual Studio */ ++#if defined _MSC_VER && !defined(R_OK)/* Visual Studio */ + # define R_OK 4 + #endif + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 5aa47720..36329ab4 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -169,6 +169,16 @@ AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([LT_PATH_LD])dnl + AC_REQUIRE([LT_PATH_NM])dnl + dnl ++# On winnt, the Microsoft compiler (or compatible) is used behind the scenes. ++# While wrappers around it may be capable of resolving symbolic links, the ++# compiler (cl.exe) chokes on header files which are symlinked, as the ++# wrapper cannot know about them. ++# Everybody would be happy with ln -s, except libtoolize without --copy. ++# There ln -s breaks the testsuite, since it tries to compile symlinked ++# source, which is not supported by the compiler. ++case $LN_S,$host_os in ++,winnt*|"ln -s",winnt*) LN_S="cp -p" ;; ++esac + AC_REQUIRE([AC_PROG_LN_S])dnl + test -z "$LN_S" && LN_S="ln -s" + _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +@@ -1728,7 +1738,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + +- interix*) ++ interix* | winnt*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; +@@ -2208,9 +2218,18 @@ striplib= + old_striplib= + AC_MSG_CHECKING([whether stripping libraries is possible]) + if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then +- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" +- test -z "$striplib" && striplib="$STRIP --strip-unneeded" +- AC_MSG_RESULT([yes]) ++ case $host_os in ++ winnt*) ++ # Stripping is not save here, since POSIXish host utils may ++ # be detected, but we operate on native windows libraries. ++ AC_MSG_RESULT([no]) ++ ;; ++ *) ++ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ++ test -z "$striplib" && striplib="$STRIP --strip-unneeded" ++ AC_MSG_RESULT([yes]) ++ ;; ++ esac + else + # FIXME - insert some real tests, host_os isn't really good enough + case $host_os in +@@ -2358,6 +2377,38 @@ BEGIN {RS = " "; FS = "/|\n";} { + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` + else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ++ case $host_os in ++ winnt*) ++ sys_lib_search_path_spec=`$CC -print-search-dirs | ++ $AWK '/^libraries:/{sub(/^libraries: *=?/,""); print}'` ++ # The space separated shell string breaks on characters like blanks and ++ # parentheses often found in Windows directory names. Fortunately, the ++ # 8.3 DOS format does not use these characters, but that might be disabled. ++ # First, convert to 8.3 DOS format to remove invalid characters eventually. ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec"` ++ # Second, converting back to unix format does preserve 8.3 path parts. ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec"` ++ # Finally, convert to the space separated list, but filter out path names ++ # with invalid characters: They were created while 8.3 DOS file name ++ # creation was disabled for that partition. ++ lt_search_path_spec=$sys_lib_search_path_spec ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS; ++ IFS=$PATH_SEPARATOR ++ for lt_path in $lt_search_path_spec ++ do ++ IFS=$lt_save_ifs ++ case $lt_path in ++ *[[' ()']]*) ++ AC_MSG_WARN([missing 8.3 path name to find libs in $lt_path]) ++ continue ++ ;; ++ esac ++ sys_lib_search_path_spec="$sys_lib_search_path_spec${sys_lib_search_path_spec:+ }$lt_path" ++ done ++ IFS=$lt_save_ifs ++ ;; ++ esac + fi]) + library_names_spec= + libname_spec='lib$name' +@@ -2521,6 +2572,39 @@ bsdi[[45]]*) + # libtool to hard-code these into programs + ;; + ++winnt*) ++ # The real dll is NAME.dll, ++ # the import lib is NAME.lib, but ++ # the static lib is libNAME.lib, which requires libname_spec=lib$name. ++ # Upon /path/to/*.lib, we use deplibs_check_method=file_magic to ++ # accept NAME.lib as import lib, but reject static libNAME.lib. ++ libext=lib ++ version_type=windows ++ need_version=no ++ need_lib_prefix=no ++ shrext_cmds=.dll ++ library_names_spec='${libname#lib}.$libext' ++ soname_spec='${libname#lib}$release$versuffix$shared_ext' ++ sys_lib_dlsearch_path_spec= ++ shlibpath_var=PATH ++ shlibpath_overrides_runpath=yes ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \$file`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname~ ++ chmod a+x \$dldir/$dlname~ ++ if test -f $dir/${dlname%.dll}.pdb; then $install_prog $dir/${dlname%.dll}.pdb \$dldir/${dlname%.dll}.pdb; fi~ ++ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then ++ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; ++ fi' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ func_append rmfiles " \$dlpath \${dlpath%.dll}.pdb"' ++ dynamic_linker='Win32 link.exe with Parity extensions' ++ ;; ++ + cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll +@@ -3464,7 +3548,7 @@ cygwin*) + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +-mingw* | pw32*) ++mingw* | pw32* | winnt*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. +@@ -3841,7 +3925,7 @@ AC_DEFUN([LT_LIB_M], + [AC_REQUIRE([AC_CANONICAL_HOST])dnl + LIBM= + case $host in +-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin* | *-*-winnt*) + # These system don't have libm, or don't need it + ;; + *-ncr-sysv4.3*) +@@ -3916,7 +4000,7 @@ case $host_os in + aix*) + symcode='[[BCDT]]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | mingw* | pw32* | cegcc* | winnt*) + symcode='[[ABCDGISTW]]' + ;; + hpux*) +@@ -3968,6 +4052,16 @@ else + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= ++ case $host_os in ++ winnt*) ++ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^D [[^ ]]* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/\1/p'" ++ lt_cdecl_hook=" -e 's/^D [[^ ]]* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/extern __declspec(dllimport) char \1;/p'" ++ lt_c_name_hook=" -e 's/^D [[^ ]]* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) 0},/p'" ++ lt_c_name_lib_hook="\ ++ -e 's/^D [[^ ]]* \(lib[[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"\1\", (void *) 0},/p'\ ++ -e 's/^D [[^ ]]* \([[a-zA-Z_]][[0-9a-zA-Z_]]*\)$/ {\"lib\1\", (void *) 0},/p'" ++ ;; ++ esac + fi + + # Transform an extracted symbol line into a proper C declaration. +@@ -4306,6 +4400,11 @@ m4_if([$1], [CXX], [ + ;; + esac + ;; ++ winnt*) ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ++ ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). +@@ -4670,6 +4769,12 @@ m4_if([$1], [CXX], [ + esac + ;; + ++ winnt*) ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ++ ;; ++ + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but +@@ -4933,6 +5038,9 @@ m4_if([$1], [CXX], [ + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds + ;; ++ winnt*) ++ _LT_TAGVAR(exclude_expsyms, $1)='__NULL_IMPORT_DESCRIPTOR|__IMPORT_DESCRIPTOR_.*' ++ ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) +@@ -4991,7 +5099,7 @@ dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | mingw* | pw32* | cegcc* | winnt*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -5562,6 +5670,13 @@ _LT_EOF + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + ++ winnt*) ++ _LT_TAGVAR(exclude_expsyms, $1)='__NULL_IMPORT_DESCRIPTOR|__IMPORT_DESCRIPTOR_.*' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $output_objdir/$soname -Wl,--out-implib,$lib' ++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ ;; ++ + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -6637,6 +6752,12 @@ if test yes != "$_lt_caught_CXX_error"; then + esac + ;; + ++ winnt*) ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $output_objdir/$soname -Wl,--out-implib,$lib' ++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ ;; ++ + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) +@@ -8320,12 +8441,12 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl + AC_MSG_CHECKING([how to convert $build file names to $host format]) + AC_CACHE_VAL(lt_cv_to_host_file_cmd, + [case $host in +- *-*-mingw* ) ++ *-*-mingw* | *-*-winnt* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; +- *-*-cygwin* ) ++ *-*-cygwin* | *-*-winnt* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix +diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 +index bde587a1..4798bf30 100644 +--- a/m4/ltdl.m4 ++++ b/m4/ltdl.m4 +@@ -533,6 +533,9 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; ++ winnt*) ++ lt_cv_sys_dlopen_deplibs=yes ++ ;; + esac + ]) + if test yes != "$lt_cv_sys_dlopen_deplibs"; then +@@ -712,7 +715,7 @@ darwin[[1567]].*) + beos*) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" + ;; +-cygwin* | mingw* | pw32*) ++cygwin* | mingw* | pw32* | winnt*) + AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include ]]) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" + ;; +diff --git a/tests/bindir.at b/tests/bindir.at +index 7e4b6e91..5f8ea2ea 100644 +--- a/tests/bindir.at ++++ b/tests/bindir.at +@@ -65,7 +65,7 @@ AT_SETUP([bindir basic lib test]) + + bindirneeded=: + case $host_os in +- cygwin*|mingw*|cegcc*) ++ cygwin*|mingw*|cegcc*|winnt*) + ;; + *) + bindirneeded=false +@@ -174,7 +174,7 @@ AT_SETUP([bindir install tests]) + + bindirneeded=: + case $host_os in +- cygwin*|mingw*|cegcc*) ++ cygwin*|mingw*|cegcc*|winnt*) + ;; + *) + bindirneeded=false +diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at +index 02e665cf..8f4ad24c 100644 +--- a/tests/lt_dladvise.at ++++ b/tests/lt_dladvise.at +@@ -332,7 +332,7 @@ have_shared=false + $LIBTOOL --features | $GREP 'enable shared libraries' >/dev/null && have_shared=: + + case $host_os,$have_shared in +-cygwin* | mingw* | cegcc* | *,false) ++cygwin* | mingw* | cegcc* | winnt* | *,false) + # These hosts do not support linking without -no-undefined + CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0" + ;; +diff --git a/tests/testsuite.at b/tests/testsuite.at +index 04e41bd7..be27582f 100644 +--- a/tests/testsuite.at ++++ b/tests/testsuite.at +@@ -274,7 +274,7 @@ AT_CHECK([test -z "$leftovers"]) + # Ensure correct line ending for expected output of host executables. + m4_define([LT_AT_HOST_DATA], + [AT_DATA([$1], [$2]) +-case $host_os in mingw*) ++case $host_os in mingw*|winnt*) + awk '{printf ("%s\r\n", [$]0);}' < $1 > $1.t && mv -f $1.t $1 ;; + esac]) + +@@ -285,7 +285,7 @@ esac]) + # If RESULT-FILE is given, FILE is left untouched. If not, convert in-place. + m4_define([LT_AT_UNIFY_NL], + [case $host_os in +- mingw*) ++ mingw*|winnt*) + tr -d '\015' < $1 > m4_ifval([$2], [$2], [$1.t + mv -f $1.t $1]) ;; m4_ifval([$2], [ + *) +-- +2.22.0 + diff --git a/parity.patches/lt-1.5.24-parity.patch b/parity.patches/lt-1.5.24-parity.patch deleted file mode 100644 index 2c83317..0000000 --- a/parity.patches/lt-1.5.24-parity.patch +++ /dev/null @@ -1,1221 +0,0 @@ -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/config.guess libtool-1.5.24/config.guess ---- libtool-1.5.24.orig/config.guess Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/config.guess Wed Jan 23 14:03:12 2008 -@@ -794,7 +794,13 @@ - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) -- echo i586-pc-interix${UNAME_RELEASE} -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/demo/foo.c libtool-1.5.24/demo/foo.c ---- libtool-1.5.24.orig/demo/foo.c Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/demo/foo.c Wed Jan 23 12:02:16 2008 -@@ -18,6 +18,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define FOO_EXPORTS -+ - #include "foo.h" - - #include -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/demo/foo.h libtool-1.5.24/demo/foo.h ---- libtool-1.5.24.orig/demo/foo.h Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/demo/foo.h Wed Jan 23 13:28:21 2008 -@@ -58,6 +58,15 @@ - # define lt_ptr_t char* - #endif - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(FOO_EXPORTS) -+# define FOO_IMPORT __declspec(dllimport) -+#else -+# define FOO_IMPORT -+#endif -+ - /* Silly constants that the functions return. */ - #define HELLO_RET 0xe110 - #define FOO_RET 0xf00 -@@ -67,7 +76,7 @@ - __BEGIN_DECLS - int foo LT_PARAMS((void)); - int hello LT_PARAMS((void)); --extern int nothing; -+extern FOO_IMPORT int nothing; - __END_DECLS - - #endif /* !_FOO_H_ */ -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/depdemo/l1/l1.c libtool-1.5.24/depdemo/l1/l1.c ---- libtool-1.5.24.orig/depdemo/l1/l1.c Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/depdemo/l1/l1.c Wed Jan 23 12:02:16 2008 -@@ -17,6 +17,12 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+ -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L1_EXPORTS -+ - #include "l1/l1.h" - #include - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/depdemo/l1/l1.h libtool-1.5.24/depdemo/l1/l1.h ---- libtool-1.5.24.orig/depdemo/l1/l1.h Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/depdemo/l1/l1.h Wed Jan 23 13:28:55 2008 -@@ -23,8 +23,17 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L1_EXPORTS) -+# define L1_IMPORT __declspec(dllimport) -+#else -+# define L1_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l1; -+extern L1_IMPORT int var_l1; - int func_l1 __P((int)); - __END_DECLS - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/depdemo/l2/l2.c libtool-1.5.24/depdemo/l2/l2.c ---- libtool-1.5.24.orig/depdemo/l2/l2.c Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/depdemo/l2/l2.c Wed Jan 23 12:02:16 2008 -@@ -17,6 +17,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L2_EXPORTS -+ - #include "l2/l2.h" - - #include "l1/l1.h" -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/depdemo/l2/l2.h libtool-1.5.24/depdemo/l2/l2.h ---- libtool-1.5.24.orig/depdemo/l2/l2.h Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/depdemo/l2/l2.h Wed Jan 23 13:29:36 2008 -@@ -23,8 +23,19 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L2_EXPORTS) -+# define L2_IMPORT __declspec(dllimport) -+#else -+# define L2_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l2; -+ -+__BEGIN_DECLS -+extern L2_IMPORT int var_l2; - int func_l2 __P((int)); - __END_DECLS - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/depdemo/l3/l3.c libtool-1.5.24/depdemo/l3/l3.c ---- libtool-1.5.24.orig/depdemo/l3/l3.c Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/depdemo/l3/l3.c Wed Jan 23 12:02:16 2008 -@@ -17,6 +17,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L3_EXPORTS -+ - #include "l3/l3.h" - - #include "l1/l1.h" -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/depdemo/l3/l3.h libtool-1.5.24/depdemo/l3/l3.h ---- libtool-1.5.24.orig/depdemo/l3/l3.h Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/depdemo/l3/l3.h Wed Jan 23 13:30:05 2008 -@@ -23,8 +23,19 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L3_EXPORTS) -+# define L3_IMPORT __declspec(dllimport) -+#else -+# define L3_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l3; -+ -+__BEGIN_DECLS -+extern L3_IMPORT int var_l3; - int func_l3 __P((int)); - __END_DECLS - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/depdemo/l4/l4.c libtool-1.5.24/depdemo/l4/l4.c ---- libtool-1.5.24.orig/depdemo/l4/l4.c Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/depdemo/l4/l4.c Wed Jan 23 12:02:16 2008 -@@ -17,6 +17,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L4_EXPORTS -+ - #include "l4/l4.h" - - #include "l3/l3.h" -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/depdemo/l4/l4.h libtool-1.5.24/depdemo/l4/l4.h ---- libtool-1.5.24.orig/depdemo/l4/l4.h Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/depdemo/l4/l4.h Wed Jan 23 13:30:26 2008 -@@ -23,8 +23,19 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L4_EXPORTS) -+# define L4_IMPORT __declspec(dllimport) -+#else -+# define L4_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l4; -+ -+__BEGIN_DECLS -+extern L4_IMPORT int var_l4; - int func_l4 __P((int)); - __END_DECLS - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/libltdl/config.guess libtool-1.5.24/libltdl/config.guess ---- libtool-1.5.24.orig/libltdl/config.guess Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/libltdl/config.guess Wed Jan 23 14:03:26 2008 -@@ -794,7 +794,13 @@ - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) -- echo i586-pc-interix${UNAME_RELEASE} -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/libltdl/ltdl.c libtool-1.5.24/libltdl/ltdl.c ---- libtool-1.5.24.orig/libltdl/ltdl.c Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/libltdl/ltdl.c Wed Jan 23 12:02:16 2008 -@@ -247,7 +247,7 @@ - #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) - #define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) - #define LT_DLFREE(p) \ -- LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END -+ LT_STMT_START { if (p) (p) = (lt_dlfree (p), NULL); } LT_STMT_END - - #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) - #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) -@@ -1368,8 +1368,16 @@ - cygwin_conv_to_full_win32_path (searchname, wpath); - module = LoadLibrary (wpath); - } -+#elif defined(__PARITY__) -+ { -+ /* parity brings it's loader which contains a function -+ to convert paths to native windows ones. this uses -+ a ring buffer, so we need not free things. */ -+ extern const char* LoaderConvertPathToNative(const char*); -+ module = (lt_module)LoadLibrary(LoaderConvertPathToNative(searchname)); -+ } - #else -- module = LoadLibrary (searchname); -+ module = (lt_module)LoadLibrary (searchname); - #endif - - /* Restore the error mode. */ -@@ -1421,7 +1429,7 @@ - { - int errors = 0; - -- if (FreeLibrary(module) == 0) -+ if (FreeLibrary((HMODULE)module) == 0) - { - LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); - ++errors; -@@ -1436,7 +1444,7 @@ - lt_module module; - const char *symbol; - { -- lt_ptr address = GetProcAddress (module, symbol); -+ lt_ptr address = (lt_ptr)GetProcAddress ((HMODULE)module, symbol); - - if (!address) - { -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/libltdl/ltdl.h libtool-1.5.24/libltdl/ltdl.h ---- libtool-1.5.24.orig/libltdl/ltdl.h Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/libltdl/ltdl.h Wed Jan 23 12:02:16 2008 -@@ -142,7 +142,7 @@ - #endif - - --#if defined(_MSC_VER) /* Visual Studio */ -+#if defined(_MSC_VER) && !defined(R_OK) /* Visual Studio */ - # define R_OK 4 - #endif - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/libtool.m4 libtool-1.5.24/libtool.m4 ---- libtool-1.5.24.orig/libtool.m4 Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/libtool.m4 Wed Jan 23 14:13:12 2008 -@@ -769,6 +769,12 @@ - lt_cv_sys_max_cmd_len=196608 - ;; - -+ winnt*) -+ # This can be any system underneath (interix or cygwin). For now handle -+ # this the same as on interix. -+ lt_cv_sys_max_cmd_len=196608 -+ ;; -+ - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not -@@ -1083,7 +1089,11 @@ - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. -- rmdir conftest -+ # -+ # use rm -rf rather than rmdir, since some compilers (for example -+ # nearly all compilers on interix) produce files nobody knows of -+ # -+ rm -rf conftest - $rm conftest* - ]) - ])# AC_LIBTOOL_PROG_CC_C_O -@@ -1561,6 +1571,89 @@ - hardcode_into_libs=yes - ;; - -+winnt*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ -+ # -+ # the library name should not contain any minor version -+ # numbers, since this would be too strict. Windows has -+ # the library name hardcoded always, so it won't listen -+ # to -soname's. -+ # -+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -+ -+ # -+ # the real soname and dlname (which is set to soname) -+ # contains the .dll extension that parity adds. -+ # -+ soname_spec='${libname}${release}${shared_ext}$major.dll' -+ dynamic_linker='parity' -+ sys_lib_search_path_spec= -+ sys_lib_dlsearch_path_spec= -+ -+ # -+ # Calculate the system library directories, by asking -+ # parity's configuration for it. -+ # WARNING: does not work correctly with paths with spaces. -+ # WARNING: this really *ugly* contruct, is because $() is -+ # not understood by other shells... -+ # -+ save_IFS=$IFS -+ IFS=$PATH_SEPARATOR -+ parity_conf= -+ -+ set dummy $PATH -+ shift -+ -+ IFS=$save_IFS -+ -+ for p in "$[@]"; do -+ if test -x "$p/$LD" && test -f "$p/../etc/parity.conf"; then -+ parity_conf="$p/../etc/parity.conf" -+ break -+ fi -+ done -+ -+ library_paths=`grep -e ".*LibraryPaths.*=" $parity_conf | sed -e "s,.*LibraryPaths.*=[[ \t]]*\(.*\)\$,\1,g"` -+ sys_lib_search_path_spec=`echo $library_paths` -+ -+ # -+ # we assume that parity's loader feature is enabled. this -+ # enables us to use LD_LIBRARY_PATH, LD_RUN_PATH and -rpath -+ # -+ runpath_var=LD_RUN_PATH -+ shlibpath_overrides_runpath=yes -+ -+ # -+ # we need seperate postinstall and postuninstall commands -+ # to carry .dll and .pdb files with us. -+ # -+ # WARNING: the commands below (especially the ${x%..} variable -+ # syntax) work perfectly on ksh (/bin/sh) and bash on interix. -+ # Other shells have not been tested and may need some porting. -+ # -+ postinstall_cmds=' -+ $install_prog $dir/$dlname $destdir/$dlname~ -+ test ! -f $dir/${dlname%.dll}.pdb || $install_prog $dir/${dlname%.dll}.pdb $destdir/${dlname%.dll}.pdb~ -+ chmod 755 $destdir/$dlname~ -+ test ! -f $destdir/${dlname%.dll}.pdb || chmod 644 $destdir/${dlname%.dll}.pdb' -+ -+ postuninstall_cmds=' -+ dll=`$SHELL 2>&1 -c '\''. $file; -+ echo \${dlname}'\''`~ -+ pdb=\${dll%.dll}.pdb~ -+ $rm $dir/\$dll~ -+ $rm $dir/\$pdb' -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; -@@ -2392,6 +2485,16 @@ - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -+winnt*) -+ # -+ # there is no suitable file_magic, and match_patter somehow -+ # does not seem to work in all cases, namely if native windows -+ # libraries are involved in linking, which - of course - don't -+ # match the normal naming scheme. -+ # -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; -@@ -2542,7 +2645,7 @@ - [AC_REQUIRE([AC_CANONICAL_HOST])dnl - LIBM= - case $host in --*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) -+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin* | *-winnt*) - # These system don't have libm, or don't need it - ;; - *-ncr-sysv4.3*) -@@ -3294,6 +3397,13 @@ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; -+ winnt*) -+ _LT_AC_TAGVAR(hardcode_direct, $1)=no -+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' -+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -+ ;; - irix5* | irix6*) - case $cc_basename in - CC*) -@@ -3947,6 +4057,17 @@ - _LT_AC_TAGVAR(postdeps,$1)= - ;; - -+winnt*) -+ # -+ # parity does not have verbose output like gcc/g++ have, so -+ # most likely the above will result in nothing. But in worst case -+ # libtool may find something it thinks is a library, so reset things. -+ # -+ _LT_AC_TAGVAR(predep_objects,$1)= -+ _LT_AC_TAGVAR(postdep_objects,$1)= -+ _LT_AC_TAGVAR(postdeps,$1)= -+ ;; -+ - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) -@@ -4457,7 +4578,7 @@ - shrext_cmds='$shrext_cmds' - - # Executable file suffix (normally ""). --exeext="$exeext" -+exeext="$ac_exeext" - - # Additional compiler flags for building library objects. - pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -@@ -4793,6 +4914,22 @@ - sysv4) - symcode='[[DFNSTU]]' - ;; -+winnt*) -+ # -+ # parity knows how to handle dllimport declspecs when there is no -+ # shared library in play. -+ # -+ lt_cv_sys_global_symbol_to_cdecl="awk '{ print \"extern __declspec\(dllimport\) int \" \$][3 \";\" }'" -+ -+ # -+ # WARNING: since parity may use the Microsoft compiler as backend -+ # symbol names could be mangled in MS style, which means, they are -+ # not valid C identifiers, so we *cannot* generate C code that -+ # tries to do something with those C++ variables, because it won't -+ # compile! -+ # This could be done in assembly which would solve this problem. -+ # -+ ;; - esac - - # Handle CRLF in mingw tool chain -@@ -4888,6 +5025,18 @@ - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" -+ -+ # -+ # parity needs -xc++ to force the file in c++ mode. this is -+ # because of variables beeing initialized with non-constant -+ # values (variables from shared libraries) -+ # -+ case "$host" in -+ *-winnt*) -+ CFLAGS="${CFLAGS} -xc++" -+ ;; -+ esac -+ - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -@@ -5072,6 +5221,19 @@ - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; -+ -+ winnt*) -+ # -+ # -fPIC and -fpic have the same effect for parity: none -+ # this means it's of no danger to pass it in, since parity -+ # simply ignores it, still we save some command line parsing -+ # time, when not passing it :) -+ # -+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='' -+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) -@@ -5441,6 +5603,17 @@ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - -+ winnt*) -+ # -+ # -fPIC and -fpic have the same effect for parity: none -+ # this means it's of no danger to pass it in, since parity -+ # simply ignores it. -+ # -+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; -+ - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; -@@ -5565,6 +5738,12 @@ - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; -+ winnt*) -+ # -+ # parity linker or compiler. this means that we are not gnu ld. -+ # -+ with_gnu_ld=no -+ ;; - openbsd*) - with_gnu_ld=no - ;; -@@ -6194,6 +6373,14 @@ - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi -+ ;; -+ -+ winnt*) -+ _LT_AC_TAGVAR(hardcode_direct, $1)=no -+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' -+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - os2*) -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/ltmain.in libtool-1.5.24/ltmain.in ---- libtool-1.5.24.orig/ltmain.in Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/ltmain.in Wed Jan 23 12:02:16 2008 -@@ -1591,7 +1591,7 @@ - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in -- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-*-winnt*) - # These systems don't actually have a C or math library (as such) - continue - ;; -@@ -3892,7 +3892,13 @@ - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" -+ -+ # if shlibpath_var overrides the runpath, we can save the time -+ # of relinking, so omit the uninstalled rpath. -+ if test "$shlibpath_overrides_runpath" != yes; then - test "$mode" != relink && rpath="$compile_rpath$rpath" -+ fi -+ - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then -@@ -4071,7 +4077,7 @@ - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : -- else -+ elif { case $host in *-*-winnt*) false;; *) true;; esac ; }; then - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - -@@ -4667,7 +4673,7 @@ - " - - case $host in -- *cygwin* | *mingw* ) -+ *cygwin* | *mingw* | *winnt*) - $echo >> "$output_objdir/$dlsyms" "\ - /* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation -@@ -4729,9 +4735,20 @@ - esac - esac - -+ # -+ # if parity is used as compiler, we need to use -xc++ to force -+ # the C file into C++ to be able to use non-const initializers -+ # for variables (other variables from shared libraries for example) -+ # -+ case "$CC" in -+ *parity*) -+ PARITY_CFLAGS="-xc++" -+ ;; -+ esac -+ - # Now compile the dynamic symbol file. -- $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -- $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? -+ $show "(cd $output_objdir && $LTCC $PARITY_CFLAGS $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -+ $run eval '(cd $output_objdir && $LTCC $PARITY_CFLAGS $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" -@@ -4911,11 +4928,19 @@ - - # Only actually do things if our run command is non-null. - if test -z "$run"; then -+ # test for cygwin and/or mingw, since on interix, we still want the -+ # .exe so that the makefiles aren't confused (the makefile target -+ # still is progname$(EXEEXT), so it will always link if we remove -+ # the .exe here). -+ case $host in -+ *cygwin* | *mingw* ) - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac -+ ;; -+ esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) -@@ -5645,7 +5670,10 @@ - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` -- if test "$hardcode_automatic" = yes ; then -+ -+ # if shlibpath_var overrides the runpath we can save the time -+ # of relinking, so clear relink_command -+ if test "$hardcode_automatic" = yes || test "$shlibpath_overrides_runpath" = yes ; then - relink_command= - fi - -@@ -6124,6 +6152,12 @@ - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" -+ -+ # we do a test for the host here, since interix (which runs on windows -+ # too) doesn't have all that .exe hack-around. So we want what we -+ # are told to output in every case (also with the wrapper) -+ case $host in -+ *cygwin*|*mingw*) - case $file in - *.exe) - if test ! -f "$file"; then -@@ -6132,6 +6166,8 @@ - fi - ;; - esac -+ ;; -+ esac - - # Do a test to see if this is really a libtool program. - case $host in -@@ -6644,6 +6680,11 @@ - *) - if test "$mode" = clean ; then - noexename=$name -+ # we do a test for the host here, since interix (which runs on windows -+ # too) doesn't have all that .exe hack-around. So we want what we -+ # are told to output in every case (also with the wrapper) -+ case $host in -+ *cygwin*|*mingw*) - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` -@@ -6653,6 +6694,8 @@ - rmfiles="$rmfiles $file" - ;; - esac -+ ;; -+ esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/mdemo/foo1.c libtool-1.5.24/mdemo/foo1.c ---- libtool-1.5.24.orig/mdemo/foo1.c Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/mdemo/foo1.c Wed Jan 23 12:02:16 2008 -@@ -30,7 +30,11 @@ - #define hello foo1_LTX_hello - - /* Give a global variable definition. */ --int nothing; -+ -+/* When working on Windows (with or without parity) the variable needs -+ * to be initialized here (or used elsewhere in the file) to be -+ * defined in the object, otherwise its "UNDEF" */ -+int nothing = 0; - - /* private function */ - int -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/mdemo/foo2.c libtool-1.5.24/mdemo/foo2.c ---- libtool-1.5.24.orig/mdemo/foo2.c Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/mdemo/foo2.c Wed Jan 23 12:02:16 2008 -@@ -30,7 +30,11 @@ - #define hello libfoo2_LTX_hello - - /* Give a global variable definition. */ --int nothing; -+ -+/* When working on Windows (with or without parity) the variable needs -+ * to be initialized here (or used elsewhere in the file) to be -+ * defined in the object, otherwise its "UNDEF" */ -+int nothing = 0; - - /* private function */ - int -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/pdemo/foo.h libtool-1.5.24/pdemo/foo.h ---- libtool-1.5.24.orig/pdemo/foo.h Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/pdemo/foo.h Wed Jan 23 13:31:04 2008 -@@ -75,6 +75,17 @@ - # define EXTERN extern - #endif - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(FOO_EXPORTS) -+# define FOO_IMPORT __declspec(dllimport) -+#else -+# define FOO_IMPORT -+#endif -+ -+/* Silly constants that the functions return. */ -+ - /* Silly constants that the functions return. */ - #define HELLO_RET 0xe110 - #define FOO_RET 0xf00 -@@ -84,7 +95,7 @@ - __BEGIN_DECLS - int foo LT_PARAMS((void)); - int hello LT_PARAMS((void)); --EXTERN int nothing; -+EXTERN FOO_IMPORT int nothing; - __END_DECLS - - #endif /* !_FOO_H_ */ -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/pdemo/longer_file_name_foo.c libtool-1.5.24/pdemo/longer_file_name_foo.c ---- libtool-1.5.24.orig/pdemo/longer_file_name_foo.c Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/pdemo/longer_file_name_foo.c Wed Jan 23 12:02:16 2008 -@@ -18,6 +18,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define FOO_EXPORTS -+ - #define _LIBFOO_COMPILATION_ - #include "foo.h" - #undef _LIBFOO_COMPILATION_ -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tagdemo/foo.cpp libtool-1.5.24/tagdemo/foo.cpp ---- libtool-1.5.24.orig/tagdemo/foo.cpp Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tagdemo/foo.cpp Wed Jan 23 12:02:16 2008 -@@ -20,7 +20,14 @@ - // USA. - - #include "foo.h" --#include -+ -+#ifdef __PARITY__ -+/* On Windows there is only iostream, and no iostream.h */ -+# include -+using namespace std; -+#else -+# include -+#endif - - #ifdef HAVE_MATH_H - #include -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tagdemo/main.cpp libtool-1.5.24/tagdemo/main.cpp ---- libtool-1.5.24.orig/tagdemo/main.cpp Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tagdemo/main.cpp Wed Jan 23 12:02:16 2008 -@@ -22,8 +22,14 @@ - - #include "foo.h" - #include "baz.h" --#include - -+#ifdef __PARITY__ -+/* On Windows there is only iostream, and no iostream.h */ -+# include -+using namespace std; -+#else -+# include -+#endif - - int - main (int, char *[]) -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/build-relink.test libtool-1.5.24/tests/build-relink.test ---- libtool-1.5.24.orig/tests/build-relink.test Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tests/build-relink.test Wed Jan 23 13:20:33 2008 -@@ -65,13 +65,13 @@ - exit 1 - fi - --./hell # so that it links on-demand if needed -+./hell$EXEEXT # so that it links on-demand if needed - - echo "removing libhello.la from ../demo" - rm -f libhello.la $objdir/libhello.* - - echo "running ../demo/hell" --if ./hell; then -+if ./hell$EXEEXT; then - : - elif test "x,$hardcode_action,$hardcode_direct" = x,relink,yes; then - echo "Ok, uninstalled programs fail after uninstalled libraries are removed" -@@ -91,7 +91,7 @@ - rm -f libhello.la - - echo "running ../demo/hell with broken libhello.la" --if (./hell) 2>&1; then -+if (./hell$EXEEXT) 2>&1; then - echo "= Exiting: ../demo/hell runs even though libhello.la is incomplete" - echo "shlibpath_overrides_runpath should be set to no" - exit 1 -@@ -108,7 +108,7 @@ - rm -f $objdir/lt-hell$EXEEXT || exit 1 - cp $objdir/hell$EXEEXT $objdir/lt-hell$EXEEXT || exit 1 - echo "running ../demo/hell with installed libhello.la" -- if ./hell; then -+ if ./hell$EXEEXT; then - echo "Worked, as expected" - else - echo "shlibpath_overrides_runpath should be set to yes" -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/build-relink2.test libtool-1.5.24/tests/build-relink2.test ---- libtool-1.5.24.orig/tests/build-relink2.test Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tests/build-relink2.test Wed Jan 23 13:21:26 2008 -@@ -66,13 +66,13 @@ - exit 1 - fi - --./depdemo # so that it links on-demand if needed -+./depdemo$EXEEXT # so that it links on-demand if needed - - echo "removing libl3.la from ../depdemo/l3" - rm -rf l3/libl3.la l3/$objdir - - echo "running ../depdemo/depdemo" --if ./depdemo || -+if ./depdemo$EXEEXT || - # On AIX 4.1, when the installed copy of libl3 is loaded, it brings - # with it the installed copies of libl1 and libl2, with disjoint - # counters var_l1 and var_l2. This is arguably acceptable behavior, -@@ -97,7 +97,7 @@ - rm -f l3/libl3.la - - echo "running ../depdemo/depdemo with broken libl3.la" --if (./depdemo) 2>&1; then -+if (./depdemo$EXEEXT) 2>&1; then - echo "= Exiting: ../depdemo/depdemo runs even though libl3.la is incomplete" - echo "shlibpath_overrides_runpath should be set to no" - exit 1 -@@ -112,9 +112,9 @@ - - if test "$shlibpath_overrides_runpath" != yes; then - rm -f $objdir/lt-depdemo || exit 1 -- cp $objdir/depdemo $objdir/lt-depdemo || exit 1 -+ cp $objdir/depdemo$EXEEXT $objdir/lt-depdemo$EXEEXT || exit 1 - echo "running ../depdemo/depdemo with installed libl3.la" -- if ./depdemo; then -+ if ./depdemo$EXEEXT; then - echo "Worked, as expected" - else - echo "shlibpath_overrides_runpath should be set to yes" -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/cdemo-exec.test libtool-1.5.24/tests/cdemo-exec.test ---- libtool-1.5.24.orig/tests/cdemo-exec.test Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tests/cdemo-exec.test Wed Jan 23 13:21:41 2008 -@@ -19,7 +19,7 @@ - # Check to see if the programs really run. - echo "Executing uninstalled programs in ../cdemo" - --if ../cdemo/cdemo; then : -+if ../cdemo/cdemo$EXEEXT; then : - else - echo "$0: cannot execute ../cdemo/cdemo" 1>&2 - status=1 -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/demo-exec.test libtool-1.5.24/tests/demo-exec.test ---- libtool-1.5.24.orig/tests/demo-exec.test Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tests/demo-exec.test Wed Jan 23 13:22:21 2008 -@@ -20,19 +20,19 @@ - echo "Executing uninstalled programs in ../demo" - - status=0 --if ../demo/hell_static| grep 'Welcome to GNU Hell'; then : -+if ../demo/hell_static$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute ../demo/hell_static" 1>&2 - status=1 - fi - --if ../demo/hell | grep 'Welcome to GNU Hell'; then : -+if ../demo/hell$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute ../demo/hell" 1>&2 - status=1 - fi - --if ../demo/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : -+if ../demo/helldl$EXEEXT | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : - else - echo "$0: cannot execute ../demo/helldl" 1>&2 - status=1 -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/demo-inst.test libtool-1.5.24/tests/demo-inst.test ---- libtool-1.5.24.orig/tests/demo-inst.test Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tests/demo-inst.test Wed Jan 23 13:23:03 2008 -@@ -25,13 +25,13 @@ - - echo "= Executing installed programs" - status=0 --if $prefix/bin/hell_static | grep 'Welcome to GNU Hell'; then : -+if $prefix/bin/hell_static$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute $prefix/bin/hell_static" 1>&2 - status=1 - fi - --if $prefix/bin/hell | grep 'Welcome to GNU Hell'; then : -+if $prefix/bin/hell$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute $prefix/bin/hell" 1>&2 - -@@ -43,7 +43,7 @@ - status=1 - fi - --if $prefix/bin/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : -+if $prefix/bin/helldl$EXEEXT | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : - else - echo "$0: cannot execute $prefix/bin/helldl" 1>&2 - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/depdemo-exec.test libtool-1.5.24/tests/depdemo-exec.test ---- libtool-1.5.24.orig/tests/depdemo-exec.test Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tests/depdemo-exec.test Wed Jan 23 13:23:23 2008 -@@ -20,13 +20,13 @@ - echo "Executing uninstalled programs in ../depdemo" - - status=0 --if ../depdemo/depdemo_static; then : -+if ../depdemo/depdemo_static$EXEEXT; then : - else - echo "$0: cannot execute ../depdemo/depdemo_static" 1>&2 - status=1 - fi - --if ../depdemo/depdemo; then : -+if ../depdemo/depdemo$EXEEXT; then : - else - echo "$0: cannot execute ../depdemo/depdemo" 1>&2 - status=1 -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/depdemo-inst.test libtool-1.5.24/tests/depdemo-inst.test ---- libtool-1.5.24.orig/tests/depdemo-inst.test Wed Jan 23 11:08:40 2008 -+++ libtool-1.5.24/tests/depdemo-inst.test Wed Jan 23 13:23:41 2008 -@@ -26,13 +26,13 @@ - echo "= Executing installed programs" - - status=0 --if $prefix/bin/depdemo_static; then : -+if $prefix/bin/depdemo_static$EXEEXT; then : - else - echo "$0: cannot execute $prefix/bin/depdemo_static" 1>&2 - status=1 - fi - --if $prefix/bin/depdemo; then : -+if $prefix/bin/depdemo$EXEEXT; then : - else - echo "$0: cannot execute $prefix/bin/depdemo" 1>&2 - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/deplibs.test libtool-1.5.24/tests/deplibs.test ---- libtool-1.5.24.orig/tests/deplibs.test Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/tests/deplibs.test Wed Jan 23 13:23:56 2008 -@@ -13,19 +13,19 @@ - # Check that things are built. - if test -f ../demo/libhello.la && cd ../demo; then : - else -- echo "You must run demo-conf.test before $0" 1>&2 -+ echo "You must run demo-make.test before $0" 1>&2 - exit 77 - fi - - echo "linking a shared library against a static library" --if $make deplibs-check && test -f hell0; then : -+if $make deplibs-check && test -f hell0$EXEEXT; then : - else - echo "= cannot build the test program, check your deplibs_check_method" - status=1 - fi - - echo "executing the test program" --if ./hell0; then : -+if ./hell0$EXEEXT; then : - else - echo "= cannot execute the test program, check your deplibs_check_method" - status=1 -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/link-order.test libtool-1.5.24/tests/link-order.test ---- libtool-1.5.24.orig/tests/link-order.test Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/tests/link-order.test Wed Jan 23 12:02:16 2008 -@@ -38,13 +38,31 @@ - mkdir $srcdir - - cat >$srcdir/a_$i.c <$srcdir/b_$i.c <&2 - status=1 - fi - --if ../mdemo/mdemo ../mdemo/foo1.la ../mdemo/libfoo2.la; then : -+if ../mdemo/mdemo$EXEEXT ../mdemo/foo1.la ../mdemo/libfoo2.la; then : - else - echo "$0: execution of ../mdemo/mdemo failed" 1>&2 - status=1 -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/mdemo-inst.test libtool-1.5.24/tests/mdemo-inst.test ---- libtool-1.5.24.orig/tests/mdemo-inst.test Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/tests/mdemo-inst.test Wed Jan 23 13:25:16 2008 -@@ -28,13 +28,13 @@ - PATH=$prefix/lib:$PATH - - status=0 --if $prefix/bin/mdemo_static $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : -+if $prefix/bin/mdemo_static$EXEEXT $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : - else - echo "$0: cannot execute $prefix/bin/mdemo_static" 1>&2 - status=1 - fi - --if $prefix/bin/mdemo $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : -+if $prefix/bin/mdemo$EXEEXT $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : - else - echo "$0: cannot execute $prefix/bin/mdemo" 1>&2 - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/mdemo2-exec.test libtool-1.5.24/tests/mdemo2-exec.test ---- libtool-1.5.24.orig/tests/mdemo2-exec.test Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/tests/mdemo2-exec.test Wed Jan 23 13:25:39 2008 -@@ -10,7 +10,7 @@ - fi - . $srcdir/defs || exit 1 - --if test -f ../mdemo2/mdemo2; then : -+if test -f ../mdemo2/mdemo2$EXEEXT; then : - else - echo "You must run mdemo2-make.test before running $0" 1>&2 - exit 77 -@@ -20,13 +20,13 @@ - echo "Executing uninstalled programs in ../mdemo2" - - status=0 --if ../mdemo2/mdemo2_static ../mdemo/foo1.la ../mdemo/libfoo2.la; then : -+if ../mdemo2/mdemo2_static$EXEEXT ../mdemo/foo1.la ../mdemo/libfoo2.la; then : - else - echo "$0: execution of ../mdemo2/mdemo2_static failed" 1>&2 - status=1 - fi - --if ../mdemo2/mdemo2 ../mdemo/foo1.la ../mdemo/libfoo2.la; then : -+if ../mdemo2/mdemo2$EXEEXT ../mdemo/foo1.la ../mdemo/libfoo2.la; then : - else - echo "$0: execution of ../mdemo2/mdemo2 failed" 1>&2 - status=1 -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/pdemo-exec.test libtool-1.5.24/tests/pdemo-exec.test ---- libtool-1.5.24.orig/tests/pdemo-exec.test Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/tests/pdemo-exec.test Wed Jan 23 13:26:54 2008 -@@ -20,19 +20,19 @@ - echo "Executing uninstalled programs in ../pdemo" - - status=0 --if ../pdemo/hell_static| grep 'Welcome to GNU Hell'; then : -+if ../pdemo/hell_static$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute ../pdemo/hell_static" 1>&2 - status=1 - fi - --if ../pdemo/hell | grep 'Welcome to GNU Hell'; then : -+if ../pdemo/hell$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute ../pdemo/hell" 1>&2 - status=1 - fi - --if ../pdemo/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : -+if ../pdemo/helldl$EXEEXT | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : - else - echo "$0: cannot execute ../pdemo/helldl" 1>&2 - status=1 -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/pdemo-inst.test libtool-1.5.24/tests/pdemo-inst.test ---- libtool-1.5.24.orig/tests/pdemo-inst.test Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/tests/pdemo-inst.test Wed Jan 23 13:27:20 2008 -@@ -25,13 +25,13 @@ - - echo "= Executing installed programs" - status=0 --if $prefix/bin/hell_static | grep 'Welcome to GNU Hell'; then : -+if $prefix/bin/hell_static$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute $prefix/bin/hell_static" 1>&2 - status=1 - fi - --if $prefix/bin/hell | grep 'Welcome to GNU Hell'; then : -+if $prefix/bin/hell$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute $prefix/bin/hell" 1>&2 - -@@ -43,7 +43,7 @@ - status=1 - fi - --if $prefix/bin/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : -+if $prefix/bin/helldl$EXEEXT | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : - else - echo "$0: cannot execute $prefix/bin/helldl" 1>&2 - -diff -ru -x Makefile.in -x acinclude.m4 -x aclocal.m4 -x configure -x ltmain.sh -x *stamp* -x *.texi libtool-1.5.24.orig/tests/tagdemo-exec.test libtool-1.5.24/tests/tagdemo-exec.test ---- libtool-1.5.24.orig/tests/tagdemo-exec.test Wed Jan 23 11:08:41 2008 -+++ libtool-1.5.24/tests/tagdemo-exec.test Wed Jan 23 13:32:47 2008 -@@ -19,7 +19,7 @@ - # Check to see if the programs really run. - echo "Executing uninstalled programs in ../tagdemo" - --if ../tagdemo/tagdemo; then : -+if ../tagdemo/tagdemo$EXEEXT; then : - else - echo "$0: cannot execute ../tagdemo/tagdemo" 1>&2 - status=1 diff --git a/parity.patches/lt-1.5.26-parity.patch b/parity.patches/lt-1.5.26-parity.patch deleted file mode 100644 index 8f76e33..0000000 --- a/parity.patches/lt-1.5.26-parity.patch +++ /dev/null @@ -1,1176 +0,0 @@ -diff -ru libtool-1.5.26.orig/config.guess libtool-1.5.26/config.guess ---- libtool-1.5.26.orig/config.guess 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/config.guess 2008-02-06 13:30:47 +0100 -@@ -794,7 +794,13 @@ - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) -- echo i586-pc-interix${UNAME_RELEASE} -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} -diff -ru libtool-1.5.26.orig/demo/foo.c libtool-1.5.26/demo/foo.c ---- libtool-1.5.26.orig/demo/foo.c 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/demo/foo.c 2008-02-06 13:29:05 +0100 -@@ -18,6 +18,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define FOO_EXPORTS -+ - #include "foo.h" - - #include -diff -ru libtool-1.5.26.orig/demo/foo.h libtool-1.5.26/demo/foo.h ---- libtool-1.5.26.orig/demo/foo.h 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/demo/foo.h 2008-02-06 13:29:05 +0100 -@@ -58,6 +58,15 @@ - # define lt_ptr_t char* - #endif - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(FOO_EXPORTS) -+# define FOO_IMPORT __declspec(dllimport) -+#else -+# define FOO_IMPORT -+#endif -+ - /* Silly constants that the functions return. */ - #define HELLO_RET 0xe110 - #define FOO_RET 0xf00 -@@ -67,7 +76,7 @@ - __BEGIN_DECLS - int foo LT_PARAMS((void)); - int hello LT_PARAMS((void)); --extern int nothing; -+extern FOO_IMPORT int nothing; - __END_DECLS - - #endif /* !_FOO_H_ */ -diff -ru libtool-1.5.26.orig/depdemo/l1/l1.c libtool-1.5.26/depdemo/l1/l1.c ---- libtool-1.5.26.orig/depdemo/l1/l1.c 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/depdemo/l1/l1.c 2008-02-06 13:29:05 +0100 -@@ -17,6 +17,12 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+ -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L1_EXPORTS -+ - #include "l1/l1.h" - #include - -diff -ru libtool-1.5.26.orig/depdemo/l1/l1.h libtool-1.5.26/depdemo/l1/l1.h ---- libtool-1.5.26.orig/depdemo/l1/l1.h 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/depdemo/l1/l1.h 2008-02-06 13:29:05 +0100 -@@ -23,8 +23,17 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L1_EXPORTS) -+# define L1_IMPORT __declspec(dllimport) -+#else -+# define L1_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l1; -+extern L1_IMPORT int var_l1; - int func_l1 __P((int)); - __END_DECLS - -diff -ru libtool-1.5.26.orig/depdemo/l2/l2.c libtool-1.5.26/depdemo/l2/l2.c ---- libtool-1.5.26.orig/depdemo/l2/l2.c 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/depdemo/l2/l2.c 2008-02-06 13:29:05 +0100 -@@ -17,6 +17,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L2_EXPORTS -+ - #include "l2/l2.h" - - #include "l1/l1.h" -diff -ru libtool-1.5.26.orig/depdemo/l2/l2.h libtool-1.5.26/depdemo/l2/l2.h ---- libtool-1.5.26.orig/depdemo/l2/l2.h 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/depdemo/l2/l2.h 2008-02-06 13:29:05 +0100 -@@ -23,8 +23,19 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L2_EXPORTS) -+# define L2_IMPORT __declspec(dllimport) -+#else -+# define L2_IMPORT -+#endif -+ -+__BEGIN_DECLS -+ - __BEGIN_DECLS --extern int var_l2; -+extern L2_IMPORT int var_l2; - int func_l2 __P((int)); - __END_DECLS - -diff -ru libtool-1.5.26.orig/depdemo/l3/l3.c libtool-1.5.26/depdemo/l3/l3.c ---- libtool-1.5.26.orig/depdemo/l3/l3.c 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/depdemo/l3/l3.c 2008-02-06 13:29:05 +0100 -@@ -17,6 +17,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L3_EXPORTS -+ - #include "l3/l3.h" - - #include "l1/l1.h" -diff -ru libtool-1.5.26.orig/depdemo/l3/l3.h libtool-1.5.26/depdemo/l3/l3.h ---- libtool-1.5.26.orig/depdemo/l3/l3.h 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/depdemo/l3/l3.h 2008-02-06 13:29:05 +0100 -@@ -23,8 +23,19 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L3_EXPORTS) -+# define L3_IMPORT __declspec(dllimport) -+#else -+# define L3_IMPORT -+#endif -+ -+__BEGIN_DECLS -+ - __BEGIN_DECLS --extern int var_l3; -+extern L3_IMPORT int var_l3; - int func_l3 __P((int)); - __END_DECLS - -diff -ru libtool-1.5.26.orig/depdemo/l4/l4.c libtool-1.5.26/depdemo/l4/l4.c ---- libtool-1.5.26.orig/depdemo/l4/l4.c 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/depdemo/l4/l4.c 2008-02-06 13:29:05 +0100 -@@ -17,6 +17,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L4_EXPORTS -+ - #include "l4/l4.h" - - #include "l3/l3.h" -diff -ru libtool-1.5.26.orig/depdemo/l4/l4.h libtool-1.5.26/depdemo/l4/l4.h ---- libtool-1.5.26.orig/depdemo/l4/l4.h 2008-02-06 13:28:18 +0100 -+++ libtool-1.5.26/depdemo/l4/l4.h 2008-02-06 13:29:05 +0100 -@@ -23,8 +23,19 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L4_EXPORTS) -+# define L4_IMPORT __declspec(dllimport) -+#else -+# define L4_IMPORT -+#endif -+ -+__BEGIN_DECLS -+ - __BEGIN_DECLS --extern int var_l4; -+extern L4_IMPORT int var_l4; - int func_l4 __P((int)); - __END_DECLS - -diff -ru libtool-1.5.26.orig/libltdl/config.guess libtool-1.5.26/libltdl/config.guess ---- libtool-1.5.26.orig/libltdl/config.guess 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/libltdl/config.guess 2008-02-06 13:31:05 +0100 -@@ -794,7 +794,13 @@ - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) -- echo i586-pc-interix${UNAME_RELEASE} -+ eval $set_cc_for_build -+ echo "__PARITY__" > $dummy.c -+ if $CC_FOR_BUILD -E $dummy.c | grep "__PARITY__" > /dev/null 2>&1; then -+ echo i586-pc-interix${UNAME_RELEASE} -+ else -+ echo i586-pc-winnt -+ fi - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} -diff -ru libtool-1.5.26.orig/libltdl/ltdl.c libtool-1.5.26/libltdl/ltdl.c ---- libtool-1.5.26.orig/libltdl/ltdl.c 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/libltdl/ltdl.c 2008-02-06 13:29:05 +0100 -@@ -247,7 +247,7 @@ - #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) - #define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) - #define LT_DLFREE(p) \ -- LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END -+ LT_STMT_START { if (p) (p) = (lt_dlfree (p), NULL); } LT_STMT_END - - #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) - #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) -@@ -1368,8 +1368,16 @@ - cygwin_conv_to_full_win32_path (searchname, wpath); - module = LoadLibrary (wpath); - } -+#elif defined(__PARITY__) -+ { -+ /* parity brings it's loader which contains a function -+ to convert paths to native windows ones. this uses -+ a ring buffer, so we need not free things. */ -+ extern const char* LoaderConvertPathToNative(const char*); -+ module = (lt_module)LoadLibrary(LoaderConvertPathToNative(searchname)); -+ } - #else -- module = LoadLibrary (searchname); -+ module = (lt_module)LoadLibrary (searchname); - #endif - - /* Restore the error mode. */ -@@ -1421,7 +1429,7 @@ - { - int errors = 0; - -- if (FreeLibrary(module) == 0) -+ if (FreeLibrary((HMODULE)module) == 0) - { - LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); - ++errors; -@@ -1436,7 +1444,7 @@ - lt_module module; - const char *symbol; - { -- lt_ptr address = GetProcAddress (module, symbol); -+ lt_ptr address = (lt_ptr)GetProcAddress ((HMODULE)module, symbol); - - if (!address) - { -diff -ru libtool-1.5.26.orig/libltdl/ltdl.h libtool-1.5.26/libltdl/ltdl.h ---- libtool-1.5.26.orig/libltdl/ltdl.h 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/libltdl/ltdl.h 2008-02-06 13:29:05 +0100 -@@ -142,7 +142,7 @@ - #endif - - --#if defined(_MSC_VER) /* Visual Studio */ -+#if defined(_MSC_VER) && !defined(R_OK) /* Visual Studio */ - # define R_OK 4 - #endif - -diff -ru libtool-1.5.26.orig/libtool.m4 libtool-1.5.26/libtool.m4 ---- libtool-1.5.26.orig/libtool.m4 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/libtool.m4 2008-02-06 13:29:05 +0100 -@@ -845,6 +845,12 @@ - lt_cv_sys_max_cmd_len=196608 - ;; - -+ winnt*) -+ # This can be any system underneath (interix or cygwin). For now handle -+ # this the same as on interix. -+ lt_cv_sys_max_cmd_len=196608 -+ ;; -+ - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not -@@ -1159,7 +1165,11 @@ - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. -- rmdir conftest -+ # -+ # use rm -rf rather than rmdir, since some compilers (for example -+ # nearly all compilers on interix) produce files nobody knows of -+ # -+ rm -rf conftest - $rm conftest* - ]) - ])# AC_LIBTOOL_PROG_CC_C_O -@@ -1637,6 +1647,89 @@ - hardcode_into_libs=yes - ;; - -+winnt*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ -+ # -+ # the library name should not contain any minor version -+ # numbers, since this would be too strict. Windows has -+ # the library name hardcoded always, so it won't listen -+ # to -soname's. -+ # -+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -+ -+ # -+ # the real soname and dlname (which is set to soname) -+ # contains the .dll extension that parity adds. -+ # -+ soname_spec='${libname}${release}${shared_ext}$major.dll' -+ dynamic_linker='parity' -+ sys_lib_search_path_spec= -+ sys_lib_dlsearch_path_spec= -+ -+ # -+ # Calculate the system library directories, by asking -+ # parity's configuration for it. -+ # WARNING: does not work correctly with paths with spaces. -+ # WARNING: this really *ugly* contruct, is because $() is -+ # not understood by other shells... -+ # -+ save_IFS=$IFS -+ IFS=$PATH_SEPARATOR -+ parity_conf= -+ -+ set dummy $PATH -+ shift -+ -+ IFS=$save_IFS -+ -+ for p in "$[@]"; do -+ if test -x "$p/$LD" && test -f "$p/../etc/parity.conf"; then -+ parity_conf="$p/../etc/parity.conf" -+ break -+ fi -+ done -+ -+ library_paths=`grep -e ".*LibraryPaths.*=" $parity_conf | sed -e "s,.*LibraryPaths.*=[[ \t]]*\(.*\)\$,\1,g"` -+ sys_lib_search_path_spec=`echo $library_paths` -+ -+ # -+ # we assume that parity's loader feature is enabled. this -+ # enables us to use LD_LIBRARY_PATH, LD_RUN_PATH and -rpath -+ # -+ runpath_var=LD_RUN_PATH -+ shlibpath_overrides_runpath=yes -+ -+ # -+ # we need seperate postinstall and postuninstall commands -+ # to carry .dll and .pdb files with us. -+ # -+ # WARNING: the commands below (especially the ${x%..} variable -+ # syntax) work perfectly on ksh (/bin/sh) and bash on interix. -+ # Other shells have not been tested and may need some porting. -+ # -+ postinstall_cmds=' -+ $install_prog $dir/$dlname $destdir/$dlname~ -+ test ! -f $dir/${dlname%.dll}.pdb || $install_prog $dir/${dlname%.dll}.pdb $destdir/${dlname%.dll}.pdb~ -+ chmod 755 $destdir/$dlname~ -+ test ! -f $destdir/${dlname%.dll}.pdb || chmod 644 $destdir/${dlname%.dll}.pdb' -+ -+ postuninstall_cmds=' -+ dll=`$SHELL 2>&1 -c '\''. $file; -+ echo \${dlname}'\''`~ -+ pdb=\${dll%.dll}.pdb~ -+ $rm $dir/\$dll~ -+ $rm $dir/\$pdb' -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; -@@ -2475,6 +2568,16 @@ - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -+winnt*) -+ # -+ # there is no suitable file_magic, and match_patter somehow -+ # does not seem to work in all cases, namely if native windows -+ # libraries are involved in linking, which - of course - don't -+ # match the normal naming scheme. -+ # -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; -@@ -2625,7 +2728,7 @@ - [AC_REQUIRE([AC_CANONICAL_HOST])dnl - LIBM= - case $host in --*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) -+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin* | *-winnt*) - # These system don't have libm, or don't need it - ;; - *-ncr-sysv4.3*) -@@ -3350,6 +3453,13 @@ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; -+ winnt*) -+ _LT_AC_TAGVAR(hardcode_direct, $1)=no -+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' -+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -+ ;; - irix5* | irix6*) - case $cc_basename in - CC*) -@@ -4009,6 +4119,17 @@ - _LT_AC_TAGVAR(postdeps,$1)= - ;; - -+winnt*) -+ # -+ # parity does not have verbose output like gcc/g++ have, so -+ # most likely the above will result in nothing. But in worst case -+ # libtool may find something it thinks is a library, so reset things. -+ # -+ _LT_AC_TAGVAR(predep_objects,$1)= -+ _LT_AC_TAGVAR(postdep_objects,$1)= -+ _LT_AC_TAGVAR(postdeps,$1)= -+ ;; -+ - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) -@@ -4519,7 +4640,7 @@ - shrext_cmds='$shrext_cmds' - - # Executable file suffix (normally ""). --exeext="$exeext" -+exeext="$ac_exeext" - - # Additional compiler flags for building library objects. - pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -@@ -4859,6 +4980,22 @@ - sysv4) - symcode='[[DFNSTU]]' - ;; -+winnt*) -+ # -+ # parity knows how to handle dllimport declspecs when there is no -+ # shared library in play. -+ # -+ lt_cv_sys_global_symbol_to_cdecl="awk '{ print \"extern __declspec\(dllimport\) int \" \$][3 \";\" }'" -+ -+ # -+ # WARNING: since parity may use the Microsoft compiler as backend -+ # symbol names could be mangled in MS style, which means, they are -+ # not valid C identifiers, so we *cannot* generate C code that -+ # tries to do something with those C++ variables, because it won't -+ # compile! -+ # This could be done in assembly which would solve this problem. -+ # -+ ;; - esac - - # Handle CRLF in mingw tool chain -@@ -4954,6 +5091,18 @@ - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" -+ -+ # -+ # parity needs -xc++ to force the file in c++ mode. this is -+ # because of variables beeing initialized with non-constant -+ # values (variables from shared libraries) -+ # -+ case "$host" in -+ *-winnt*) -+ CFLAGS="${CFLAGS} -xc++" -+ ;; -+ esac -+ - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -@@ -5139,6 +5288,19 @@ - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; -+ -+ winnt*) -+ # -+ # -fPIC and -fpic have the same effect for parity: none -+ # this means it's of no danger to pass it in, since parity -+ # simply ignores it, still we save some command line parsing -+ # time, when not passing it :) -+ # -+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='' -+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) -@@ -5510,6 +5672,17 @@ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - -+ winnt*) -+ # -+ # -fPIC and -fpic have the same effect for parity: none -+ # this means it's of no danger to pass it in, since parity -+ # simply ignores it. -+ # -+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; -+ - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; -@@ -5637,6 +5810,12 @@ - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; -+ winnt*) -+ # -+ # parity linker or compiler. this means that we are not gnu ld. -+ # -+ with_gnu_ld=no -+ ;; - openbsd*) - with_gnu_ld=no - ;; -@@ -6267,6 +6446,14 @@ - fi - ;; - -+ winnt*) -+ _LT_AC_TAGVAR(hardcode_direct, $1)=no -+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' -+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -+ ;; -+ - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes -diff -ru libtool-1.5.26.orig/ltmain.in libtool-1.5.26/ltmain.in ---- libtool-1.5.26.orig/ltmain.in 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/ltmain.in 2008-02-06 13:29:05 +0100 -@@ -1599,7 +1599,7 @@ - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in -- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-*-winnt*) - # These systems don't actually have a C or math library (as such) - continue - ;; -@@ -3917,7 +3917,13 @@ - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" -+ -+ # if shlibpath_var overrides the runpath, we can save the time -+ # of relinking, so omit the uninstalled rpath. -+ if test "$shlibpath_overrides_runpath" != yes; then - test "$mode" != relink && rpath="$compile_rpath$rpath" -+ fi -+ - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then -@@ -4096,7 +4102,7 @@ - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : -- else -+ elif { case $host in *-*-winnt*) false;; *) true;; esac ; }; then - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - -@@ -4693,7 +4699,7 @@ - " - - case $host in -- *cygwin* | *mingw* ) -+ *cygwin* | *mingw* | *winnt*) - $echo >> "$output_objdir/$dlsyms" "\ - /* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation -@@ -4755,9 +4761,20 @@ - esac - esac - -+ # -+ # if parity is used as compiler, we need to use -xc++ to force -+ # the C file into C++ to be able to use non-const initializers -+ # for variables (other variables from shared libraries for example) -+ # -+ case "$CC" in -+ *parity*) -+ PARITY_CFLAGS="-xc++" -+ ;; -+ esac -+ - # Now compile the dynamic symbol file. -- $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -- $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? -+ $show "(cd $output_objdir && $LTCC $PARITY_CFLAGS $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -+ $run eval '(cd $output_objdir && $LTCC $PARITY_CFLAGS $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" -@@ -4937,11 +4954,19 @@ - - # Only actually do things if our run command is non-null. - if test -z "$run"; then -+ # test for cygwin and/or mingw, since on interix, we still want the -+ # .exe so that the makefiles aren't confused (the makefile target -+ # still is progname$(EXEEXT), so it will always link if we remove -+ # the .exe here). -+ case $host in -+ *cygwin* | *mingw* ) - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac -+ ;; -+ esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) -@@ -5671,7 +5696,10 @@ - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` -- if test "$hardcode_automatic" = yes ; then -+ -+ # if shlibpath_var overrides the runpath we can save the time -+ # of relinking, so clear relink_command -+ if test "$hardcode_automatic" = yes || test "$shlibpath_overrides_runpath" = yes ; then - relink_command= - fi - -@@ -6150,6 +6178,12 @@ - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" -+ -+ # we do a test for the host here, since interix (which runs on windows -+ # too) doesn't have all that .exe hack-around. So we want what we -+ # are told to output in every case (also with the wrapper) -+ case $host in -+ *cygwin*|*mingw*) - case $file in - *.exe) - if test ! -f "$file"; then -@@ -6158,6 +6192,8 @@ - fi - ;; - esac -+ ;; -+ esac - - # Do a test to see if this is really a libtool program. - case $host in -@@ -6670,6 +6706,11 @@ - *) - if test "$mode" = clean ; then - noexename=$name -+ # we do a test for the host here, since interix (which runs on windows -+ # too) doesn't have all that .exe hack-around. So we want what we -+ # are told to output in every case (also with the wrapper) -+ case $host in -+ *cygwin*|*mingw*) - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` -@@ -6679,6 +6720,8 @@ - rmfiles="$rmfiles $file" - ;; - esac -+ ;; -+ esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= -diff -ru libtool-1.5.26.orig/mdemo/foo1.c libtool-1.5.26/mdemo/foo1.c ---- libtool-1.5.26.orig/mdemo/foo1.c 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/mdemo/foo1.c 2008-02-06 13:29:05 +0100 -@@ -30,7 +30,11 @@ - #define hello foo1_LTX_hello - - /* Give a global variable definition. */ --int nothing; -+ -+/* When working on Windows (with or without parity) the variable needs -+ * to be initialized here (or used elsewhere in the file) to be -+ * defined in the object, otherwise its "UNDEF" */ -+int nothing = 0; - - /* private function */ - int -diff -ru libtool-1.5.26.orig/mdemo/foo2.c libtool-1.5.26/mdemo/foo2.c ---- libtool-1.5.26.orig/mdemo/foo2.c 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/mdemo/foo2.c 2008-02-06 13:29:05 +0100 -@@ -30,7 +30,11 @@ - #define hello libfoo2_LTX_hello - - /* Give a global variable definition. */ --int nothing; -+ -+/* When working on Windows (with or without parity) the variable needs -+ * to be initialized here (or used elsewhere in the file) to be -+ * defined in the object, otherwise its "UNDEF" */ -+int nothing = 0; - - /* private function */ - int -diff -ru libtool-1.5.26.orig/pdemo/foo.h libtool-1.5.26/pdemo/foo.h ---- libtool-1.5.26.orig/pdemo/foo.h 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/pdemo/foo.h 2008-02-06 13:29:05 +0100 -@@ -75,6 +75,17 @@ - # define EXTERN extern - #endif - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(FOO_EXPORTS) -+# define FOO_IMPORT __declspec(dllimport) -+#else -+# define FOO_IMPORT -+#endif -+ -+/* Silly constants that the functions return. */ -+ - /* Silly constants that the functions return. */ - #define HELLO_RET 0xe110 - #define FOO_RET 0xf00 -@@ -84,7 +95,7 @@ - __BEGIN_DECLS - int foo LT_PARAMS((void)); - int hello LT_PARAMS((void)); --EXTERN int nothing; -+EXTERN FOO_IMPORT int nothing; - __END_DECLS - - #endif /* !_FOO_H_ */ -diff -ru libtool-1.5.26.orig/pdemo/longer_file_name_foo.c libtool-1.5.26/pdemo/longer_file_name_foo.c ---- libtool-1.5.26.orig/pdemo/longer_file_name_foo.c 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/pdemo/longer_file_name_foo.c 2008-02-06 13:29:05 +0100 -@@ -18,6 +18,11 @@ - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA. */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define FOO_EXPORTS -+ - #define _LIBFOO_COMPILATION_ - #include "foo.h" - #undef _LIBFOO_COMPILATION_ -diff -ru libtool-1.5.26.orig/tests/build-relink.test libtool-1.5.26/tests/build-relink.test ---- libtool-1.5.26.orig/tests/build-relink.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/build-relink.test 2008-02-06 13:29:05 +0100 -@@ -65,13 +65,13 @@ - exit 1 - fi - --./hell # so that it links on-demand if needed -+./hell$EXEEXT # so that it links on-demand if needed - - echo "removing libhello.la from ../demo" - rm -f libhello.la $objdir/libhello.* - - echo "running ../demo/hell" --if ./hell; then -+if ./hell$EXEEXT; then - : - elif test "x,$hardcode_action,$hardcode_direct" = x,relink,yes; then - echo "Ok, uninstalled programs fail after uninstalled libraries are removed" -@@ -91,7 +91,7 @@ - rm -f libhello.la - - echo "running ../demo/hell with broken libhello.la" --if (./hell) 2>&1; then -+if (./hell$EXEEXT) 2>&1; then - echo "= Exiting: ../demo/hell runs even though libhello.la is incomplete" - echo "shlibpath_overrides_runpath should be set to no" - exit 1 -@@ -108,7 +108,7 @@ - rm -f $objdir/lt-hell$EXEEXT || exit 1 - cp $objdir/hell$EXEEXT $objdir/lt-hell$EXEEXT || exit 1 - echo "running ../demo/hell with installed libhello.la" -- if ./hell; then -+ if ./hell$EXEEXT; then - echo "Worked, as expected" - else - echo "shlibpath_overrides_runpath should be set to yes" -diff -ru libtool-1.5.26.orig/tests/build-relink2.test libtool-1.5.26/tests/build-relink2.test ---- libtool-1.5.26.orig/tests/build-relink2.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/build-relink2.test 2008-02-06 13:29:05 +0100 -@@ -66,13 +66,13 @@ - exit 1 - fi - --./depdemo # so that it links on-demand if needed -+./depdemo$EXEEXT # so that it links on-demand if needed - - echo "removing libl3.la from ../depdemo/l3" - rm -rf l3/libl3.la l3/$objdir - - echo "running ../depdemo/depdemo" --if ./depdemo || -+if ./depdemo$EXEEXT || - # On AIX 4.1, when the installed copy of libl3 is loaded, it brings - # with it the installed copies of libl1 and libl2, with disjoint - # counters var_l1 and var_l2. This is arguably acceptable behavior, -@@ -97,7 +97,7 @@ - rm -f l3/libl3.la - - echo "running ../depdemo/depdemo with broken libl3.la" --if (./depdemo) 2>&1; then -+if (./depdemo$EXEEXT) 2>&1; then - echo "= Exiting: ../depdemo/depdemo runs even though libl3.la is incomplete" - echo "shlibpath_overrides_runpath should be set to no" - exit 1 -@@ -112,9 +112,9 @@ - - if test "$shlibpath_overrides_runpath" != yes; then - rm -f $objdir/lt-depdemo || exit 1 -- cp $objdir/depdemo $objdir/lt-depdemo || exit 1 -+ cp $objdir/depdemo$EXEEXT $objdir/lt-depdemo$EXEEXT || exit 1 - echo "running ../depdemo/depdemo with installed libl3.la" -- if ./depdemo; then -+ if ./depdemo$EXEEXT; then - echo "Worked, as expected" - else - echo "shlibpath_overrides_runpath should be set to yes" -diff -ru libtool-1.5.26.orig/tests/cdemo-exec.test libtool-1.5.26/tests/cdemo-exec.test ---- libtool-1.5.26.orig/tests/cdemo-exec.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/cdemo-exec.test 2008-02-06 13:29:05 +0100 -@@ -19,7 +19,7 @@ - # Check to see if the programs really run. - echo "Executing uninstalled programs in ../cdemo" - --if ../cdemo/cdemo; then : -+if ../cdemo/cdemo$EXEEXT; then : - else - echo "$0: cannot execute ../cdemo/cdemo" 1>&2 - status=1 -diff -ru libtool-1.5.26.orig/tests/demo-exec.test libtool-1.5.26/tests/demo-exec.test ---- libtool-1.5.26.orig/tests/demo-exec.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/demo-exec.test 2008-02-06 13:29:05 +0100 -@@ -20,19 +20,19 @@ - echo "Executing uninstalled programs in ../demo" - - status=0 --if ../demo/hell_static| grep 'Welcome to GNU Hell'; then : -+if ../demo/hell_static$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute ../demo/hell_static" 1>&2 - status=1 - fi - --if ../demo/hell | grep 'Welcome to GNU Hell'; then : -+if ../demo/hell$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute ../demo/hell" 1>&2 - status=1 - fi - --if ../demo/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : -+if ../demo/helldl$EXEEXT | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : - else - echo "$0: cannot execute ../demo/helldl" 1>&2 - status=1 -diff -ru libtool-1.5.26.orig/tests/demo-inst.test libtool-1.5.26/tests/demo-inst.test ---- libtool-1.5.26.orig/tests/demo-inst.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/demo-inst.test 2008-02-06 13:29:05 +0100 -@@ -25,13 +25,13 @@ - - echo "= Executing installed programs" - status=0 --if $prefix/bin/hell_static | grep 'Welcome to GNU Hell'; then : -+if $prefix/bin/hell_static$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute $prefix/bin/hell_static" 1>&2 - status=1 - fi - --if $prefix/bin/hell | grep 'Welcome to GNU Hell'; then : -+if $prefix/bin/hell$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute $prefix/bin/hell" 1>&2 - -@@ -43,7 +43,7 @@ - status=1 - fi - --if $prefix/bin/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : -+if $prefix/bin/helldl$EXEEXT | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : - else - echo "$0: cannot execute $prefix/bin/helldl" 1>&2 - -diff -ru libtool-1.5.26.orig/tests/depdemo-exec.test libtool-1.5.26/tests/depdemo-exec.test ---- libtool-1.5.26.orig/tests/depdemo-exec.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/depdemo-exec.test 2008-02-06 13:29:05 +0100 -@@ -20,13 +20,13 @@ - echo "Executing uninstalled programs in ../depdemo" - - status=0 --if ../depdemo/depdemo_static; then : -+if ../depdemo/depdemo_static$EXEEXT; then : - else - echo "$0: cannot execute ../depdemo/depdemo_static" 1>&2 - status=1 - fi - --if ../depdemo/depdemo; then : -+if ../depdemo/depdemo$EXEEXT; then : - else - echo "$0: cannot execute ../depdemo/depdemo" 1>&2 - status=1 -diff -ru libtool-1.5.26.orig/tests/depdemo-inst.test libtool-1.5.26/tests/depdemo-inst.test ---- libtool-1.5.26.orig/tests/depdemo-inst.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/depdemo-inst.test 2008-02-06 13:29:05 +0100 -@@ -26,13 +26,13 @@ - echo "= Executing installed programs" - - status=0 --if $prefix/bin/depdemo_static; then : -+if $prefix/bin/depdemo_static$EXEEXT; then : - else - echo "$0: cannot execute $prefix/bin/depdemo_static" 1>&2 - status=1 - fi - --if $prefix/bin/depdemo; then : -+if $prefix/bin/depdemo$EXEEXT; then : - else - echo "$0: cannot execute $prefix/bin/depdemo" 1>&2 - -diff -ru libtool-1.5.26.orig/tests/deplibs.test libtool-1.5.26/tests/deplibs.test ---- libtool-1.5.26.orig/tests/deplibs.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/deplibs.test 2008-02-06 13:29:05 +0100 -@@ -13,19 +13,19 @@ - # Check that things are built. - if test -f ../demo/libhello.la && cd ../demo; then : - else -- echo "You must run demo-conf.test before $0" 1>&2 -+ echo "You must run demo-make.test before $0" 1>&2 - exit 77 - fi - - echo "linking a shared library against a static library" --if $make deplibs-check && test -f hell0; then : -+if $make deplibs-check && test -f hell0$EXEEXT; then : - else - echo "= cannot build the test program, check your deplibs_check_method" - status=1 - fi - - echo "executing the test program" --if ./hell0; then : -+if ./hell0$EXEEXT; then : - else - echo "= cannot execute the test program, check your deplibs_check_method" - status=1 -diff -ru libtool-1.5.26.orig/tests/link-order.test libtool-1.5.26/tests/link-order.test ---- libtool-1.5.26.orig/tests/link-order.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/link-order.test 2008-02-06 13:29:05 +0100 -@@ -38,13 +38,31 @@ - mkdir $srcdir - - cat >$srcdir/a_$i.c <$srcdir/b_$i.c <&2 - status=1 - fi - --if $prefix/bin/mdemo $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : -+if $prefix/bin/mdemo$EXEEXT $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : - else - echo "$0: cannot execute $prefix/bin/mdemo" 1>&2 - -diff -ru libtool-1.5.26.orig/tests/mdemo2-exec.test libtool-1.5.26/tests/mdemo2-exec.test ---- libtool-1.5.26.orig/tests/mdemo2-exec.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/mdemo2-exec.test 2008-02-06 13:29:05 +0100 -@@ -10,7 +10,7 @@ - fi - . $srcdir/defs || exit 1 - --if test -f ../mdemo2/mdemo2; then : -+if test -f ../mdemo2/mdemo2$EXEEXT; then : - else - echo "You must run mdemo2-make.test before running $0" 1>&2 - exit 77 -@@ -20,13 +20,13 @@ - echo "Executing uninstalled programs in ../mdemo2" - - status=0 --if ../mdemo2/mdemo2_static ../mdemo/foo1.la ../mdemo/libfoo2.la; then : -+if ../mdemo2/mdemo2_static$EXEEXT ../mdemo/foo1.la ../mdemo/libfoo2.la; then : - else - echo "$0: execution of ../mdemo2/mdemo2_static failed" 1>&2 - status=1 - fi - --if ../mdemo2/mdemo2 ../mdemo/foo1.la ../mdemo/libfoo2.la; then : -+if ../mdemo2/mdemo2$EXEEXT ../mdemo/foo1.la ../mdemo/libfoo2.la; then : - else - echo "$0: execution of ../mdemo2/mdemo2 failed" 1>&2 - status=1 -diff -ru libtool-1.5.26.orig/tests/pdemo-exec.test libtool-1.5.26/tests/pdemo-exec.test ---- libtool-1.5.26.orig/tests/pdemo-exec.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/pdemo-exec.test 2008-02-06 13:29:05 +0100 -@@ -20,19 +20,19 @@ - echo "Executing uninstalled programs in ../pdemo" - - status=0 --if ../pdemo/hell_static| grep 'Welcome to GNU Hell'; then : -+if ../pdemo/hell_static$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute ../pdemo/hell_static" 1>&2 - status=1 - fi - --if ../pdemo/hell | grep 'Welcome to GNU Hell'; then : -+if ../pdemo/hell$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute ../pdemo/hell" 1>&2 - status=1 - fi - --if ../pdemo/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : -+if ../pdemo/helldl$EXEEXT | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : - else - echo "$0: cannot execute ../pdemo/helldl" 1>&2 - status=1 -diff -ru libtool-1.5.26.orig/tests/pdemo-inst.test libtool-1.5.26/tests/pdemo-inst.test ---- libtool-1.5.26.orig/tests/pdemo-inst.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/pdemo-inst.test 2008-02-06 13:29:05 +0100 -@@ -25,13 +25,13 @@ - - echo "= Executing installed programs" - status=0 --if $prefix/bin/hell_static | grep 'Welcome to GNU Hell'; then : -+if $prefix/bin/hell_static$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute $prefix/bin/hell_static" 1>&2 - status=1 - fi - --if $prefix/bin/hell | grep 'Welcome to GNU Hell'; then : -+if $prefix/bin/hell$EXEEXT | grep 'Welcome to GNU Hell'; then : - else - echo "$0: cannot execute $prefix/bin/hell" 1>&2 - -@@ -43,7 +43,7 @@ - status=1 - fi - --if $prefix/bin/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : -+if $prefix/bin/helldl$EXEEXT | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : - else - echo "$0: cannot execute $prefix/bin/helldl" 1>&2 - -diff -ru libtool-1.5.26.orig/tests/tagdemo-exec.test libtool-1.5.26/tests/tagdemo-exec.test ---- libtool-1.5.26.orig/tests/tagdemo-exec.test 2008-02-06 13:28:19 +0100 -+++ libtool-1.5.26/tests/tagdemo-exec.test 2008-02-06 13:29:05 +0100 -@@ -19,7 +19,7 @@ - # Check to see if the programs really run. - echo "Executing uninstalled programs in ../tagdemo" - --if ../tagdemo/tagdemo; then : -+if ../tagdemo/tagdemo$EXEEXT; then : - else - echo "$0: cannot execute ../tagdemo/tagdemo" 1>&2 - status=1 diff --git a/parity.patches/lt-2.2.6a-parity.patch b/parity.patches/lt-2.2.6a-parity.patch deleted file mode 100644 index 023f727..0000000 --- a/parity.patches/lt-2.2.6a-parity.patch +++ /dev/null @@ -1,1308 +0,0 @@ -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/libltdl/config/ltmain.m4sh libtool-2.2.6/libltdl/config/ltmain.m4sh ---- libtool-2.2.6.orig/libltdl/config/ltmain.m4sh 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/libltdl/config/ltmain.m4sh 2009-04-01 16:33:03 +0200 -@@ -1698,14 +1698,19 @@ - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install -- stripped_ext="" -- case $file in -- *.exe) -- if test ! -f "$file"; then -- func_stripname '' '.exe' "$file" -- file=$func_stripname_result -- stripped_ext=".exe" -- fi -+ case $host in -+ *winnt*) ;; -+ *) -+ stripped_ext="" -+ case $file in -+ *.exe) -+ if test ! -f "$file"; then -+ func_stripname '' '.exe' "$file" -+ file=$func_stripname_result -+ stripped_ext=".exe" -+ fi -+ ;; -+ esac - ;; - esac - -@@ -1985,7 +1990,7 @@ - } lt_dlsymlist; - " - case $host in -- *cygwin* | *mingw* | *cegcc* ) -+ *cygwin* | *mingw* | *cegcc* | *winnt* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ - /* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation -@@ -2062,8 +2067,19 @@ - esac - done - -+ # -+ # if parity is used as compiler, we need to use -xc++ to force -+ # the C file into C++ to be able to use non-const initializers -+ # for variables (other variables from shared libraries for example) -+ # -+ case "$host" in -+ *winnt*) -+ PARITY_CFLAGS="-xc++" -+ ;; -+ esac -+ - # Now compile the dynamic symbol file. -- func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' -+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags $PARITY_CFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' -@@ -6671,7 +6687,7 @@ - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : -- else -+ elif { case $host in *-*-winnt*) false;; *) true;; esac ; }; then - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. -@@ -7369,10 +7385,15 @@ - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. -- case $output in -- *.exe) func_stripname '' '.exe' "$output" -- output=$func_stripname_result ;; -- esac -+ case $host in -+ *winnt*) ;; -+ *) -+ case $output in -+ *.exe) func_stripname '' '.exe' "$output" -+ output=$func_stripname_result ;; -+ esac -+ ;; -+ esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) -@@ -7867,17 +7888,22 @@ - *) - if test "$mode" = clean ; then - noexename=$name -- case $file in -- *.exe) -- func_stripname '' '.exe' "$file" -- file=$func_stripname_result -- func_stripname '' '.exe' "$name" -- noexename=$func_stripname_result -- # $file with .exe has already been added to rmfiles, -- # add $file without .exe -- rmfiles="$rmfiles $file" -- ;; -- esac -+ case $host in -+ *winnt*) ;; -+ *) -+ case $file in -+ *.exe) -+ func_stripname '' '.exe' "$file" -+ file=$func_stripname_result -+ func_stripname '' '.exe' "$name" -+ noexename=$func_stripname_result -+ # $file with .exe has already been added to rmfiles, -+ # add $file without .exe -+ rmfiles="$rmfiles $file" -+ ;; -+ esac -+ ;; -+ esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/libltdl/libltdl/lt_system.h libtool-2.2.6/libltdl/libltdl/lt_system.h ---- libtool-2.2.6.orig/libltdl/libltdl/lt_system.h 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/libltdl/libltdl/lt_system.h 2009-04-01 15:41:40 +0200 -@@ -122,7 +122,9 @@ - # define LT_PATHSEP_CHAR ':' - #endif - --#if defined(_MSC_VER) /* Visual Studio */ -+/* Visual Studio - or parity, which brings a few enhancements -+ * to microsofts runtime, and uses the microsoft compiler */ -+#if defined(_MSC_VER) && !defined(R_OK) - # define R_OK 4 - #endif - -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/libltdl/loaders/dlopen.c libtool-2.2.6/libltdl/loaders/dlopen.c ---- libtool-2.2.6.orig/libltdl/loaders/dlopen.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/libltdl/loaders/dlopen.c 2009-04-01 15:41:40 +0200 -@@ -171,7 +171,9 @@ - - if (advise) - { --#ifdef RTLD_GLOBAL -+ /* parity (winnt) has RTLD_GLOBAL defined for compatability, but -+ * it has no effect... */ -+#if defined(RTLD_GLOBAL ) && !defined(__PARITY__) - /* If there is some means of asking for global symbol resolution, - do so. */ - if (advise->is_symglobal) -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/libltdl/loaders/loadlibrary.c libtool-2.2.6/libltdl/loaders/loadlibrary.c ---- libtool-2.2.6.orig/libltdl/loaders/loadlibrary.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/libltdl/loaders/loadlibrary.c 2009-04-01 15:41:40 +0200 -@@ -146,6 +146,11 @@ - #elif defined(__CYGWIN__) - cygwin_conv_to_full_win32_path (filename, wpath); - len = 0; -+#elif defined(__PARITY__) -+ /* Use parity's internal runtime library capabilities, which -+ * aren't exposed normally... */ -+ extern const char* LoaderConvertPathToNative(const char*); -+ strcpy(wpath, LoaderConvertPathToNative(filename)); - #else - strcpy(wpath, filename); - #endif -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/libltdl/m4/argz.m4 libtool-2.2.6/libltdl/m4/argz.m4 ---- libtool-2.2.6.orig/libltdl/m4/argz.m4 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/libltdl/m4/argz.m4 2009-04-01 15:41:40 +0200 -@@ -42,6 +42,10 @@ - [if argz actually works], - [lt_cv_sys_argz_works], - [[case $host_os in #( -+ *winnt*) -+ # Windows does not provide any argz stuff, so use our own. -+ lt_cv_sys_argz_works=no -+ ;; #( - *cygwin*) - lt_cv_sys_argz_works=no - if test "$cross_compiling" != no; then -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/libltdl/m4/libtool.m4 libtool-2.2.6/libltdl/m4/libtool.m4 ---- libtool-2.2.6.orig/libltdl/m4/libtool.m4 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/libltdl/m4/libtool.m4 2009-04-01 15:41:40 +0200 -@@ -152,6 +152,18 @@ - dnl - AC_REQUIRE([AC_PROG_LN_S])dnl - test -z "$LN_S" && LN_S="ln -s" -+ -+# on winnt, the microsoft compiler is used behind the scenes. -+# the wrapper around it is capable of resolving links, but still -+# cl.exe chokes on header files which are linked (the wrapper -+# cannot know of these...). -+# Everybody would be happy with ln -s, except libtoolize without -+# --copy. there ln -s breaks the testsuite, since it tries to -+# compile linked source, which is nor supported by the compiler. -+case $host_os in -+winnt*) LN_S="cp -p" ;; -+esac -+ - _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl - dnl - AC_REQUIRE([LT_CMD_MAX_LEN])dnl -@@ -1552,6 +1564,12 @@ - lt_cv_sys_max_cmd_len=196608 - ;; - -+ winnt*) -+ # This can be any system underneath (interix or cygwin). For now handle -+ # this the same as on interix (since interix is the primary platform). -+ lt_cv_sys_max_cmd_len=196608 -+ ;; -+ - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not -@@ -2003,9 +2021,19 @@ - old_striplib= - AC_MSG_CHECKING([whether stripping libraries is possible]) - if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then -- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -- test -z "$striplib" && striplib="$STRIP --strip-unneeded" -- AC_MSG_RESULT([yes]) -+ case $host_os in -+ winnt*) -+ # stripping is not save here, since host utils are used -+ # to work on native windows libraries (which should be the -+ # same, but we never know...) -+ AC_MSG_RESULT([no]) -+ ;; -+ *) -+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -+ test -z "$striplib" && striplib="$STRIP --strip-unneeded" -+ AC_MSG_RESULT([yes]) -+ ;; -+ esac - else - # FIXME - insert some real tests, host_os isn't really good enough - case $host_os in -@@ -2402,6 +2430,104 @@ - hardcode_into_libs=yes - ;; - -+winnt*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ shlibpath_var=LD_LIBRARY_PATH -+ hardcode_into_libs=yes -+ -+ # -+ # the library name should not contain any minor version -+ # numbers, since this would be too strict. Windows has -+ # the library name hardcoded always, so it won't listen -+ # to -soname's. -+ # -+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -+ -+ # -+ # the real soname and dlname (which is set to soname) -+ # contains the .dll extension that parity adds. -+ # -+ soname_spec='${libname}${release}${shared_ext}$major.dll' -+ dynamic_linker='parity' -+ sys_lib_search_path_spec= -+ sys_lib_dlsearch_path_spec= -+ -+ # -+ # Calculate the system library directories, by asking -+ # parity's configuration for it. -+ # WARNING: does not work correctly with paths with spaces. -+ # -+ parity_conf= -+ -+ # -+ # try by asking first... This works from parity 1.0.4 onwards. -+ # -+ parity_sysconf=`$CC -v | grep Sysconf | sed -e 's,^Sysconf .*: ,,g'` -+ -+ if test -n "${parity_sysconf}"; then -+ if test -d "${parity_sysconf}" -a -f "${parity_sysconf}/parity.conf"; then -+ parity_conf="${parity_sysconf}/parity.conf" -+ fi -+ fi -+ -+ # -+ # couldn't determine sysconfdir, so assume, its ../etc from parity. -+ # -+ if test -z "${parity_conf}"; then -+ save_IFS=$IFS -+ IFS=$PATH_SEPARATOR -+ set dummy $PATH -+ shift -+ -+ IFS=$save_IFS -+ -+ for p in "$[@]"; do -+ if test -x "$p/$LD" && test -f "$p/../etc/parity.conf"; then -+ parity_conf="$p/../etc/parity.conf" -+ break -+ fi -+ done -+ fi -+ -+ if test -n "${parity_conf}"; then -+ library_paths=`grep -e ".*LibraryPaths.*=" $parity_conf | sed -e "s,.*LibraryPaths.*=[[ \t]]*\(.*\)\$,\1,g"` -+ sys_lib_search_path_spec=`echo $library_paths` -+ else -+ # panic: what am i supposed to do now? -+ sys_lib_search_path_spec= -+ fi -+ -+ # -+ # we assume that parity's loader feature is enabled. this -+ # enables us to use LD_LIBRARY_PATH, LD_RUN_PATH and -rpath -+ # -+ runpath_var=LD_RUN_PATH -+ shlibpath_overrides_runpath=yes -+ -+ # -+ # we need seperate postinstall and postuninstall commands -+ # to carry .dll and .pdb files with us. -+ # -+ # WARNING: the commands below (especially the ${x%..} variable -+ # syntax) work perfectly on ksh (/bin/sh) and bash on interix. -+ # Other shells have not been tested and may need some porting. -+ # -+ postinstall_cmds=' -+ $install_prog $dir/$dlname $destdir/$dlname~ -+ test ! -f $dir/${dlname%.dll}.pdb || $install_prog $dir/${dlname%.dll}.pdb $destdir/${dlname%.dll}.pdb~ -+ chmod 755 $destdir/$dlname~ -+ test ! -f $destdir/${dlname%.dll}.pdb || chmod 644 $destdir/${dlname%.dll}.pdb' -+ -+ postuninstall_cmds=' -+ dll=`$SHELL 2>&1 -c '\''. $file; -+ echo \${dlname}'\''`~ -+ pdb=\${dll%.dll}.pdb~ -+ rm $dir/\$dll~ -+ rm $dir/\$pdb' -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; -@@ -3061,6 +3187,16 @@ - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -+winnt*) -+ # -+ # there is no suitable file_magic, and match_patter somehow -+ # does not seem to work in all cases, namely if native windows -+ # libraries are involved in linking, which - of course - don't -+ # match the normal naming scheme. -+ # -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; -@@ -3256,7 +3392,7 @@ - [AC_REQUIRE([AC_CANONICAL_HOST])dnl - LIBM= - case $host in --*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) -+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin* | *-winnt*) - # These system don't have libm, or don't need it - ;; - *-ncr-sysv4.3*) -@@ -3367,6 +3503,25 @@ - # so use this general approach. - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -+case $host_os in -+winnt*) -+ # -+ # parity knows how to handle dllimport declspecs when there is no -+ # shared library in play, so we use it allways to be on the safe side. -+ # -+ lt_cv_sys_global_symbol_to_cdecl="awk '{ print \"extern __declspec(dllimport) int \" \$][3 \";\" }'" -+ -+ # -+ # WARNING: since parity may use the Microsoft compiler as backend -+ # symbol names could be mangled in MS style, which means, they are -+ # not valid C identifiers, so we *cannot* generate C code that -+ # tries to do something with those C++ variables, because it won't -+ # compile! -+ # This could be done in assembly which would solve this problem. -+ # -+ ;; -+esac -+ - # Transform an extracted symbol line into symbol name and symbol address - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -@@ -3479,6 +3634,18 @@ - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" -+ -+ # -+ # parity needs -xc++ to force the file in c++ mode. this is -+ # because of variables beeing initialized with non-constant -+ # values (variables from shared libraries) -+ # -+ case "$host_os" in -+ winnt*) -+ CFLAGS="${CFLAGS} -xc++" -+ ;; -+ esac -+ - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi -@@ -3682,6 +3849,19 @@ - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; -+ -+ winnt*) -+ # -+ # -fPIC and -fpic have the same effect for parity: none -+ # this means it's of no danger to pass it in, since parity -+ # simply ignores it, still we save some command line parsing -+ # time, when not passing it :) -+ # -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='' -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; -+ - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) -@@ -3971,6 +4151,18 @@ - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - -+ winnt*) -+ # -+ # -fPIC and -fpic have the same effect for parity: none -+ # this means it's of no danger to pass it in, since parity -+ # simply ignores it, still we save some command line parsing -+ # time, when not passing it :) -+ # -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='' -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; -+ - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. -@@ -4243,6 +4435,12 @@ - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; -+ winnt*) -+ # -+ # parity tries to look like gnu ld, but it isn't. -+ # -+ with_gnu_ld=no -+ ;; - openbsd*) - with_gnu_ld=no - ;; -@@ -4516,6 +4714,15 @@ - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in -+ -+ winnt*) -+ _LT_TAGVAR(hardcode_direct, $1)=no -+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' -+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no -+ ;; -+ - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes -@@ -5813,6 +6020,15 @@ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; -+ -+ winnt*) -+ _LT_TAGVAR(hardcode_direct, $1)=no -+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' -+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no -+ ;; -+ - irix5* | irix6*) - case $cc_basename in - CC*) -@@ -6489,6 +6705,17 @@ - _LT_TAGVAR(postdeps,$1)= - ;; - -+winnt*) -+ # -+ # parity does not have verbose output like gcc/g++ have, so -+ # most likely the above will result in nothing. But in worst case -+ # libtool may find something it thinks is a library, so reset things. -+ # -+ _LT_TAGVAR(predep_objects,$1)= -+ _LT_TAGVAR(postdep_objects,$1)= -+ _LT_TAGVAR(postdeps,$1)= -+ ;; -+ - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/libltdl/m4/ltdl.m4 libtool-2.2.6/libltdl/m4/ltdl.m4 ---- libtool-2.2.6.orig/libltdl/m4/ltdl.m4 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/libltdl/m4/ltdl.m4 2009-04-01 15:41:40 +0200 -@@ -524,6 +524,9 @@ - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - libltdl_cv_sys_dlopen_deplibs=yes - ;; -+ winnt*) -+ libltdl_cv_sys_dlopen_deplibs=yes -+ ;; - esac - ]) - if test "$lt_cv_sys_dlopen_deplibs" != yes; then -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/configure-iface.at libtool-2.2.6/tests/configure-iface.at ---- libtool-2.2.6.orig/tests/configure-iface.at 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/configure-iface.at 2009-04-01 15:41:40 +0200 -@@ -31,6 +31,11 @@ - [[#include - #include - -+#ifdef _WIN32 -+# include -+# include -+#endif -+ - typedef int funcp (void); - - static int errors = 0; -@@ -42,6 +47,14 @@ - - LTDL_SET_PRELOADED_SYMBOLS(); - -+ #ifdef _WIN32 -+ /* This is to keep the testsuite from beeing confused -+ * by \r\n line endings. This confuses the diff used to -+ * compare expected with real output. */ -+ -+ _setmode(_fileno(stdout), _O_BINARY); -+ #endif -+ - if (lt_dlinit () != 0) - { - fprintf (stderr, "error during initialization: %s\n", lt_dlerror ()); -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/ctor.at libtool-2.2.6/tests/ctor.at ---- libtool-2.2.6.orig/tests/ctor.at 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/ctor.at 2009-04-01 15:41:40 +0200 -@@ -30,13 +30,24 @@ - - AT_DATA(class.h, - [[#define magic 0xaabbccdd -+ -+/* parity (winnt) supports dllimporting allways, even when building static -+ * libraries. This means we can use dllimport here in any case, since parity -+ * handles things correctly in the static case. Also dllimport is required -+ * only for data symbols. */ -+#ifdef __PARITY__ -+# define DLLIMPORT __declspec(dllimport) -+#else -+# define DLLIMPORT -+#endif -+ - class Foo { - public: - Foo() { bar = magic; } - unsigned bar; - }; - --extern Foo instance; -+extern DLLIMPORT Foo instance; - ]]) - - AT_DATA(libctor.cpp, -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/demo/foo.c libtool-2.2.6/tests/demo/foo.c ---- libtool-2.2.6.orig/tests/demo/foo.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/demo/foo.c 2009-04-01 15:41:40 +0200 -@@ -22,6 +22,11 @@ - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define FOO_EXPORTS -+ - #include "foo.h" - - #include -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/demo/foo.h libtool-2.2.6/tests/demo/foo.h ---- libtool-2.2.6.orig/tests/demo/foo.h 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/demo/foo.h 2009-04-01 15:41:40 +0200 -@@ -62,6 +62,15 @@ - # define lt_ptr_t char* - #endif - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(FOO_EXPORTS) -+# define FOO_IMPORT __declspec(dllimport) -+#else -+# define FOO_IMPORT -+#endif -+ - /* Silly constants that the functions return. */ - #define HELLO_RET 0xe110 - #define FOO_RET 0xf00 -@@ -71,7 +80,7 @@ - __BEGIN_DECLS - int foo LT_PARAMS((void)); - int hello LT_PARAMS((void)); --extern int nothing; -+extern FOO_IMPORT int nothing; - __END_DECLS - - #endif /* !_FOO_H_ */ -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/depdemo/l1/l1.c libtool-2.2.6/tests/depdemo/l1/l1.c ---- libtool-2.2.6.orig/tests/depdemo/l1/l1.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/depdemo/l1/l1.c 2009-04-01 15:41:40 +0200 -@@ -23,6 +23,12 @@ - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -+ -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L1_EXPORTS -+ - #include "l1/l1.h" - #include - -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/depdemo/l1/l1.h libtool-2.2.6/tests/depdemo/l1/l1.h ---- libtool-2.2.6.orig/tests/depdemo/l1/l1.h 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/depdemo/l1/l1.h 2009-04-01 15:41:40 +0200 -@@ -29,8 +29,17 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L1_EXPORTS) -+# define L1_IMPORT __declspec(dllimport) -+#else -+# define L1_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l1; -+extern L1_IMPORT int var_l1; - int func_l1 __P((int)); - __END_DECLS - -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/depdemo/l2/l2.c libtool-2.2.6/tests/depdemo/l2/l2.c ---- libtool-2.2.6.orig/tests/depdemo/l2/l2.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/depdemo/l2/l2.c 2009-04-01 15:41:40 +0200 -@@ -23,6 +23,11 @@ - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L2_EXPORTS -+ - #include "l2/l2.h" - - #include "l1/l1.h" -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/depdemo/l2/l2.h libtool-2.2.6/tests/depdemo/l2/l2.h ---- libtool-2.2.6.orig/tests/depdemo/l2/l2.h 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/depdemo/l2/l2.h 2009-04-01 15:41:40 +0200 -@@ -29,8 +29,17 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L2_EXPORTS) -+# define L2_IMPORT __declspec(dllimport) -+#else -+# define L2_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l2; -+extern L2_IMPORT int var_l2; - int func_l2 __P((int)); - __END_DECLS - -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/depdemo/l3/l3.c libtool-2.2.6/tests/depdemo/l3/l3.c ---- libtool-2.2.6.orig/tests/depdemo/l3/l3.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/depdemo/l3/l3.c 2009-04-01 15:41:40 +0200 -@@ -23,6 +23,11 @@ - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L3_EXPORTS -+ - #include "l3/l3.h" - - #include "l1/l1.h" -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/depdemo/l3/l3.h libtool-2.2.6/tests/depdemo/l3/l3.h ---- libtool-2.2.6.orig/tests/depdemo/l3/l3.h 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/depdemo/l3/l3.h 2009-04-01 15:41:40 +0200 -@@ -29,8 +29,17 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L3_EXPORTS) -+# define L3_IMPORT __declspec(dllimport) -+#else -+# define L3_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l3; -+extern L3_IMPORT int var_l3; - int func_l3 __P((int)); - __END_DECLS - -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/depdemo/l4/l4.c libtool-2.2.6/tests/depdemo/l4/l4.c ---- libtool-2.2.6.orig/tests/depdemo/l4/l4.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/depdemo/l4/l4.c 2009-04-01 15:41:40 +0200 -@@ -23,6 +23,11 @@ - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define L4_EXPORTS -+ - #include "l4/l4.h" - - #include "l3/l3.h" -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/depdemo/l4/l4.h libtool-2.2.6/tests/depdemo/l4/l4.h ---- libtool-2.2.6.orig/tests/depdemo/l4/l4.h 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/depdemo/l4/l4.h 2009-04-01 15:41:40 +0200 -@@ -29,8 +29,17 @@ - - #include "sysdep.h" - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(L4_EXPORTS) -+# define L4_IMPORT __declspec(dllimport) -+#else -+# define L4_IMPORT -+#endif -+ - __BEGIN_DECLS --extern int var_l4; -+extern L4_IMPORT int var_l4; - int func_l4 __P((int)); - __END_DECLS - -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/destdir.at libtool-2.2.6/tests/destdir.at ---- libtool-2.2.6.orig/tests/destdir.at 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/destdir.at 2009-04-01 15:41:40 +0200 -@@ -56,7 +56,7 @@ - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir - echo 'extern int a(); int main() { return a(); }' > m.c - $CC $CPPFLAGS $CFLAGS -c m.c --$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT liba.la -+$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la - mkdir $DESTDIR$libdir $DESTDIR$bindir - AT_CHECK([$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la], - [], [ignore], [ignore]) -@@ -91,7 +91,7 @@ - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir liba1dep.la liba2dep.la - echo 'extern int a(); int main() { return a(); }' > m.c - $CC $CPPFLAGS $CFLAGS -c m.c --$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT liba.la -+$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la - mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir - AT_CHECK([$LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la], - [], [ignore], [ignore]) -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/duplicate_conv.at libtool-2.2.6/tests/duplicate_conv.at ---- libtool-2.2.6.orig/tests/duplicate_conv.at 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/duplicate_conv.at 2009-04-01 15:41:40 +0200 -@@ -75,12 +75,17 @@ - LT_AT_EXEC_CHECK([./main],[0],[ignore],[ignore]) - $LIBTOOL --mode=clean rm -f libcee.la - --# Test whether this works with reloadable objects as well. --AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la], -- [0], [ignore], [ignore]) --AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT cee.$OBJEXT], -- [0], [ignore], [ignore]) --LT_AT_EXEC_CHECK([./main],[0],[ignore],[ignore]) -+case $host_os in -+winnt*) ;; # This os does not support reloadable objects! -+*) -+ # Test whether this works with reloadable objects as well. -+ AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la], -+ [0], [ignore], [ignore]) -+ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT cee.$OBJEXT], -+ [0], [ignore], [ignore]) -+ LT_AT_EXEC_CHECK([./main],[0],[ignore],[ignore]) -+ ;; -+esac - - # TODO: test dlpreloading of duplicates (when it is implemented) - -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/export.at libtool-2.2.6/tests/export.at ---- libtool-2.2.6.orig/tests/export.at 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/export.at 2009-04-01 15:41:40 +0200 -@@ -45,7 +45,19 @@ - extern "C" { - #endif - --int v1; -+/* visual studio seems to behave strangely with uninitialized variables -+ * as it doesn't seem to really define those variables under certain -+ * circumstances if they are not used in this compilation unit. This will -+ * in turn prevent parity from finding this variables for auto-export. -+ * The only possible workaround for this is exporting those uninitialized -+ * variables manually (or don't use uninitialized data...). */ -+#if defined(__PARITY__) -+# define DLLEXPORT __declspec(dllexport) -+#else -+# define DLLEXPORT -+#endif -+ -+DLLEXPORT int v1; - static int v2; - int v3 = 0; - int v4 = 1; -@@ -63,7 +75,7 @@ - int (*const v12) (void) = v9; - - typedef struct { int arr[1000]; } large; --large v13; -+DLLEXPORT large v13; - large v14 = { { 0 } }; - large v15 = { { 1 } }; - -@@ -94,7 +106,7 @@ - AT_DATA(main.c, - [[ - #if defined(LIBA_DLL_IMPORT) --# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) -+# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__PARITY__) - # define LIBA_SCOPE extern __declspec(dllimport) - # endif - #endif -@@ -104,21 +116,21 @@ - #ifdef __cplusplus - extern "C" { - #endif --extern int v1; --extern int v3, v4; -+LIBA_SCOPE int v1; -+LIBA_SCOPE int v3, v4; - LIBA_SCOPE const int v5, v6; --extern const char* v7; --extern const char v8[]; --extern int v9(void); --extern int (*v10) (void); --extern int (*v11) (void); -+LIBA_SCOPE const char* v7; -+LIBA_SCOPE const char v8[]; -+LIBA_SCOPE int v9(void); -+LIBA_SCOPE int (*v10) (void); -+LIBA_SCOPE int (*v11) (void); - LIBA_SCOPE int (*const v12) (void); - #ifdef __cplusplus - } - #endif - - typedef struct { int arr[1000]; } large; --extern large v13, v14, v15; -+LIBA_SCOPE large v13, v14, v15; - - int main (void) - { -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/link-order.at libtool-2.2.6/tests/link-order.at ---- libtool-2.2.6.orig/tests/link-order.at 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/link-order.at 2009-04-01 15:41:40 +0200 -@@ -48,13 +48,33 @@ - mkdir src - - cat >src/a_$i.c <src/b_$i.c < - #include -+#ifdef _WIN32 -+# include -+# include -+#endif - - typedef int funcp (int); - -@@ -212,6 +216,13 @@ - int - main (void) - { -+ #ifdef _WIN32 -+ /* This is to keep the testsuite from beeing confused -+ * by \r\n line endings. This confuses the diff used to -+ * compare expected with real output. */ -+ -+ _setmode(_fileno(stdout), _O_BINARY); -+ #endif - - LTDL_SET_PRELOADED_SYMBOLS(); - -@@ -270,7 +281,19 @@ - [[#ifdef __cplusplus - extern "C" { - #endif --extern int f (int), i; -+ -+/* parity (winnt) supports dllimporting allways, even when building static -+ * libraries. This means we can use dllimport here in any case, since parity -+ * handles things correctly in the static case. Also dllimport is required -+ * only for data symbols. */ -+#ifdef __PARITY__ -+# define DLLIMPORT __declspec(dllimport) -+#else -+# define DLLIMPORT -+#endif -+ -+extern int f (int); -+extern DLLIMPORT int i; - int g (int x) { return f (i) + x - 3; } - int j = 4; - #ifdef __cplusplus -@@ -323,6 +346,13 @@ - # These hosts do not support linking without -no-undefined - CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0" - ;; -+winnt*) -+ # This host has implicit -no-undefine behaviour. it would in -+ # theory be possible to implement linking with undefined symbols -+ # (but only at shared library boundaries!), but at the moment -+ # i don't see any advantage in doing so. -+ CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0" -+ ;; - *) - CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1" - dlopenable="$dlopen depend" -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/lt_dlexit.at libtool-2.2.6/tests/lt_dlexit.at ---- libtool-2.2.6.orig/tests/lt_dlexit.at 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/lt_dlexit.at 2009-04-01 15:41:40 +0200 -@@ -117,7 +117,19 @@ - [[#ifdef __cplusplus - extern "C" { - #endif --extern int f1 (int), v1; -+ -+/* parity (winnt) supports dllimporting allways, even when building static -+ * libraries. This means we can use dllimport here in any case, since parity -+ * handles things correctly in the static case. Also dllimport is required -+ * only for data symbols. */ -+#ifdef __PARITY__ -+# define DLLIMPORT __declspec(dllimport) -+#else -+# define DLLIMPORT -+#endif -+ -+extern int f1 (int); -+extern DLLIMPORT int v1; - int fb1 (int x) { return f1 (v1) + x - 3; } - int vb1 = 3; - #ifdef __cplusplus -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/mdemo/foo1.c libtool-2.2.6/tests/mdemo/foo1.c ---- libtool-2.2.6.orig/tests/mdemo/foo1.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/mdemo/foo1.c 2009-04-01 15:41:40 +0200 -@@ -31,7 +31,11 @@ - #define hello foo1_LTX_hello - - /* Give a global variable definition. */ --int nothing; -+ -+/* When working on Windows (with or without parity) the variable needs -+ * to be initialized here (or used elsewhere in the file) to be -+ * defined in the object, otherwise its "UNDEF" */ -+int nothing = 0; - - /* private function */ - int -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/mdemo/foo2.c libtool-2.2.6/tests/mdemo/foo2.c ---- libtool-2.2.6.orig/tests/mdemo/foo2.c 2009-04-01 15:37:20 +0200 -+++ libtool-2.2.6/tests/mdemo/foo2.c 2009-04-01 15:41:40 +0200 -@@ -31,7 +31,11 @@ - #define hello libfoo2_LTX_hello - - /* Give a global variable definition. */ --int nothing; -+ -+/* When working on Windows (with or without parity) the variable needs -+ * to be initialized here (or used elsewhere in the file) to be -+ * defined in the object, otherwise its "UNDEF" */ -+int nothing = 0; - - /* private function */ - int -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/need_lib_prefix.at libtool-2.2.6/tests/need_lib_prefix.at ---- libtool-2.2.6.orig/tests/need_lib_prefix.at 2009-04-01 15:37:21 +0200 -+++ libtool-2.2.6/tests/need_lib_prefix.at 2009-04-01 15:41:40 +0200 -@@ -29,6 +29,11 @@ - [[#include - #include - -+#ifdef _WIN32 -+# include -+# include -+#endif -+ - typedef int fun (int); - - static int errors = 0; -@@ -89,6 +94,14 @@ - - LTDL_SET_PRELOADED_SYMBOLS(); - -+ #ifdef _WIN32 -+ /* This is to keep the testsuite from beeing confused -+ * by \r\n line endings. This confuses the diff used to -+ * compare expected with real output. */ -+ -+ _setmode(_fileno(stdout), _O_BINARY); -+ #endif -+ - if (lt_dlinit() != 0) - { - fprintf (stderr, "error during initialization: %s\n", lt_dlerror()); -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/pdemo/foo.h libtool-2.2.6/tests/pdemo/foo.h ---- libtool-2.2.6.orig/tests/pdemo/foo.h 2009-04-01 15:37:21 +0200 -+++ libtool-2.2.6/tests/pdemo/foo.h 2009-04-01 15:41:40 +0200 -@@ -79,6 +79,17 @@ - # define EXTERN extern - #endif - -+/* On Windows (with parity) we need to manually import data symbols. -+ * This can be done even when building static libraries, since parity -+ * handles those invalid imports correctly */ -+#if defined(__PARITY__) && !defined(FOO_EXPORTS) -+# define FOO_IMPORT __declspec(dllimport) -+#else -+# define FOO_IMPORT -+#endif -+ -+/* Silly constants that the functions return. */ -+ - /* Silly constants that the functions return. */ - #define HELLO_RET 0xe110 - #define FOO_RET 0xf00 -@@ -89,7 +100,7 @@ - int foo LT_PARAMS((void)); - int foo2 LT_PARAMS((void)); - int hello LT_PARAMS((void)); --EXTERN int nothing; -+EXTERN FOO_IMPORT int nothing; - __END_DECLS - - #endif /* !_FOO_H_ */ -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/pdemo/longer_file_name_foo.c libtool-2.2.6/tests/pdemo/longer_file_name_foo.c ---- libtool-2.2.6.orig/tests/pdemo/longer_file_name_foo.c 2009-04-01 15:37:21 +0200 -+++ libtool-2.2.6/tests/pdemo/longer_file_name_foo.c 2009-04-01 15:41:40 +0200 -@@ -22,6 +22,11 @@ - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -+/* On Windows (with parity) we need to manually import data, but only -+ * if not compiling the data itsself, so tell the header that here -+ * we don't import the variable, but define it */ -+#define FOO_EXPORTS -+ - #define _LIBFOO_COMPILATION_ - #include "foo.h" - #undef _LIBFOO_COMPILATION_ -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/stresstest.at libtool-2.2.6/tests/stresstest.at ---- libtool-2.2.6.orig/tests/stresstest.at 2009-04-01 15:37:21 +0200 -+++ libtool-2.2.6/tests/stresstest.at 2009-04-01 15:41:40 +0200 -@@ -39,7 +39,20 @@ - #ifdef __cplusplus - extern "C" { - #endif --int v1; -+ -+/* visual studio seems to behave strangely with uninitialized variables -+ * as it doesn't seem to really define those variables under certain -+ * circumstances if they are not used in this compilation unit. This will -+ * in turn prevent parity from finding this variables for auto-export. -+ * The only possible workaround for this is exporting those uninitialized -+ * variables manually (or don't use uninitialized data...). */ -+#if defined(__PARITY__) -+# define DLLEXPORT __declspec(dllexport) -+#else -+# define DLLEXPORT -+#endif -+ -+DLLEXPORT int v1; - static int v2; - int v3 = 0; - int v4 = 1; -@@ -57,7 +70,7 @@ - int (*const v12) (void) = v9; - - typedef struct { int arr[1000]; } large; --large v13; -+DLLEXPORT large v13; - large v14 = { { 0 } }; - large v15 = { { 1 } }; - #ifdef __cplusplus -@@ -101,21 +114,21 @@ - #ifdef __cplusplus - extern "C" { - #endif --extern int v1; --extern int v3, v4; -+LIBA_SCOPE int v1; -+LIBA_SCOPE int v3, v4; - LIBA_SCOPE const int v5, v6; --extern const char* v7; --extern const char v8[]; --extern int v9(void); --extern int (*v10) (void); --extern int (*v11) (void); -+LIBA_SCOPE const char* v7; -+LIBA_SCOPE const char v8[]; -+LIBA_SCOPE int v9(void); -+LIBA_SCOPE int (*v10) (void); -+LIBA_SCOPE int (*v11) (void); - LIBA_SCOPE int (*const v12) (void); - #ifdef __cplusplus - } - #endif - - typedef struct { int arr[1000]; } large; --extern large v13, v14, v15; -+LIBA_SCOPE large v13, v14, v15; - - int main(void) - { -@@ -139,18 +152,18 @@ - #ifdef __cplusplus - extern "C" { - #endif --extern int v1; --extern int v3, v4; -+LIBA_SCOPE int v1; -+LIBA_SCOPE int v3, v4; - LIBA_SCOPE const int v5, v6; --extern const char* v7; --extern const char v8[]; --extern int v9(void); --extern int (*v10) (void); --extern int (*v11) (void); -+LIBA_SCOPE const char* v7; -+LIBA_SCOPE const char v8[]; -+LIBA_SCOPE int v9(void); -+LIBA_SCOPE int (*v10) (void); -+LIBA_SCOPE int (*v11) (void); - LIBA_SCOPE int (*const v12) (void); - - typedef struct { int arr[1000]; } large; --extern large v13, v14, v15; -+LIBA_SCOPE large v13, v14, v15; - - extern int w1; - extern int w3, w4; -@@ -254,7 +267,8 @@ - do - case $st,$l3 in - ,-rpath*) mst= ;; -- *) mst=-static ;; -+ -static*) mst=-static ;; -+ *) mst= ;; - esac - - LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main "$rel"main$mst.lo "$rel"sub2/liba.la], -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/template.at libtool-2.2.6/tests/template.at ---- libtool-2.2.6.orig/tests/template.at 2009-04-01 15:37:21 +0200 -+++ libtool-2.2.6/tests/template.at 2009-04-01 15:41:40 +0200 -@@ -236,14 +236,14 @@ - # both convenience - AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo], - [0], [ignore], [ignore]) --AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo], -+AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la], - [0], [ignore], [ignore]) - AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la], - [0], [ignore], [ignore]) - LT_AT_EXEC_CHECK([./sub/main], [ignore]) - # lib convenience - if $noskip; then -- AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo], -+ AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo], - [0], [ignore], [ignore]) - AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la], - [0], [ignore], [ignore]) -@@ -253,7 +253,7 @@ - # both installed - AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo], - [0], [ignore], [ignore]) --AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar], -+AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar], - [0], [ignore], [ignore]) - AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la], - [0], [ignore], [ignore]) -diff -ru -x configure -x Makefile -x Makefile.in -x aclocal.m4 -x 'config.*' -x ltmain.sh -x testsuite -x '*.tex' libtool-2.2.6.orig/tests/testsuite.at libtool-2.2.6/tests/testsuite.at ---- libtool-2.2.6.orig/tests/testsuite.at 2009-04-01 15:37:21 +0200 -+++ libtool-2.2.6/tests/testsuite.at 2009-04-01 16:17:31 +0200 -@@ -205,7 +205,9 @@ - m4_define([LT_AT_EXEC_CHECK], - [m4_if([$3], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$3])]) - m4_if([$4], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])]) --AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :; -+AT_CHECK([set dummy "$1"; set $][@; shift; lt_exe=$][1; shift; -+ if test -x $lt_exe$EXEEXT; then lt_exe=$lt_exe$EXEEXT; fi -+ eval $lt_exe "$][@"; lt_status=$?; if test $lt_status -eq 0; then :; - elif test "X$host" != "X$build" && \ - { test -x "$1" || test -x "$1"$EXEEXT; } - then (exit 77); else (exit $lt_status); fi],[$2],[$3],[$4]) -@@ -218,7 +220,9 @@ - m4_define([LT_AT_NOINST_EXEC_CHECK], - [m4_if([$4], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])]) - m4_if([$5], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$5])]) --AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?; -+AT_CHECK([set dummy "$1"; set $][@; shift; lt_exe=$][1; shift; -+ if test -x $lt_exe$EXEEXT; then lt_exe=$lt_exe$EXEEXT; fi -+ eval $LIBTOOL --mode=execute $2 $lt_exe "$][@"; lt_status=$?; - if test $lt_status -eq 0; then :; - elif test "X$host" != "X$build" && \ - { test -x "$1" || test -x "$1"$EXEEXT; } diff --git a/parity.patches/parity.runtimelinking.patch b/parity.patches/parity.runtimelinking.patch deleted file mode 100644 index f95f4c9..0000000 --- a/parity.patches/parity.runtimelinking.patch +++ /dev/null @@ -1,910 +0,0 @@ -Index: parity.tasks/CollectorStubs.cpp -=================================================================== ---- parity.tasks/CollectorStubs.cpp (revision 73) -+++ parity.tasks/CollectorStubs.cpp (working copy) -@@ -146,15 +146,16 @@ - return 0; - } - -- unsigned int THREADINGAPI TaskStubs::runLoaderGenerator(void* ptrMap) -+ unsigned int THREADINGAPI TaskStubs::runLoaderGenerator(void* data) - { - utils::Timing::instance().start("Loader Generator"); - - try { -- if(!ptrMap) -+ if(!data || !((LoaderGeneratorData*)data)->imports || !((LoaderGeneratorData*)data)->origcmdline) - throw utils::Exception("pointer to imports invalid, cannot generate loader!"); - -- parity::tasks::LoaderGenerator generator(*(tasks::BinaryGatherer::ImportHybridityMap*)ptrMap); -+ parity::tasks::LoaderGenerator generator(*(tasks::BinaryGatherer::ImportHybridityMap*)((LoaderGeneratorData*)data)->imports, -+ *(utils::PathVector*)((LoaderGeneratorData*)data)->origcmdline); - generator.doWork(); - } catch(const utils::Exception& e) { - utils::Log::error("while generating loader: %s\n", e.what()); -Index: parity.tasks/CollectorStubs.h -=================================================================== ---- parity.tasks/CollectorStubs.h (revision 73) -+++ parity.tasks/CollectorStubs.h (working copy) -@@ -38,6 +38,11 @@ - static unsigned int THREADINGAPI runMsExportGenerator(void*); - static unsigned int THREADINGAPI runMsStaticImportGenerator(void*); - static unsigned int THREADINGAPI runLoaderGenerator(void*); -+ -+ struct LoaderGeneratorData { -+ const void* imports; -+ const void* origcmdline; -+ }; - }; - - } -Index: parity.tasks/LoaderGenerator.cpp -=================================================================== ---- parity.tasks/LoaderGenerator.cpp (revision 73) -+++ parity.tasks/LoaderGenerator.cpp (working copy) -@@ -150,8 +150,8 @@ - static const unsigned char dataLazyStubPart4[] = { 0x83, 0xC4, 0x04, 0x61, 0xFF, 0x25 }; - - -- LoaderGenerator::LoaderGenerator(const tasks::BinaryGatherer::ImportHybridityMap& imports) -- : imports_(imports) -+ LoaderGenerator::LoaderGenerator(const tasks::BinaryGatherer::ImportHybridityMap& imports, const utils::PathVector& origcmdline) -+ : imports_(imports), sorted_objects_(origcmdline) - { - // - // lookup the loader library, and put it on the link line. -@@ -251,7 +251,7 @@ - for(tasks::BinaryGatherer::ImportHybridityMap::const_iterator it = imports_.begin(); it != imports_.end(); ++it) - { - std::string libraryName = it->first.second.getLibraryName(); -- LoaderWorkingItem& item = items[libraryName]; -+ LoaderWorkingItem& item = items[it->first.first]; - - if(item.name.empty()) - { -@@ -271,7 +271,7 @@ - - for(LoaderWorkingMap::iterator it = items.begin(); it != items.end(); ++it) - { -- std::string libraryName = it->first; -+ std::string libraryName = it->second.name; - LoaderWorkingItem& item = it->second; - unsigned int& indexOfLibNameSym = stringMapping[libraryName]; - -@@ -520,12 +520,17 @@ - // - // generate table entry seperatly, so they are behind each other. - // -- for(LoaderWorkingMap::iterator it = items.begin(); it != items.end(); ++it) -+ for(utils::PathVector::const_iterator olib = sorted_objects_.begin(); olib != sorted_objects_.end(); ++olib) - { -+ LoaderWorkingMap::iterator it = items.find(*olib); -+ -+ if(it == items.end()) -+ continue; -+ - // - // import table now known, so generate library record. - // -- std::string recordName = "$LIB_" + symbolifyName(it->first); -+ std::string recordName = "$LIB_" + symbolifyName(it->second.name); - binary::Symbol& symRecord = hdr.addSymbol(recordName); - sectData.markSymbol(symRecord); - symRecord.setStorageClass(binary::Symbol::ClassStatic); -@@ -551,8 +556,13 @@ - sectData.markSymbol(symLoaderTable); - symLoaderTable.setStorageClass(binary::Symbol::ClassExternal); - -- for(LoaderWorkingMap::iterator it = items.begin(); it != items.end(); ++it) -+ for(utils::PathVector::const_iterator olib = sorted_objects_.begin(); olib != sorted_objects_.end(); ++olib) - { -+ LoaderWorkingMap::iterator it = items.find(*olib); -+ -+ if(it == items.end()) -+ continue; -+ - // - // finally generate a table which contains pointers to all library tables - // -@@ -796,7 +806,12 @@ - binary::Symbol& symImageNameData = hdr.addSymbol("$START__ParityLoaderGeneratedImageName"); - symImageNameData.setStorageClass(binary::Symbol::ClassStatic); - sectRData.markSymbol(symImageNameData); -- sectRData.addData(ctx.getOutputFile().file().c_str(), ctx.getOutputFile().file().length() + 1); -+ if(ctx.getSharedLink()) { -+ std::string imagename = ctx.getOutputFile().file() + ".dll"; -+ sectRData.addData(imagename.c_str(), imagename.length() + 1); -+ } else { -+ sectRData.addData(ctx.getOutputFile().file().c_str(), ctx.getOutputFile().file().length() + 1); -+ } - sectRData.padSection(); - - binary::Symbol& symImageNamePtr = hdr.addSymbol("_ParityLoaderGeneratedImageName"); -@@ -808,6 +823,7 @@ - binary::Symbol& symSubsystem = hdr.addSymbol("_ParityLoaderGeneratedSubsystem"); - symSubsystem.setStorageClass(binary::Symbol::ClassExternal); - sectPtrs.markSymbol(symSubsystem); -+ - // - // WARNING: since the loader cannot use parity::utils, it needs to - // define the subsystem values itself, and this must be kept in sync! -@@ -815,7 +831,19 @@ - int subsys = (int)ctx.getSubsystem(); - sectPtrs.addData(&subsys, sizeof(int)); - -+ binary::Symbol& symRuntimeLinkage = hdr.addSymbol("_ParityLoaderGeneratedRuntimeLinking"); -+ symRuntimeLinkage.setStorageClass(binary::Symbol::ClassExternal); -+ sectPtrs.markSymbol(symRuntimeLinkage); -+ - // -+ // WARNING: this is to be kept in sync loader <-> utils too! -+ // -+ int rtl = (int)ctx.getRuntimeLinkage(); -+ sectPtrs.addData(&rtl, sizeof(int)); -+ -+ utils::Log::verbose("%s runtime linkage is %d (%s)\n", ctx.getOutputFile().file().c_str(), rtl, ctx.printable(ctx.getRuntimeLinkage()).c_str()); -+ -+ // - // now save the object file to disk. - // - utils::MemoryFile mem; -Index: parity.tasks/LoaderGenerator.h -=================================================================== ---- parity.tasks/LoaderGenerator.h (revision 73) -+++ parity.tasks/LoaderGenerator.h (working copy) -@@ -27,6 +27,7 @@ - #include - - #include -+#include - - #include - #include -@@ -38,10 +39,11 @@ - { - class LoaderGenerator { - public: -- LoaderGenerator(const tasks::BinaryGatherer::ImportHybridityMap& imports); -+ LoaderGenerator(const tasks::BinaryGatherer::ImportHybridityMap& imports, const utils::PathVector& origcmdline); - void doWork(); - private: - const tasks::BinaryGatherer::ImportHybridityMap& imports_; -+ const utils::PathVector& sorted_objects_; - - typedef struct { - std::string name; -@@ -55,7 +57,7 @@ - unsigned int tableIndex; - } LoaderWorkingItem; - -- typedef std::map LoaderWorkingMap; -+ typedef std::map LoaderWorkingMap; - }; - } - } -Index: parity.tasks/CollectorOther.cpp -=================================================================== ---- parity.tasks/CollectorOther.cpp (revision 73) -+++ parity.tasks/CollectorOther.cpp (working copy) -@@ -318,6 +318,7 @@ - binary::Symbol::SymbolVector exportedSymbols; - binary::Symbol::SymbolVector staticImports; - tasks::BinaryGatherer::ImportHybridityMap loadedImports; -+ utils::PathVector origObjects = utils::Context::getContext().getObjectsLibraries(); - - try { - tasks::BinaryGatherer gatherer; -@@ -359,7 +360,10 @@ - // code from parity.loader. this means that it must be present - // always, even if it's not required. - // -- threading.run(TaskStubs::runLoaderGenerator, &loadedImports, false); -+ TaskStubs::LoaderGeneratorData data; -+ data.imports = &loadedImports; -+ data.origcmdline = &origObjects; -+ threading.run(TaskStubs::runLoaderGenerator, &data, false); - - // - // The last part finally is linking itself. Before doing this, all -Index: parity.options/TableGnuGcc.cpp -=================================================================== ---- parity.options/TableGnuGcc.cpp (revision 73) -+++ parity.options/TableGnuGcc.cpp (working copy) -@@ -59,6 +59,8 @@ - { "-ansi" ,setAnsiMode }, - { "-Wl,-rpath" ,addRunPath }, // must be before -W to match correctly - { "-Wl,-e" ,setEntryPoint }, // -- " -- -+ { "-Wl,-brtl" ,setRuntimeLinkage }, // -- " -- -+ { "-Wl,-bnortl" ,setRuntimeLinkage }, // -- " -- - { "-Werror" ,setWarningAsError }, // -- " -- - { "-w" ,setWarningLevel }, - { "-W" ,setWarningLevel }, -Index: parity.options/TableGnuLd.cpp -=================================================================== ---- parity.options/TableGnuLd.cpp (revision 73) -+++ parity.options/TableGnuLd.cpp (working copy) -@@ -51,6 +51,8 @@ - { "-subsys" ,setSubsystem }, - { "-rpath" ,addRunPath }, - { "-e" ,setEntryPoint }, -+ { "-brtl" ,setRuntimeLinkage }, -+ { "-bnortl" ,setRuntimeLinkage }, - { "-l" ,addObjectsLibraries }, - { ".lib" ,addObjectsLibraries }, - { ".Lib" ,addObjectsLibraries }, -Index: parity.options/Linker.cpp -=================================================================== ---- parity.options/Linker.cpp (revision 73) -+++ parity.options/Linker.cpp (working copy) -@@ -175,6 +175,18 @@ - return true; - } - -+ bool setRuntimeLinkage(const char* option, const char* argument, bool& used) -+ { -+ if(strstr(option, "no")) -+ utils::Context::getContext().setRuntimeLinkage(utils::RTLDisabled); -+ else { -+ utils::Log::verbose("enabling runtime linkage!\n"); -+ utils::Context::getContext().setRuntimeLinkage(utils::RTLEnabled); -+ } -+ -+ return true; -+ } -+ - } - } - -Index: parity.options/Linker.h -=================================================================== ---- parity.options/Linker.h (revision 73) -+++ parity.options/Linker.h (working copy) -@@ -40,6 +40,7 @@ - bool setSubsystem(const char* option, const char* argument, bool& used); - bool addRunPath(const char* option, const char* argument, bool& used); - bool setEntryPoint(const char* option, const char* argument, bool& used); -+ bool setRuntimeLinkage(const char* option, const char* argument, bool& used); - } - } - -Index: parity.graphical.configurator/Mapping.h -=================================================================== ---- parity.graphical.configurator/Mapping.h (revision 73) -+++ parity.graphical.configurator/Mapping.h (working copy) -@@ -4,56 +4,59 @@ - - struct MappingStruct; - --typedef System::String^ (*DisplayFormatFunction)(parity::utils::Context& ctx); --typedef void (*EditFunction)(const MappingStruct* mapping, parity::utils::Context& ctx); --typedef void (*SaveFunction)(System::IO::TextWriter^ stream, const MappingStruct* mapping, parity::utils::Context& ctx); --typedef bool (*IsDefaultFunction)(parity::utils::Context& ctx); -- --struct MappingStruct --{ -- char* Name; -- char* Type; -- char* Default; -- DisplayFormatFunction Formatter; -- IsDefaultFunction IsDefault; -- EditFunction Edit; -- SaveFunction Save; --}; -- -+typedef System::String^ (*DisplayFormatFunction)(parity::utils::Context& ctx); -+typedef void (*EditFunction)(const MappingStruct* mapping, parity::utils::Context& ctx); -+typedef void (*SaveFunction)(System::IO::TextWriter^ stream, const MappingStruct* mapping, parity::utils::Context& ctx); -+typedef bool (*IsDefaultFunction)(parity::utils::Context& ctx); -+ -+struct MappingStruct -+{ -+ char* Name; -+ char* Type; -+ char* Default; -+ DisplayFormatFunction Formatter; -+ IsDefaultFunction IsDefault; -+ EditFunction Edit; -+ SaveFunction Save; -+}; -+ - extern MappingStruct* SettingMapping; - --System::String^ FormatForDisplay(const bool& val); --System::String^ FormatForDisplay(const long& val); --System::String^ FormatForDisplay(const std::string& val); --System::String^ FormatForDisplay(const parity::utils::Path& val); --System::String^ FormatForDisplay(const parity::utils::DefineMap& val); --System::String^ FormatForDisplay(const parity::utils::PathVector& val); --System::String^ FormatForDisplay(const parity::utils::LanguageType& val); --System::String^ FormatForDisplay(const parity::utils::SubsystemType& val); --System::String^ FormatForDisplay(const parity::utils::ToolchainType& val); --System::String^ FormatForDisplay(const parity::utils::RuntimeType& val); --System::String^ FormatForDisplay(const parity::utils::Color::ColorMode& val); -- --void DisplayEditDialog(const MappingStruct* mapping, bool& val); --void DisplayEditDialog(const MappingStruct* mapping, long& val); --void DisplayEditDialog(const MappingStruct* mapping, std::string& val); --void DisplayEditDialog(const MappingStruct* mapping, parity::utils::Path& val); --void DisplayEditDialog(const MappingStruct* mapping, parity::utils::DefineMap& val); --void DisplayEditDialog(const MappingStruct* mapping, parity::utils::PathVector& val); --void DisplayEditDialog(const MappingStruct* mapping, parity::utils::LanguageType& val); --void DisplayEditDialog(const MappingStruct* mapping, parity::utils::SubsystemType& val); --void DisplayEditDialog(const MappingStruct* mapping, parity::utils::ToolchainType& val); --void DisplayEditDialog(const MappingStruct* mapping, parity::utils::RuntimeType& val); --void DisplayEditDialog(const MappingStruct* mapping, parity::utils::Color::ColorMode& val); -- --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const bool& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const long& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const std::string& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::Path& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::DefineMap& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::PathVector& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::LanguageType& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::SubsystemType& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::ToolchainType& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::RuntimeType& val); --void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::Color::ColorMode& val); -+System::String^ FormatForDisplay(const bool& val); -+System::String^ FormatForDisplay(const long& val); -+System::String^ FormatForDisplay(const std::string& val); -+System::String^ FormatForDisplay(const parity::utils::Path& val); -+System::String^ FormatForDisplay(const parity::utils::DefineMap& val); -+System::String^ FormatForDisplay(const parity::utils::PathVector& val); -+System::String^ FormatForDisplay(const parity::utils::LanguageType& val); -+System::String^ FormatForDisplay(const parity::utils::SubsystemType& val); -+System::String^ FormatForDisplay(const parity::utils::ToolchainType& val); -+System::String^ FormatForDisplay(const parity::utils::RuntimeType& val); -+System::String^ FormatForDisplay(const parity::utils::Color::ColorMode& val); -+System::String^ FormatForDisplay(const parity::utils::RtLinkage& val); -+ -+void DisplayEditDialog(const MappingStruct* mapping, bool& val); -+void DisplayEditDialog(const MappingStruct* mapping, long& val); -+void DisplayEditDialog(const MappingStruct* mapping, std::string& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::Path& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::DefineMap& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::PathVector& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::LanguageType& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::SubsystemType& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::ToolchainType& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::RuntimeType& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::Color::ColorMode& val); -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::RtLinkage& val); -+ -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const bool& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const long& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const std::string& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::Path& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::DefineMap& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::PathVector& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::LanguageType& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::SubsystemType& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::ToolchainType& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::RuntimeType& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::Color::ColorMode& val); -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::RtLinkage& val); -Index: parity.graphical.configurator/Mapping.cpp -=================================================================== ---- parity.graphical.configurator/Mapping.cpp (revision 73) -+++ parity.graphical.configurator/Mapping.cpp (working copy) -@@ -178,6 +178,11 @@ - return "Unknown"; - } - -+System::String^ FormatForDisplay(const parity::utils::RtLinkage& val) -+{ -+ return gcnew String(parity::utils::Context::getContext().printable(val).c_str()); -+} -+ - // - // Edit Dialog functions. - // -@@ -303,6 +308,17 @@ - } - } - -+void DisplayEditDialog(const MappingStruct* mapping, parity::utils::RtLinkage& val) -+{ -+ SimpleStringEditDialog^ dlg = gcnew SimpleStringEditDialog(); -+ dlg->Value = gcnew String(Context::getContext().printable(val).c_str()); -+ -+ if(dlg->ShowDialog() == DialogResult::OK) -+ { -+ Context::getContext().convert(val, Configurator::MarshalSimpleStringToNative(dlg->Value)); -+ } -+} -+ - // - // Saving Functions. - // -@@ -383,3 +399,7 @@ - stream->Write("{0} = {1}\n", gcnew String(mapping->Name), gcnew String(Context::getContext().printable(val).c_str())); - } - -+void SaveSetting(System::IO::TextWriter^ stream, const MappingStruct* mapping, const parity::utils::RtLinkage& val) -+{ -+ stream->Write("{0} = {1}\n", gcnew String(mapping->Name), gcnew String(Context::getContext().printable(val).c_str())); -+} -Index: parity.utils/ContextGen.cpp -=================================================================== ---- parity.utils/ContextGen.cpp (revision 73) -+++ parity.utils/ContextGen.cpp (working copy) -@@ -213,6 +213,16 @@ - throw utils::Exception("cannot determine type of source file: %s\n", ref.c_str()); - } - -+ void ContextGen::convert(RtLinkage& target, const std::string& ref) -+ { -+ if(ref == "enabled" || ref == "1" || ref == "on" || ref == "yes" || ref == "true") -+ target = RTLEnabled; -+ else if(ref == "disabled" || ref == "0" || ref == "off" || ref == "no" || ref == "false") -+ target = RTLDisabled; -+ else -+ target = RTLInherit; -+ } -+ - std::string ContextGen::printable(const long& val) - { - char buf[255]; -@@ -407,6 +417,24 @@ - return ret; - } - -+ std::string ContextGen::printable(const RtLinkage& val) -+ { -+ switch(val) -+ { -+ case RTLEnabled: -+ return "enabled"; -+ break; -+ case RTLDisabled: -+ return "disabled"; -+ break; -+ case RTLInherit: -+ return "inherit"; -+ break; -+ } -+ -+ return "unknown"; -+ } -+ - } - } - -Index: parity.utils/ContextGen.h -=================================================================== ---- parity.utils/ContextGen.h (revision 73) -+++ parity.utils/ContextGen.h (working copy) -@@ -99,6 +99,13 @@ - RuntimeDynamicDebug - } RuntimeType; - -+ typedef enum { -+ RTLDisabled = 0, -+ RTLEnabled = 1, -+ RTLInherit = 2, -+ RTLUnknown = 3 -+ } RtLinkage; -+ - typedef std::map DefineMap; - typedef std::map SourceMap; - typedef std::vector PathVector; -@@ -123,6 +130,7 @@ - void convert(SubsystemType& target, const std::string& ref); - void convert(SourceMap& target, const std::string& ref); - void convert(RuntimeType& target, const std::string& ref); -+ void convert(RtLinkage& target, const std::string& ref); - - std::string printable(const bool& val) { return (val ? "true" : "false"); } - std::string printable(const ToolchainType& val); -@@ -136,6 +144,7 @@ - std::string printable(const SubsystemType& val); - std::string printable(const SourceMap& val); - std::string printable(const RuntimeType& val); -+ std::string printable(const RtLinkage& val); - - bool operator==(const ContextGen& other); - bool operator!=(const ContextGen& other) { return !operator ==(other); } -@@ -224,6 +233,7 @@ - CTX_GETSET (long ,HeapReserve ,10485760 ) /* linker (default: 10MB) */ \ - CTX_GETSET (long ,HeapCommit ,65536 ) /* linker (default: 64KB) */ \ - CTX_GETSET_I (bool ,SharedLink ,false ) /* linker */ \ -+ CTX_GETSET (RtLinkage ,RuntimeLinkage ,RTLInherit ) /* linker */ \ - CTX_GETSET_C (PathVector ,LibraryPaths ,PathVector() ) /* linker */ \ - CTX_GETSET (std::string ,LinkerDefaults ,"/nologo /incremental:no" ) /* linker */ \ - CTX_GETSET (Path ,LinkerExe ,"" ) /* linker */ \ -Index: parity.configurator/Configurator.cpp -=================================================================== ---- parity.configurator/Configurator.cpp (revision 73) -+++ parity.configurator/Configurator.cpp (working copy) -@@ -362,6 +362,11 @@ - target << "# WARNING: this is a runtime only setting, and may not be set by configuration!" << std::endl; - } - -+void saveSetting(std::ostringstream& target, const std::string& name, const RtLinkage& value) -+{ -+ target << "name = " << Context::getContext().printable(value) << std::endl; -+} -+ - void saveConfiguration() - { - std::ostringstream target; -Index: parity.loader/LoaderInit.h -=================================================================== ---- parity.loader/LoaderInit.h (revision 73) -+++ parity.loader/LoaderInit.h (working copy) -@@ -81,15 +81,27 @@ - SubsystemXbox = 14 - } LoaderSubsystemType; - -+typedef enum { -+ RuntimeLinkageDisabled = 0, -+ RuntimeLinkageEnabled = 1, -+ RuntimeLinkageInherit = 2 -+} LoaderRuntimeLinkage; -+ - extern LoaderStatus ParityLoaderInit(); - - // -+// flag wether runtime linking behaviour is to be enabled -+// -+extern int iEnableRTL; -+ -+// - // those are generated by the loader generator. - // - extern LoaderTable ParityLoaderGeneratedTable; - extern const char* ParityLoaderGeneratedRunPath; - extern LoaderSubsystemType ParityLoaderGeneratedSubsystem; - extern const char* ParityLoaderGeneratedImageName; -+extern LoaderRuntimeLinkage ParityLoaderGeneratedRuntimeLinking; - - #endif - -Index: parity.loader/LoaderLazy.c -=================================================================== ---- parity.loader/LoaderLazy.c (revision 73) -+++ parity.loader/LoaderLazy.c (working copy) -@@ -62,17 +62,17 @@ - static PreloadCacheNode* gPreloadLibCache = 0; - static unsigned int gPreloadLibCacheCount = 0; - --static void PreloadCreateCache() -+static void PreloadCreateCache(PreloadCacheNode** cache, unsigned int* count, const char * env) - { - unsigned int szPreload = 0; - -- szPreload = GetEnvironmentVariable("LD_PRELOAD", 0, 0); -+ szPreload = GetEnvironmentVariable(env, 0, 0); - - if(szPreload) { - char * ptrPreload = HeapAlloc(GetProcessHeap(), 0, szPreload); - -- if(GetEnvironmentVariable("LD_PRELOAD", ptrPreload, szPreload) == 0) { -- LogWarning("cannot get environment variable LD_PRELOAD!\n"); -+ if(GetEnvironmentVariable(env, ptrPreload, szPreload) == 0) { -+ LogWarning("cannot get environment variable %s!\n", env); - } else { - char* start = ptrPreload; - char* end = ptrPreload; -@@ -83,29 +83,29 @@ - { - int isSep = 0; - -- while(*end != ' ' && *end != '\0') -+ while(*end != ' ' && *end != ',' && *end != '\0') - ++end; - -- if(*end == ' ') -+ if(*end != '\0') - { - isSep = 1; - *end = '\0'; - ++end; - } - -- if(!gPreloadLibCache) -- gPreloadLibCache = HeapAlloc(GetProcessHeap(), 0, sizeof(PreloadCacheNode)); -+ if(!*cache) -+ *cache = HeapAlloc(GetProcessHeap(), 0, sizeof(PreloadCacheNode)); - else -- gPreloadLibCache = HeapReAlloc(GetProcessHeap(), 0, gPreloadLibCache, sizeof(PreloadCacheNode) * (gPreloadLibCacheCount + 1)); -+ *cache = HeapReAlloc(GetProcessHeap(), 0, *cache, sizeof(PreloadCacheNode) * (*count + 1)); - -- if(!gPreloadLibCache) -+ if(!*cache) - { -- LogWarning("cannot allocate %d bytes for preload cache, this will break preloading!\n", sizeof(PreloadCacheNode) * (gPreloadLibCacheCount + 1)); -+ LogWarning("cannot allocate %d bytes for cache, this will break preloading!\n", sizeof(PreloadCacheNode) * (*count + 1)); - LoaderWriteLastWindowsError(); -- gPreloadLibCacheCount = 0; -+ *count = 0; - } else { -- gPreloadLibCache[gPreloadLibCacheCount].name = start; -- ++gPreloadLibCacheCount; -+ (*cache)[*count].name = start; -+ ++(*count); - } - - start = end; -@@ -117,6 +117,55 @@ - } - } - -+void ParityLoaderRuntimeLink(const LibraryItem* library) -+{ -+ unsigned int i; -+ -+ static PreloadCacheNode* lRTLLibCache = 0; -+ static unsigned int lRTLLibCacheCount = 0; -+ -+ if(GetEnvironmentVariable("LD_RTL_LIBS", 0, 0) == 0) -+ return; -+ -+ if(!iEnableRTL) -+ return; -+ -+ PreloadCreateCache(&lRTLLibCache, &lRTLLibCacheCount, "LD_RTL_LIBS"); -+ -+ if(lRTLLibCacheCount == 0) -+ return; -+ -+ LogDebug("runtime linking %s\n", library->name); -+ -+ for(i = 0; i < lRTLLibCacheCount; ++i) -+ { -+ void * handle = LoaderLibraryGetHandle(lRTLLibCache[i].name, 1); -+ -+ ImportItem* item = library->imports; -+ -+ while(item->name) -+ { -+ void* symbol = 0; -+ // -+ // try loading item from current preload library. -+ // -+ -+ if(item->ordinal != 0) -+ symbol = (void*)GetProcAddress((HMODULE)handle, (char*)item->ordinal); -+ else -+ symbol = (void*)GetProcAddress((HMODULE)handle, item->name); -+ -+ if(symbol) -+ { -+ LogDebug(" * %s: %s (0x%x).\n", lRTLLibCache[i].name, item->name, symbol); -+ item->import = symbol; -+ } -+ -+ ++item; -+ } -+ } -+} -+ - void ParityLoaderPreloadSymbols() - { - unsigned int i; -@@ -125,8 +174,11 @@ - return; - - if(!gPreloadLibCache) -- PreloadCreateCache(); -+ PreloadCreateCache(&gPreloadLibCache, &gPreloadLibCacheCount, "LD_PRELOAD"); - -+ if(gPreloadLibCacheCount == 0) -+ return; -+ - LogDebug("trying to preload symbols from %d preload libraries.\n", gPreloadLibCacheCount); - - for(i = 0; i < gPreloadLibCacheCount; ++i) -Index: parity.loader/LoaderInit.c -=================================================================== ---- parity.loader/LoaderInit.c (revision 73) -+++ parity.loader/LoaderInit.c (working copy) -@@ -28,6 +28,29 @@ - #include - #include - -+int iEnableRTL = 0; -+ -+static char * ParityLoaderGetMangledRTLName(const char* name) -+{ -+ static char buffer[256]; -+ int i = 0; -+ -+ lstrcpy(buffer, "LD_RTL_ENABLE_"); -+ -+ for(i = lstrlen(buffer); *name != '\0'; ++name) -+ { -+ char c = *name; -+ if((c >= 0x30 && c <= 0x39 || c >= 0x41 && c <= 0x5A -+ || c >= 0x61 && c <= 0x7A || c == '_')) -+ buffer[i++] = c; -+ else -+ buffer[i++] = '_'; -+ } -+ -+ buffer[i] = '\0'; -+ return buffer; -+} -+ - LoaderStatus ParityLoaderInit() - { - int isBindNow = 0; -@@ -37,6 +60,34 @@ - - LogDebug("=== ParityLoader intializing for %s. ===\n", ParityLoaderGeneratedImageName); - -+ switch(ParityLoaderGeneratedRuntimeLinking) -+ { -+ case RuntimeLinkageDisabled: -+ iEnableRTL = 0; -+ break; -+ case RuntimeLinkageEnabled: -+ iEnableRTL = 1; -+ break; -+ case RuntimeLinkageInherit: -+ { -+ char * pcEnvVar = ParityLoaderGetMangledRTLName(ParityLoaderGeneratedImageName); -+ LogDebug("inheriting, trying %s\n", pcEnvVar); -+ -+ if(!GetEnvironmentVariable(pcEnvVar, 0, 0)) { -+ LogDebug("inheriting, trying LD_RTL\n"); -+ if(GetEnvironmentVariable("LD_RTL", 0, 0)) { -+ iEnableRTL = 1; -+ } -+ } else { -+ iEnableRTL = 1; -+ } -+ } -+ -+ break; -+ } -+ -+ LogDebug("runtime linking is %s\n", iEnableRTL ? "enabled" : "disabled"); -+ - ParityLoaderPreloadSymbols(); - - // -@@ -51,13 +102,38 @@ - int cntLazy = 0; - void* handle = 0; - ImportItem* import = libraries->imports; -+ char* pcRtlVar = iEnableRTL ? ParityLoaderGetMangledRTLName(libraries->name) : 0; - - // -+ // set runtime linkage flags accordingly... -+ // -+ if(pcRtlVar) -+ { -+ LogDebug("activating runtime linkage for %s (%s)\n", libraries->name, pcRtlVar); -+ -+ if(!SetEnvironmentVariable(pcRtlVar, "on")) -+ { -+ LogWarning("cannot set environment for runtime linkage (target %s)\n!", ParityLoaderGeneratedImageName); -+ } -+ -+ // -+ // Runtime link allready loaded stuff from children -+ // -+ ParityLoaderRuntimeLink(libraries); -+ } -+ -+ // - // load library handle. - // - handle = LoaderLibraryGetHandle(libraries->name, 1); - - // -+ // unset runtime linkage flags. -+ // -+ if(pcRtlVar) -+ SetEnvironmentVariable(pcRtlVar, 0); -+ -+ // - // load all imports for that library. - // - while(import->name) -Index: parity.loader/LoaderLazy.h -=================================================================== ---- parity.loader/LoaderLazy.h (revision 73) -+++ parity.loader/LoaderLazy.h (working copy) -@@ -26,6 +26,7 @@ - #include "LoaderInit.h" - - extern void ParityLoaderLazyLoadSymbol(ImportItem* item); -+extern void ParityLoaderRuntimeLink(const LibraryItem* library); - extern void ParityLoaderPreloadSymbols(); - - #endif -Index: parity.loader/LoaderLibrary.c -=================================================================== ---- parity.loader/LoaderLibrary.c (revision 73) -+++ parity.loader/LoaderLibrary.c (working copy) -@@ -246,6 +246,48 @@ - - if(handle) { - LibAddToCache(name, handle); -+ -+ if(iEnableRTL) -+ { -+ // Add this library to LD_PRELOAD, so that all children -+ // get my symbols... -+ -+ int iLdPreloadSize = GetEnvironmentVariable("LD_RTL_LIBS", 0, 0); -+ -+ if(!iLdPreloadSize) -+ { -+ if(GetLastError() != ERROR_ENVVAR_NOT_FOUND) { -+ LogWarning("cannot read environment for runtime linking!\n"); -+ ExitProcess(1); -+ } -+ -+ if(!SetEnvironmentVariable("LD_RTL_LIBS", name)) { -+ LogWarning("cannot write environment for runtime linking!\n"); -+ ExitProcess(1); -+ } -+ } else { -+ int iBufSize = iLdPreloadSize + lstrlen(name) + 2; -+ char* pcBuffer = HeapAlloc(GetProcessHeap(), 0, iBufSize); -+ -+ if(!pcBuffer) { -+ LogWarning("cannot allocate buffer for runtime linking\n"); -+ ExitProcess(1); -+ } -+ -+ if(!GetEnvironmentVariable("LD_RTL_LIBS", pcBuffer, iBufSize)) { -+ LogWarning("cannot read existing environment for runtime linking!\n"); -+ ExitProcess(1); -+ } -+ -+ lstrcat(pcBuffer, " "); -+ lstrcat(pcBuffer, name); -+ -+ if(!SetEnvironmentVariable("LD_RTL_LIBS", pcBuffer)) { -+ LogWarning("cannot write environment for runtime linking!\n"); -+ } -+ } -+ } -+ - return handle; - } else if(strict) { - unsigned int i; -Index: parity.inspector/Inspector.cpp -=================================================================== ---- parity.inspector/Inspector.cpp (revision 73) -+++ parity.inspector/Inspector.cpp (working copy) -@@ -103,6 +103,7 @@ - - const char* genImageName = 0; - utils::SubsystemType genSubsystem = utils::SubsystemUnknown; -+ utils::RtLinkage genLinkage = utils::RTLUnknown; - utils::PathVector genRunPaths; - InspectorLibraryVector genLibs; - bool genSectionFound = false; -@@ -122,6 +123,7 @@ - genRunPathPtr = (const char*)img.getHeader().getPointerFromVA(pointers->rpaths); - genTablePtr = (unsigned int*)img.getHeader().getPointerFromVA(pointers->table); - genSubsystem = pointers->subsystem; -+ genLinkage = pointers->linkage; - - if(*genTablePtr) - genLibs = InspectorLayoutToLibraries((InspectorLibrariesPointerLayoutVA*)img.getHeader().getPointerFromVA(*genTablePtr), img.getHeader()); -@@ -137,6 +139,7 @@ - utils::Log::verbose("%s: image has no import dependencies!\n", pth.file().c_str()); - - utils::Log::verbose("%s: found subsystem type %d (%s)\n", pth.file().c_str(), genSubsystem, utils::Context::getContext().printable(genSubsystem).c_str()); -+ utils::Log::verbose("%s: image runtime linkage: %d (%s)\n", pth.file().c_str(), genLinkage, utils::Context::getContext().printable(genLinkage).c_str()); - - break; - } -Index: parity.inspector/Inspector.h -=================================================================== ---- parity.inspector/Inspector.h (revision 73) -+++ parity.inspector/Inspector.h (working copy) -@@ -87,6 +87,7 @@ - unsigned int rpaths; - unsigned int name; - utils::SubsystemType subsystem; -+ utils::RtLinkage linkage; - } InspectorPointerLayoutVA; - - #if defined(_WIN32) || (defined(__INTERIX) && (!defined(__GNUC__) || __GNUC__ == 3 )) diff --git a/parity.patches/vista-cc89-nostrict.patch b/parity.patches/vista-cc89-nostrict.patch deleted file mode 100755 index 46dc6e3..0000000 --- a/parity.patches/vista-cc89-nostrict.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /bin/cc89.orig Fri Sep 7 17:33:41 2007 -+++ /bin/cc89 Fri Sep 7 17:32:44 2007 -@@ -822,7 +822,7 @@ - # now gather up the operands - # - while true ; do -- if [ "$progname" = "cc" ]; then -+ if [ "$progname" = "cc" -o "$progname" = "cc89" ]; then - # - # special case for 'cc': - # it can handle certain options anywhere in the command line From 4502cc2b8093b405f2e023a3aea0143f82381b42 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Tue, 28 Jan 2020 17:22:12 +0100 Subject: [PATCH 02/15] drop MSVC solution file, parity is designed for Cygwin now Although there is no good reason not to work as MSVC project, it is very unlikely that anything does actually work there - and we have git logs. --- Confix2.dir | 1 - parity.sln | 292 ---------------------------------------------------- 2 files changed, 293 deletions(-) delete mode 100755 parity.sln diff --git a/Confix2.dir b/Confix2.dir index d27ad32..4567833 100755 --- a/Confix2.dir +++ b/Confix2.dir @@ -1,5 +1,4 @@ IGNORE_FILE('config.h') -ADD_EXTRA_DIST('parity.sln') ADD_EXTRA_DIST('ReleaseNotes.txt') PARITYsupported_archs = '' diff --git a/parity.sln b/parity.sln deleted file mode 100755 index 780ed48..0000000 --- a/parity.sln +++ /dev/null @@ -1,292 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{244C46AE-9C21-4DA8-A4FD-DD768B63FC76}" - ProjectSection(SolutionItems) = preProject - Confix2.dir = Confix2.dir - Confix2.pkg = Confix2.pkg - COPYING.LESSER = COPYING.LESSER - parity.conf.in = parity.conf.in - parity.conf.psx.in = parity.conf.psx.in - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.options", "parity.options\parity.options.vcproj", "{47113F7B-E0B6-4522-943A-FA1AC30CD860}" - ProjectSection(ProjectDependencies) = postProject - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} = {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.binary", "parity.binary\parity.binary.vcproj", "{9FA921B4-3A01-46D0-9E14-1A8A10EB3639}" - ProjectSection(ProjectDependencies) = postProject - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.utils", "parity.utils\parity.utils.vcproj", "{28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.test", "parity.test\parity.test.vcproj", "{C52B968C-33C8-4492-B983-E451B0AD46CB}" - ProjectSection(ProjectDependencies) = postProject - {BC08C13E-84C0-4158-9482-EA26D19BB7D6} = {BC08C13E-84C0-4158-9482-EA26D19BB7D6} - {47113F7B-E0B6-4522-943A-FA1AC30CD860} = {47113F7B-E0B6-4522-943A-FA1AC30CD860} - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} = {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.configurator", "parity.configurator\parity.configurator.vcproj", "{273F03CF-CA4C-42C7-AFE2-2A459E750F0C}" - ProjectSection(ProjectDependencies) = postProject - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} = {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.tasks", "parity.tasks\parity.tasks.vcproj", "{BC08C13E-84C0-4158-9482-EA26D19BB7D6}" - ProjectSection(ProjectDependencies) = postProject - {47113F7B-E0B6-4522-943A-FA1AC30CD860} = {47113F7B-E0B6-4522-943A-FA1AC30CD860} - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} = {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.ms.cl", "parity.ms.cl\parity.ms.cl.vcproj", "{48EDFDB5-5D76-41EA-B175-2E0EB98E003C}" - ProjectSection(ProjectDependencies) = postProject - {BC08C13E-84C0-4158-9482-EA26D19BB7D6} = {BC08C13E-84C0-4158-9482-EA26D19BB7D6} - {47113F7B-E0B6-4522-943A-FA1AC30CD860} = {47113F7B-E0B6-4522-943A-FA1AC30CD860} - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.ms.link", "parity.ms.link\parity.ms.link.vcproj", "{F717FB01-4598-440D-A953-8FCAADD5DC9B}" - ProjectSection(ProjectDependencies) = postProject - {BC08C13E-84C0-4158-9482-EA26D19BB7D6} = {BC08C13E-84C0-4158-9482-EA26D19BB7D6} - {47113F7B-E0B6-4522-943A-FA1AC30CD860} = {47113F7B-E0B6-4522-943A-FA1AC30CD860} - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.gnu.gcc", "parity.gnu.gcc\parity.gnu.gcc.vcproj", "{3AA09E52-EA50-47A8-8064-2894C47143FA}" - ProjectSection(ProjectDependencies) = postProject - {BC08C13E-84C0-4158-9482-EA26D19BB7D6} = {BC08C13E-84C0-4158-9482-EA26D19BB7D6} - {47113F7B-E0B6-4522-943A-FA1AC30CD860} = {47113F7B-E0B6-4522-943A-FA1AC30CD860} - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.gnu.ld", "parity.gnu.ld\parity.gnu.ld.vcproj", "{C918CBBE-B7AA-4792-9C90-96AA6CFCB079}" - ProjectSection(ProjectDependencies) = postProject - {BC08C13E-84C0-4158-9482-EA26D19BB7D6} = {BC08C13E-84C0-4158-9482-EA26D19BB7D6} - {47113F7B-E0B6-4522-943A-FA1AC30CD860} = {47113F7B-E0B6-4522-943A-FA1AC30CD860} - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.loader", "parity.loader\parity.loader.vcproj", "{6A83A392-CC1A-43BB-B453-31416D0A1215}" - ProjectSection(ProjectDependencies) = postProject - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2} = {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.runtime", "parity.runtime\parity.runtime.vcproj", "{3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.inspector", "parity.inspector\parity.inspector.vcproj", "{AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}" - ProjectSection(ProjectDependencies) = postProject - {47113F7B-E0B6-4522-943A-FA1AC30CD860} = {47113F7B-E0B6-4522-943A-FA1AC30CD860} - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} = {9FA921B4-3A01-46D0-9E14-1A8A10EB3639} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.statistics", "parity.statistics\parity.statistics.vcproj", "{B33A342D-43F0-4DE0-973B-C45B3E6803EC}" - ProjectSection(ProjectDependencies) = postProject - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.graphical.configurator", "parity.graphical.configurator\parity.graphical.configurator.vcproj", "{86945419-B17E-4C64-BBD7-7797D5C671DB}" - ProjectSection(ProjectDependencies) = postProject - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} = {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parity.diagnostic", "parity.diagnostic\parity.diagnostic.vcproj", "{D1F75BAA-90B6-414F-B841-0375AECB14BA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "parity.doc", "parity.doc", "{FA4388DC-A374-4EE2-9752-2F8A05A8C3CC}" - ProjectSection(SolutionItems) = preProject - parity.doc\configuration.txt = parity.doc\configuration.txt - parity.doc\environment.txt = parity.doc\environment.txt - parity.doc\features.lyx = parity.doc\features.lyx - parity.doc\options.txt = parity.doc\options.txt - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Managed Debug|Win32 = Managed Debug|Win32 - Managed Release|Win32 = Managed Release|Win32 - Native Debug|Win32 = Native Debug|Win32 - Native Release|Win32 = Native Release|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Debug|Win32.ActiveCfg = Debug|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Debug|Win32.Build.0 = Debug|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Native Debug|Win32.Build.0 = Debug|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Native Release|Win32.ActiveCfg = Release|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Native Release|Win32.Build.0 = Release|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Release|Win32.ActiveCfg = Release|Win32 - {47113F7B-E0B6-4522-943A-FA1AC30CD860}.Release|Win32.Build.0 = Release|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Debug|Win32.ActiveCfg = Debug|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Debug|Win32.Build.0 = Debug|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Native Debug|Win32.Build.0 = Debug|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Native Release|Win32.ActiveCfg = Release|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Native Release|Win32.Build.0 = Release|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Release|Win32.ActiveCfg = Release|Win32 - {9FA921B4-3A01-46D0-9E14-1A8A10EB3639}.Release|Win32.Build.0 = Release|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Debug|Win32.ActiveCfg = Debug|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Debug|Win32.Build.0 = Debug|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Managed Debug|Win32.Build.0 = Managed Debug|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Managed Release|Win32.Build.0 = Managed Release|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Native Debug|Win32.Build.0 = Debug|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Native Release|Win32.ActiveCfg = Release|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Native Release|Win32.Build.0 = Release|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Release|Win32.ActiveCfg = Release|Win32 - {28A9C092-E0E8-4E5E-A5BA-237BDB2BB159}.Release|Win32.Build.0 = Release|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Debug|Win32.Build.0 = Debug|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Native Debug|Win32.Build.0 = Debug|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Native Release|Win32.ActiveCfg = Release|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Native Release|Win32.Build.0 = Release|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Release|Win32.ActiveCfg = Release|Win32 - {C52B968C-33C8-4492-B983-E451B0AD46CB}.Release|Win32.Build.0 = Release|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Debug|Win32.ActiveCfg = Debug|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Debug|Win32.Build.0 = Debug|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Native Debug|Win32.Build.0 = Debug|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Native Release|Win32.ActiveCfg = Release|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Native Release|Win32.Build.0 = Release|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Release|Win32.ActiveCfg = Release|Win32 - {273F03CF-CA4C-42C7-AFE2-2A459E750F0C}.Release|Win32.Build.0 = Release|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Debug|Win32.Build.0 = Debug|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Native Debug|Win32.Build.0 = Debug|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Native Release|Win32.ActiveCfg = Release|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Native Release|Win32.Build.0 = Release|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Release|Win32.ActiveCfg = Release|Win32 - {BC08C13E-84C0-4158-9482-EA26D19BB7D6}.Release|Win32.Build.0 = Release|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Debug|Win32.ActiveCfg = Debug|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Debug|Win32.Build.0 = Debug|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Native Debug|Win32.Build.0 = Debug|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Native Release|Win32.ActiveCfg = Release|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Native Release|Win32.Build.0 = Release|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Release|Win32.ActiveCfg = Release|Win32 - {48EDFDB5-5D76-41EA-B175-2E0EB98E003C}.Release|Win32.Build.0 = Release|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Debug|Win32.ActiveCfg = Debug|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Debug|Win32.Build.0 = Debug|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Native Debug|Win32.Build.0 = Debug|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Native Release|Win32.ActiveCfg = Release|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Native Release|Win32.Build.0 = Release|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Release|Win32.ActiveCfg = Release|Win32 - {F717FB01-4598-440D-A953-8FCAADD5DC9B}.Release|Win32.Build.0 = Release|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Debug|Win32.ActiveCfg = Debug|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Debug|Win32.Build.0 = Debug|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Native Debug|Win32.Build.0 = Debug|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Native Release|Win32.ActiveCfg = Release|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Native Release|Win32.Build.0 = Release|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Release|Win32.ActiveCfg = Release|Win32 - {3AA09E52-EA50-47A8-8064-2894C47143FA}.Release|Win32.Build.0 = Release|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Debug|Win32.ActiveCfg = Debug|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Debug|Win32.Build.0 = Debug|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Native Debug|Win32.Build.0 = Debug|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Native Release|Win32.ActiveCfg = Release|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Native Release|Win32.Build.0 = Release|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Release|Win32.ActiveCfg = Release|Win32 - {C918CBBE-B7AA-4792-9C90-96AA6CFCB079}.Release|Win32.Build.0 = Release|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Debug|Win32.ActiveCfg = Debug|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Debug|Win32.Build.0 = Debug|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Native Debug|Win32.Build.0 = Debug|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Native Release|Win32.ActiveCfg = Release|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Native Release|Win32.Build.0 = Release|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Release|Win32.ActiveCfg = Release|Win32 - {6A83A392-CC1A-43BB-B453-31416D0A1215}.Release|Win32.Build.0 = Release|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Debug|Win32.ActiveCfg = Debug|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Debug|Win32.Build.0 = Debug|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Native Debug|Win32.Build.0 = Debug|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Native Release|Win32.ActiveCfg = Release|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Native Release|Win32.Build.0 = Release|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Release|Win32.ActiveCfg = Release|Win32 - {3D03E8FC-8899-4F31-BDFD-FCF51661F7D2}.Release|Win32.Build.0 = Release|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Debug|Win32.Build.0 = Debug|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Native Debug|Win32.Build.0 = Debug|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Native Release|Win32.ActiveCfg = Release|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Native Release|Win32.Build.0 = Release|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Release|Win32.ActiveCfg = Release|Win32 - {AF5B4642-A02D-4D38-BEE6-CCEC55A0ED87}.Release|Win32.Build.0 = Release|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Debug|Win32.ActiveCfg = Debug|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Debug|Win32.Build.0 = Debug|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Native Debug|Win32.Build.0 = Debug|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Native Release|Win32.ActiveCfg = Release|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Native Release|Win32.Build.0 = Release|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Release|Win32.ActiveCfg = Release|Win32 - {B33A342D-43F0-4DE0-973B-C45B3E6803EC}.Release|Win32.Build.0 = Release|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Debug|Win32.ActiveCfg = Debug|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Debug|Win32.Build.0 = Debug|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Managed Debug|Win32.ActiveCfg = Managed Debug|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Managed Debug|Win32.Build.0 = Managed Debug|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Managed Release|Win32.ActiveCfg = Managed Release|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Managed Release|Win32.Build.0 = Managed Release|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Native Release|Win32.ActiveCfg = Release|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Release|Win32.ActiveCfg = Release|Win32 - {86945419-B17E-4C64-BBD7-7797D5C671DB}.Release|Win32.Build.0 = Release|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Debug|Win32.ActiveCfg = Debug|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Debug|Win32.Build.0 = Debug|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Managed Debug|Win32.ActiveCfg = Debug|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Managed Release|Win32.ActiveCfg = Release|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Native Debug|Win32.ActiveCfg = Debug|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Native Debug|Win32.Build.0 = Debug|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Native Release|Win32.ActiveCfg = Release|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Native Release|Win32.Build.0 = Release|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Release|Win32.ActiveCfg = Release|Win32 - {D1F75BAA-90B6-414F-B841-0375AECB14BA}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {FA4388DC-A374-4EE2-9752-2F8A05A8C3CC} = {244C46AE-9C21-4DA8-A4FD-DD768B63FC76} - EndGlobalSection - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection -EndGlobal From d2d865efaab438aee107c80d11d9eb10ea37c3c8 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Wed, 29 Jan 2020 16:30:05 +0100 Subject: [PATCH 03/15] add ReleaseNotes for parity-2.0.0 --- ReleaseNotes.txt | 115 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 111 insertions(+), 4 deletions(-) diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index e2007b5..d075359 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,10 +1,117 @@ -parity is an open source project who's goal it is to ease porting applications from UNIX-like systems to Windows. It relies on the presence of a UNIX Layer for Windows such as Interix or Cygwin. parity is most tested on Microsofts Subsystem for UNIX-based Applications, so it will work there best. +parity is an open source project who's goal is to ease porting applications +from UNIX-like systems to Windows. It relies on the presence of a UNIX Layer +for Windows such as Interix or Cygwin. parity is most tested on x86_64 Cygwin, +so it will work there best. + +parity uses the Microsoft Toolchain - like cl.exe, link.exe, etc. - to mimic a +GCC like interface, while really compiling natively for Windows. This results +in pure and native Windows Libraries and Executables, which can be mixed +freely with any existing Software pieces. + +The most effort has been put into shared library handling, which now behaves +nearly the same as on common UNIX-like systems. There also is a patch for +libtool, which makes it know about parity (which passes almost all tests of +the libtool test-suite). Advanced Features like a working -rpath option have +been added to improve the handling of DLLs on Windows, but they were not +ported to x86_64 MSVC, and were not really necessary, so these have been +removed in parity 2.0.0 release. + +parity ships with a little runtime enhancement library called parity.runtime. +This library abstracts away the need to take care of what kind of paths are +used. This means you can now give a UNIX-style path to an executable built +with parity, and it will understand it. Previously this was not possible, and +all Windows executables would need Windows-style paths to work. + +parity 2.0.0 +------------ + +Support up to Visual Studio 2019 (MSVC 16), and Visual Studio Build Tools. + +Support x86_64 (64bit) MSVC Toolchain. + +Switch to Cygwin as build system, Interix and MSVC are unlikely to still work. + +Use host triplet to identify the local MSVC Toolchain arch and version to be +used, and also to distinguish the MSVC runtime library variant. For example: + 32bit (x86) dynamic multithreaded runtime: i686-msvc16-winnt + 32bit (x86) static multithreaded runtime: i686-libcmt-winnt + 64bit (x64) dynamic multithreaded debug runtime: x86_64-msvcd16-winnt + 64bit (x64) static multithreaded debug runtime: x86_64-libcmtd16-winnt + +Create symbolic links to MSVC import libraries, to avoid path components being +invalid as shell string (containing blanks or parentheses), for when the 8dot3 +filename generation is disabled on the underlying file system. + +Identify available Visual Studio or Build Tools instances using the registry +(pre VC15) or vswhere.exe (since VC15) rather than environment variables. + +Provide environment values to be used when using MSVC toolchain without +parity, using the "parity-setup --get-environ i686-msvc16-winnt" command. + +Disable concept of default MSVC versions, is hard to maintain. You always have +to use an MSVC version as part of the CHOST value. + +Toolchain wrappers are installed as real executables, so the can run even from +within native Win32 build systems. + +Support binary packaging of parity (using DESTDIR). Compiling the runtime libs +requiring local MSVC is done using the new parity-setup script after install. + +Provide more POSIX/MinGW based wrappers: cpp, nm, strip (as noop), windres. + +Provide more MSVC based wrappers (cmd, dumpbin, lib, nmake, rc), for build +systems that know about the MS toolchain when available via env vars. + +Provide libtool patches, creating NAME.lib as the import library along +NAME.dll, and creating libNAME.lib as the static library. This implies +searching for NAME.lib upon the -lNAME linker option. + +parity.runtime: Stop switching stdio to binmode, almost everyone does expect +and can handle textmode with native winnt programs these days. + +parity.runtime: Try to run cygpath from PATH for path conversion rather than +trying to dynamically load cygwin1.dll. + +parity.runtime: Provide stdint.h, not available in older MSVC versions. + +parity.runtime: Provide stdbool.h, not available before VS 2012. + +parity.runtime: Provide stdarg.h, lacks va_copy() before VS 2012. + +parity.runtime: Switch to StackWalk64 API when creating a backtrace. + +parity.runtime: Have pid_t of type int, to allow for using pthreads4w +(https://sourceforge.net/projects/pthreads4w/). + +parity.runtime: Provide clock_gettime(), wrapping timespec_get(). + +parity.loader: Stop caching dll handles. Provide dlclose() instead. + +parity.gnu.gcc: Support the -include file option. + +parity.gnu.gcc: Support --define, --undefine options. + +parity.gnu.gcc: Distinguish -Dmacro (value 1) from -Dmacro= (empty value). + +parity.gnu.gcc: Distinguish --version from -v compiler option. + +parity.gnu.gcc: Support -dumpmachine, -dumpversion, -print-prog-name, +-print-search-dirs commandline options. + +parity.gnu.gcc: Improve support for assembly (.S) files. + +parity.gnu.ld: Support Module Definition (.def) files when linking. + +parity.gnu.ld: Support -Wl,--out-implib linker flag. + +parity.gnu.ld: Upon -lNAME, search for NAME.dll.lib, as created by MinGW. -parity uses Microsoft Tools - like cl.exe, link.exe, etc. - to mimic a GCC like interface, while really compiling natively for Windows. This results in pure and native Windows Libraries and Executables, which can be mixed freely with any existing Software pieces. +parity.gnu.as: Relax from /Cp to /Cx assembler (ml.exe) flag. -The most effort has been put into shared library handling, which now behaves nearly the same as on common UNIX-like systems. There also is a patch for libtool, which makes it know about parity (which passes all tests of the libtool test-suite). Advanced Features like a working -rpath option have been added to improve the handling of DLLs on Windows. +parity.gnu.as: Run C preprocessor before assembling, the preprocessor +available within ml.exe uses a different syntax. -parity ships with a little runtime enhancement library called parity.runtime. This library abstracts away the need to take care of what kind of paths are used. This means you can now give a UNIX-style path to an executable built with parity, and it will understand it. Previously this was not possible, and all Windows executables would need Windows-style paths to work. +parity.ms.cl: Distinguish /c from /cygdrive/path compiler arguments. parity 1.3.0 ------------ From b88a152c4c157961b14a66a995275cf3a161e3d5 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Wed, 29 Jan 2020 16:35:19 +0100 Subject: [PATCH 04/15] update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17d27d5..b81ada5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ parity ====== -Parity is a utility to compile native Windows executables and shared libraries using the Visual Studio compiler, from within a POSIX build environment like Microsoft SUA or Cygwin, providing a GCC like frontend. It provides various features, not available on Windows normally (runpaths, preloading, etc). +Parity is a utility to compile native Windows executables and shared libraries using the Visual Studio compiler, from within a POSIX build environment like Cygwin, providing a GCC like frontend, plus some runtime functions known from the POSIX world. Beyond that, the native Win32 programs built with parity are potentially able to deal with POSIX style path names. Older versions of this project can be found here: https://sourceforge.net/projects/parity/ From f50abccd305e9c67a97c120faae99dc40a4d4fe3 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Mon, 10 Feb 2020 13:24:04 +0100 Subject: [PATCH 05/15] use chost to name the config dirs To simplify splitting the installation packages into per CHOST packages, use CHOST as configuration directory names rather than some short names. --- parity.setup/parity-environment.sh.in | 22 +++++----- parity.setup/parity-setup.in | 63 +++++++++++++++------------ parity.tasks/CollectorOther.cpp | 12 ++--- 3 files changed, 54 insertions(+), 43 deletions(-) diff --git a/parity.setup/parity-environment.sh.in b/parity.setup/parity-environment.sh.in index c86503b..f5607d4 100644 --- a/parity.setup/parity-environment.sh.in +++ b/parity.setup/parity-environment.sh.in @@ -14,10 +14,10 @@ while test "${__parityenv_arg#*-}" != "${__parityenv_arg}" do case ${__parityenv_arg} in x86_64-*) - __parityenv_arch=x64 + __parityenv_arch=x86_64 ;; i?86-*) - __parityenv_arch=x86 + __parityenv_arch=i686 ;; msvc*|libcmt*) case ${__parityenv_arg} in @@ -49,10 +49,10 @@ do __parityenv_confdir=${__parityenv_arg#-mparityconfdir=} ;; -m32) - __parityenv_arch=x86 + __parityenv_arch=i686 ;; -m64) - __parityenv_arch=x64 + __parityenv_arch=x86_64 ;; -mmsvc*) __parityenv_crtspec=-msvc @@ -70,23 +70,25 @@ done set -- "${__parityenv_args[@]}" -if [[ -r ${__parityenv_confdir}/${__parityenv_arch}${__parityenv_crtspec}${__parityenv_verspec}/parity.sh ]] +__parityenv_chost="${__parityenv_arch}${__parityenv_crtspec}${__parityenv_verspec}-winnt" + +if [[ -r ${__parityenv_confdir}/${__parityenv_chost}/parity.sh ]] then - __parityenv_confdir="${__parityenv_confdir}/${__parityenv_arch}${__parityenv_crtspec}${__parityenv_verspec}" + __parityenv_confdir="${__parityenv_confdir}/${__parityenv_chost}" fi if [[ -r "${__parityenv_confdir}/parity.sh" ]] then if . "${__parityenv_confdir}/parity.sh" then - unset __parityenv_confdir __parityenv_args __parityenv_arg __parityenv_arch __parityenv_verspec __parityenv_crtspec + unset __parityenv_confdir __parityenv_args __parityenv_arg __parityenv_arch __parityenv_verspec __parityenv_crtspec __parityenv_chost true else - unset __parityenv_confdir __parityenv_args __parityenv_arg __parityenv_arch __parityenv_verspec __parityenv_crtspec + unset __parityenv_confdir __parityenv_args __parityenv_arg __parityenv_arch __parityenv_verspec __parityenv_crtspec __parityenv_chost false fi else - echo "Invalid MSVC version specified (${__parityenv_arch}${__parityenv_crtspec}${__parityenv_verspec})." >&2 - unset __parityenv_confdir __parityenv_args __parityenv_arg __parityenv_arch __parityenv_verspec __parityenv_crtspec + echo "Invalid MSVC version specified (${__parityenv_chost})." >&2 + unset __parityenv_confdir __parityenv_args __parityenv_arg __parityenv_arch __parityenv_verspec __parityenv_crtspec __parityenv_chost false fi diff --git a/parity.setup/parity-setup.in b/parity.setup/parity-setup.in index 5f9b125..4c47311 100755 --- a/parity.setup/parity-setup.in +++ b/parity.setup/parity-setup.in @@ -29,7 +29,7 @@ then PARITYincludedir=${SELFDIR}/.. # - PARITYsupported_archs="x86 x64" + PARITYsupported_archs="i686 x86_64" PARITYsupported_runtimes="dynamic static dynamicdebug staticdebug" # 7.0: Visual Studio 2002, cl.exe Version 13.00 # 7.1: Visual Studio 2003, cl.exe Version 13.10 @@ -285,31 +285,31 @@ unittests+=( test_get-vsver ) # get-vsarch [begin-of-chost|vsarch[-vsver]] # The argument needs to contain enough information only. # Examples: -# get-vsarch i686-msvc11.0-winnt -> x86 -# get-vsarch i686-msvcd11.0-winnt -> x86 -# get-vsarch i686-msvc11.0-mingw32 -> x86 -# get-vsarch i686-libcmtd11.0-winnt -> x86 -# get-vsarch x86-msvc11.0 -> x86 -# get-vsarch i686 -> x86 -# get-vsarch x86_64-libcmtd11.0-winnt -> x64 -# get-vsarch x86_64 -> x64 +# get-vsarch i686-msvc11.0-winnt -> i686 +# get-vsarch i686-msvcd11.0-winnt -> i686 +# get-vsarch i686-msvc11.0-mingw32 -> i686 +# get-vsarch i686-libcmtd11.0-winnt -> i686 +# get-vsarch x86-msvc11.0 -> i686 +# get-vsarch i686 -> i686 +# get-vsarch x86_64-libcmtd11.0-winnt -> x86_64 +# get-vsarch x86_64 -> x86_64 get-vsarch() { local vsarch=${1%%-*} case ${vsarch} in - x64|amd64|x86_64) echo "x64" ;; - x86|i?86) echo "x86" ;; + x64|amd64|x86_64) echo "x86_64" ;; + x86|i?86) echo "i686" ;; esac return 0 } test_get-vsarch() { local input expected output ret=0 for input in \ - x86:i686-msvc11.0-winnt \ - x86:i686-msvcd11.0-mingw32 \ - x86:x86-msvc11.0 \ - x86:i686 \ - x64:x86_64 \ - x86:i686-libcmtd11.0-winnt \ + i686:i686-msvc11.0-winnt \ + i686:i686-msvcd11.0-mingw32 \ + i686:x86-msvc11.0 \ + i686:i686 \ + x86_64:x86_64 \ + i686:i686-libcmtd11.0-winnt \ ; do expected=${input%:*} input=${input#*:} @@ -373,8 +373,8 @@ get-chost() { local vsver=$(get-vsver "$*") local vscrt=$(get-vscrt "$*") case ${vsarch} in - x86) echo "i686-${vscrt}${vsver}-winnt" ;; - x64) echo "x86_64-${vscrt}${vsver}-winnt" ;; + i686) echo "i686-${vscrt}${vsver}-winnt" ;; + x86_64) echo "x86_64-${vscrt}${vsver}-winnt" ;; esac return 0 } @@ -394,7 +394,7 @@ test_get-chost() { i686-msvc-winnt:i686 \ x86_64-libcmtd11.0-winnt:x86_64-libcmtd11.0-winnt \ x86_64-libcmtd-winnt:x86_64-libcmtd \ - x86_64-msvc-winnt:x64-msvc \ + x86_64-msvc-winnt:x86_64-msvc \ ; do expected=${input%:*} input=${input#*:} @@ -447,8 +447,8 @@ get-supported-executables() { 'ResourceConverter=cvtres.exe' ) case ${vsarch} in - x86) vsexes+=( 'Assembler=ml.exe' ) ;; - x64) vsexes+=( 'Assembler=ml64.exe' ) ;; + i686) vsexes+=( 'Assembler=ml.exe' ) ;; + x86_64) vsexes+=( 'Assembler=ml64.exe' ) ;; esac printf "%s\n" "${vsexes[@]}" return 0 @@ -482,8 +482,8 @@ get-parityflags() { local vsver=$(get-vsver "$*") local vscrt=$(get-vscrt "$*") case ${vsarch} in - x86) echo "-m32 -m${vscrt}${vsver}" ;; - x64) echo "-m64 -m${vscrt}${vsver}" ;; + i686) echo "-m32 -m${vscrt}${vsver}" ;; + x86_64) echo "-m64 -m${vscrt}${vsver}" ;; esac return 0 } @@ -707,6 +707,13 @@ query-vcvars() { fi fi + local vcarch + case ${vsarch} in + x86_64) vcarch=x64 ;; + i686) vcarch=x86 ;; + *) vcarch=${vsarch} ;; + esac + local line var val while read line do @@ -719,7 +726,7 @@ query-vcvars() { esac done < <( INCLUDE= LIB= LIBPATH= \ - cmd "@\"$(cygpath -w "${vcvarsall}")\" ${vsarch} && ( set PATH & set INCLUDE & set LIB )" 2>/dev/null \ + cmd "@\"$(cygpath -w "${vcvarsall}")\" ${vcarch} && ( set PATH & set INCLUDE & set LIB )" 2>/dev/null \ | sed -nE "s/\\r\$//; s,\\\\,/,g; /^(PATH|INCLUDE|LIB|LIBPATH)=/p" ) vcPATH=${vcPATH%${novcPATH}}; vcPATH=${vcPATH%%;} @@ -767,7 +774,7 @@ prune-parityconf() { local vsver=$(get-vsver "${chost}") local vsarch=$(get-vsarch "${chost}") local vscrt=$(get-vscrt "${chost}") - local conf="${vsarch}-${vscrt}${vsver}" + local conf=${chost} ( confdir="${PARITYlocalstatedir}" @@ -888,7 +895,7 @@ update-parityconf() { local vscrt=$(get-vscrt "${chost}") local parityflags=$(get-parityflags "${chost}") local confdir="${PARITYlocalstatedir}" - local conf="${vsarch}-${vscrt}${vsver}" + local conf=${chost} ( noquiet "Configuring for ${conf} ..." @@ -1027,7 +1034,7 @@ CompilerVersion = ${vsver} KnownProgramsPath = ${PARITYprefix}/${chost}/bin " case ${vsarch} in # ( - x86) + i686) echo "TimeT32Bit = true" ;; # ( *) diff --git a/parity.tasks/CollectorOther.cpp b/parity.tasks/CollectorOther.cpp index 6a74818..a22b75a 100644 --- a/parity.tasks/CollectorOther.cpp +++ b/parity.tasks/CollectorOther.cpp @@ -78,11 +78,11 @@ namespace parity std::string vcvariant; utils::MachineType ctxmachine = utils::MachineUnknown; if (strstr(argv0, "x86_64")) { - vcvariant = "x64"; + vcvariant = "x86_64"; ctxmachine = utils::MachineAMD64; } else if (strstr(argv0, "x86")) { - vcvariant = "x86"; + vcvariant = "i686"; ctxmachine = utils::MachineI386; } // Find "i[0-9]86" in argv[0]: @@ -91,7 +91,7 @@ namespace parity && strncmp(x+2, "86", 2) == 0 && x[1] >= '1' && x[1] <= '9' ) { - vcvariant = "x86"; + vcvariant = "i686"; ctxmachine = utils::MachineI386; break; } @@ -99,14 +99,14 @@ namespace parity // Find "-m64" or "-m32" in arguments, overriding argv[0]. for (int i = 1; i < argc; ++i) { if (strcmp(argv[i], "-m64") == 0) { - vcvariant = "x64"; + vcvariant = "x86_64"; ctxmachine = utils::MachineAMD64; memmove(&argv[i], &argv[i+1], (argc - i) * sizeof(argv[0])); --i; --argc; continue; } if (strcmp(argv[i], "-m32") == 0) { - vcvariant = "x86"; + vcvariant = "i686"; ctxmachine = utils::MachineI386; memmove(&argv[i], &argv[i+1], (argc - i) * sizeof(argv[0])); --i; --argc; @@ -198,6 +198,8 @@ namespace parity vcvariant = v.str(); } + vcvariant += "-winnt"; + utils::Context& context = utils::Context::getContext(); context.setRuntime(ctxruntime); context.setMachine(ctxmachine); From 5765305bf3592fb956eabfae823668bc6c311aaf Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Mon, 10 Feb 2020 17:23:19 +0100 Subject: [PATCH 06/15] configure: add --enable-binpkg-per-chost For package managers like Cygwin, allow to build multiple binary packages (split across target CHOST) from one single build instance. --- Confix2.dir | 14 ++++++++++++++ parity.setup/parity-setup.in | 31 +++++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/Confix2.dir b/Confix2.dir index 4567833..c0ae49f 100755 --- a/Confix2.dir +++ b/Confix2.dir @@ -174,6 +174,17 @@ AC_DEFUN([PARITY_CONFIGURE], AC_SUBST([PARITY_SUPPORTED_RUNTIMES], [$enable_msvc_runtimes]) AC_MSG_RESULT([$enable_msvc_runtimes]) + AC_MSG_CHECKING([whether to support distinct binary packages per CHOST]) + AC_ARG_ENABLE([binpkg-per-chost], + [AS_HELP_STRING([--enable-binpkg-per-chost], + [Support distinct binary packages per CHOST.])], + [AS_CASE([$enable_binpkg_per_chost], + [yes], [enable_binpkg_per_chost=yes], + [enable_binpkg_per_chost=no])], + [enable_binpkg_per_chost=no]) + AC_SUBST([PARITY_BINPKG_PER_CHOST], [$enable_binpkg_per_chost]) + AC_MSG_RESULT([$enable_binpkg_per_chost]) + AC_MSG_CHECKING([whether to support Remote EXecution service]) AC_ARG_WITH([default-remote-execution-support], [AS_HELP_STRING([--with-remote-execution-support=[[yes|no|enabled|disabled]]], @@ -297,6 +308,8 @@ install-setup-files: install-recursive $(MKDIR_P) "$(DESTDIR)$(localstatedir)" "$(DESTDIR)$(bindir)/parity-setup" --destdir="$(DESTDIR)" --install test -n "$(DESTDIR)" || "$(bindir)/parity-setup" --enable-all + test no = "$(PARITY_BINPKG_PER_CHOST)" || \\ + sed -e '/^CHOSTS_TO_MANAGE=/s/builtin/installed/' -i "$(DESTDIR)$(bindir)/parity-setup" install: install-setup-files @@ -317,6 +330,7 @@ uninstall-setup-files: rm -f cmd.exe ; \\ fi ; \\ done ; : + sed -e '/^CHOSTS_TO_MANAGE=/s/installed/builtin/' -i "$(DESTDIR)$(bindir)/parity-setup" "$(DESTDIR)$(bindir)/parity-setup" --destdir="$(DESTDIR)" --uninstall ; : uninstall-recursive: uninstall-setup-files diff --git a/parity.setup/parity-setup.in b/parity.setup/parity-setup.in index 4c47311..6b304f6 100755 --- a/parity.setup/parity-setup.in +++ b/parity.setup/parity-setup.in @@ -18,6 +18,10 @@ PARITYrexsupport="@PARITY_REX_SUPPORT@" DESTDIR= +# set to "installed" during "make install" when using +# configure --enable-binpkg-per-chost +CHOSTS_TO_MANAGE="builtin" + if [[ ${PARITYsysconfdir} == @*@ ]] then SELFDIR=$(cd "$(dirname "${SELF}")" && pwd) @@ -411,14 +415,29 @@ test_get-chost() { unittests+=( test_get-chost ) get-supported-chosts() { - local vsarch vsver vscrt + local vsarch vsver vscrt chost + if [[ ${CHOSTS_TO_MANAGE} == 'installed' ]] + then + CHOSTS_TO_MANAGE=" $(echo $( + cd "${PARITYlocalstatedir}" || exit 0 + for chost in i686-*-winnt x86_64-*-winnt + do + test -r ./${chost}/. && echo ${chost} + done + ) ) " + fi + for vsarch in $(get-supported-vsarchs) do for vsver in $(get-supported-vsvers) do for vscrt in $(get-supported-vscrts) do - get-chost "${vsarch}-${vscrt}${vsver}" + chost=$(get-chost "${vsarch}-${vscrt}${vsver}") + case ${CHOSTS_TO_MANAGE} in + 'builtin') echo ${chost} ;; + *" ${chost} "*) echo ${chost} ;; + esac done done done @@ -1196,7 +1215,7 @@ parityconf-list-supported() { verbose() { _verbose "$@" >&2; } noquiet() { _verbose "$@" >&2; } local chost - for chost in $(get-supported-chosts) + for chost in ${SUPPORTED_CHOSTS} do echo "${chost}" done @@ -1209,7 +1228,7 @@ parityconf-list-available() { query-novcvars-once || die "Cannot get initial environment." local chost - for chost in $(get-supported-chosts) + for chost in ${SUPPORTED_CHOSTS} do if query-vcvars "${chost}" then @@ -1246,7 +1265,7 @@ parityconf-enable-all() { query-novcvars-once || die "Cannot get initial environment." local chost - for chost in $(get-supported-chosts) + for chost in ${SUPPORTED_CHOSTS} do update-parityconf "${chost}" & done @@ -1272,7 +1291,7 @@ parityconf-disable() { parityconf-disable-all() { local chost - for chost in $(get-supported-chosts) + for chost in ${SUPPORTED_CHOSTS} do prune-parityconf --reason="disabled" "${chost}" done From 85ea32af1b558fae15b6a2cd71087aea0499f964 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Mon, 2 Mar 2020 15:24:23 +0100 Subject: [PATCH 07/15] runtime: fix buffer overflow formatting decimal numbers --- parity.runtime/output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parity.runtime/output.c b/parity.runtime/output.c index f69dba5..d353c24 100644 --- a/parity.runtime/output.c +++ b/parity.runtime/output.c @@ -55,8 +55,8 @@ void PcrtOutFormatStringVa(char* buffer, const char* fmt, va_list args) // fall through case 'd': { - char buf[2*sizeof(uintptr_t)+1]; - unsigned char* wh = buf + 2*sizeof(uintptr_t); + char buf[3*sizeof(uintptr_t)+1]; + unsigned char* wh = buf + 3*sizeof(uintptr_t); uintptr_t num = va_arg(args, uintptr_t); From ab449188bf7df94c1cdb846922706060be22f4a6 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Fri, 6 Mar 2020 12:07:04 +0100 Subject: [PATCH 08/15] parity.gnu.gcc: support -std=c++XX/-ansi options A bug in the MSVC C++ compiler does leave the __cplusplus macro value on 199711L even when the selected (or default) C++ standard is newer. They decided to add the /Zc:__cplusplus compiler option to get this fixed, to not break applications relying on the wrong version. In addition to just setting this flag, we now do support -ansi and -std=c++XX flags, mapping to /std:c++XX and /Zc:__cplusplus flags to match GCC's value for __cplusplus as close as possible, when supported by the CL version used. --- parity.gnu.gcc/parity.gnu.gcc.cpp | 8 +++++++ parity.options/Compiler.cpp | 40 +++++++++++++++++++++++++++++++ parity.options/Compiler.h | 1 + parity.options/TableGnuGcc.cpp | 2 ++ parity.options/TableMsCl.cpp | 2 ++ parity.setup/parity-setup.in | 19 ++++++++++++--- parity.tasks/MsCompiler.cpp | 4 ++++ parity.utils/ContextGen.h | 4 ++++ 8 files changed, 77 insertions(+), 3 deletions(-) diff --git a/parity.gnu.gcc/parity.gnu.gcc.cpp b/parity.gnu.gcc/parity.gnu.gcc.cpp index 84b4660..dbb77df 100644 --- a/parity.gnu.gcc/parity.gnu.gcc.cpp +++ b/parity.gnu.gcc/parity.gnu.gcc.cpp @@ -157,6 +157,14 @@ int main(int argc, char** argv) context.setDefinesString("__PARITY_GNU__"); context.setDefinesString("__PARITY__"); + // + // GNU C++ does set the __cplusplus macro value matching the + // selected C++ standard in use. It is a bug in the MSVC C++ + // compiler to leave it on 199711L, but they decided to add + // another /Zc: compiler option for backwards compatibility. + // + context.setCplusPlusMacro(true); + Timing::instance().stop("Command Line Processing"); // diff --git a/parity.options/Compiler.cpp b/parity.options/Compiler.cpp index 9beb4ac..e0cd5b3 100644 --- a/parity.options/Compiler.cpp +++ b/parity.options/Compiler.cpp @@ -88,6 +88,46 @@ namespace parity return true; } + bool setCxxStandard(const char* option, const char* argument, bool& used) + { + utils::Context& ctx = utils::Context::getContext(); + /* no need to map the MS options */ + if (strcmp(option, "/Zc:__cplusplus-") == 0) { + ctx.setCplusPlusMacro(false); + return true; + } + if (strcmp(option, "/Zc:__cplusplus") == 0) { + ctx.setCplusPlusMacro(true); + return true; + } + if (strncmp(option, "/std:c++", 8) == 0) { + ctx.setCxxStandardOption(option); + return true; + } + /* map the GNU options */ + static struct { + char const *gnuOption; + char const *msOption; + bool cxxMacro; + } const mapping[] = { + { "-ansi", "", false }, + { "-std=c++98", "", false }, + { "-std=c++03", "", true }, + { "-std=c++11", "", true }, + { "-std=c++14", "/std:c++14", true }, + { "-std=c++17", "/std:c++17", true }, + { "-std=c++2a", "/std:c++latest", true }, + }; + for(int i = 0; i < sizeof(mapping)/sizeof(mapping[0]); ++i) { + if (strcmp(mapping[i].gnuOption, option) == 0) { + ctx.setCxxStandardOption(mapping[i].msOption); + ctx.setCplusPlusMacro(mapping[i].cxxMacro); + return true; + } + } + return false; + } + bool addSource(const char* option, const char* argument, bool& used) { utils::Context& ctx = utils::Context::getContext(); diff --git a/parity.options/Compiler.h b/parity.options/Compiler.h index 3b0de90..a4404c7 100644 --- a/parity.options/Compiler.h +++ b/parity.options/Compiler.h @@ -38,6 +38,7 @@ namespace parity bool setRuntimeTypes(const char* option, const char* argument, bool& used); bool setPositionIndep(const char* option, const char* argument, bool& used); bool setForcedLanguage(const char* option, const char* argument, bool& used); + bool setCxxStandard(const char* option, const char* argument, bool& used); bool addSource(const char* option, const char* argument, bool& used); bool addSourceFromStdin(const char* option, const char* argument, bool& used); bool setShortWchar(const char* option, const char* argument, bool& used); diff --git a/parity.options/TableGnuGcc.cpp b/parity.options/TableGnuGcc.cpp index 3ac031e..955cfe8 100644 --- a/parity.options/TableGnuGcc.cpp +++ b/parity.options/TableGnuGcc.cpp @@ -90,6 +90,8 @@ namespace parity { "-g" ,setDebugable }, { "-x" ,setForcedLanguage }, { "-o" ,setOutputFile }, + { "-ansi" ,setCxxStandard }, + { "-std=" ,setCxxStandard }, { "-subsys" ,setSubsystem }, { "-fshort-wc" ,setShortWchar }, { "-fnoshort-w" ,setShortWchar }, diff --git a/parity.options/TableMsCl.cpp b/parity.options/TableMsCl.cpp index 1936506..d7b047b 100644 --- a/parity.options/TableMsCl.cpp +++ b/parity.options/TableMsCl.cpp @@ -68,6 +68,8 @@ namespace parity { "/TC" ,setForcedLanguage }, { "/SUBSYSTEM:" ,setSubsystem }, { "/subsystem:" ,setSubsystem }, + { "/std:" ,setCxxStandard }, + { "/Zc:__cplusplus" ,setCxxStandard }, { "/MT" ,setRuntime }, { "/MD" ,setRuntime }, { ".lib" ,addObjectsLibraries }, diff --git a/parity.setup/parity-setup.in b/parity.setup/parity-setup.in index 6b304f6..a8ef3e4 100755 --- a/parity.setup/parity-setup.in +++ b/parity.setup/parity-setup.in @@ -1085,19 +1085,32 @@ KnownProgramsPath = ${PARITYprefix}/${chost}/bin # include #endif #define PCRTSTR(x) #x -#define PCRTDEF(n) "Defines = " #n -#define PCRTDEFV(n, v) "Defines = " #n "=" PCRTSTR(v) +#define PCRTDEF(n) "conf: Defines = " #n +#define PCRTDEFV(n, v) "conf: Defines = " #n "=" PCRTSTR(v) PCRTDEF(WIN32_LEAN_AND_MEAN) #if defined(_WIN32_WINNT_MAXVER) /* by */ PCRTDEFV(_WIN32_WINNT, _WIN32_WINNT_MAXVER) #elif defined(_WIN32_WINNT) /* by */ PCRTDEFV(_WIN32_WINNT, _WIN32_WINNT) +#endif +#if defined(_MSVC_LANG) +"conf: SupportsStd = true" +#if __cplusplus - 0 == _MSVC_LANG +"conf: SupportsZc__cplusplus = true" +#else +"conf: SupportsZc__cplusplus = false" +#endif +#else +"conf: SupportsStd = false" +"conf: SupportsZc__cplusplus = false" #endif ' | "${DESTDIR}${CC}" \ "-mparityconfdir=./${tmpdir}" \ ${parityflags} \ + -X /std:c++latest -X /Zc:__cplusplus -xc++ \ -E - \ - | sed -n -e '/"Defines = "/{s/" "//g;s/"//g;p}' \ + 2>/dev/null \ + | sed -n -e '/"conf: /{s/"conf: //;s/" "//g;s/"//g;p}' \ >> "./${tmpdir}/${conf}/parity.conf" [[ ${PIPESTATUS[*]} == '0 0 0' ]] diff --git a/parity.tasks/MsCompiler.cpp b/parity.tasks/MsCompiler.cpp index 9ce872d..874e28d 100644 --- a/parity.tasks/MsCompiler.cpp +++ b/parity.tasks/MsCompiler.cpp @@ -405,6 +405,10 @@ namespace parity vec.push_back("/Tc" + sourceFile.get()); break; case utils::LanguageCpp: + if (ctx.getSupportsZc__cplusplus() && ctx.getCplusPlusMacro()) + vec.push_back("/Zc:__cplusplus"); + if (ctx.getSupportsStd() && !ctx.getCxxStandardOption().empty()) + vec.push_back(ctx.getCxxStandardOption()); vec.push_back("/Tp" + sourceFile.get()); break; case utils::LanguageUnknown: diff --git a/parity.utils/ContextGen.h b/parity.utils/ContextGen.h index aa92e10..171f4d3 100644 --- a/parity.utils/ContextGen.h +++ b/parity.utils/ContextGen.h @@ -233,6 +233,10 @@ namespace parity CTX_GETSET (bool ,UseSSE ,false ) /* feature */ \ CTX_GETSET (bool ,UseSSE2 ,false ) /* feature */ \ CTX_GETSET (bool ,ForScope ,true ) /* feature */ \ + CTX_GETSET (bool ,SupportsZc__cplusplus ,false ) /* feature */ \ + CTX_GETSET (bool ,SupportsStd ,false ) /* feature */ \ + CTX_GETSET_I (bool ,CplusPlusMacro ,false ) /* preprocessor */ \ + CTX_GETSET_I (std::string ,CxxStandardOption ,"" ) /* compiler */ \ CTX_GETSET (bool ,MsExtensions ,true ) /* feature */ \ CTX_GETSET (long ,WarningLevel ,3 ) /* feature */ \ CTX_GETSET (bool ,WarningAsError ,false ) /* feature */ \ From 075ee8d01ddcce8b24f70cf036471e08a657fd06 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Mon, 9 Mar 2020 13:06:30 +0100 Subject: [PATCH 09/15] drop support for up to VS 2003 (7.1), requires WinXP Visual Studio 2003 (VC 71) does not run on any Windows version newer than Windows XP or Server 2003, which both are discontinued already, even in Cygwin. Visual Studio 2005 (VC 80) still works on Windows 10. --- parity.setup/parity-setup.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/parity.setup/parity-setup.in b/parity.setup/parity-setup.in index a8ef3e4..c8f3e7b 100755 --- a/parity.setup/parity-setup.in +++ b/parity.setup/parity-setup.in @@ -35,8 +35,6 @@ then # PARITYsupported_archs="i686 x86_64" PARITYsupported_runtimes="dynamic static dynamicdebug staticdebug" - # 7.0: Visual Studio 2002, cl.exe Version 13.00 - # 7.1: Visual Studio 2003, cl.exe Version 13.10 # 8.0: Visual Studio 2005, cl.exe Version 14.00 # 9.0: Visual Studio 2008, cl.exe Version 15.00 # 10.0: Visual Studio 2010, cl.exe Version 16.00 @@ -53,7 +51,7 @@ then # 15: Visual Studio 2017, latest installed minor version # 16: Visual Studio 2019, latest installed minor version # - PARITYsupported_versions="7.0 7.1 8.0 9.0 10.0 11.0 12.0 14.0 15 16" + PARITYsupported_versions="8.0 9.0 10.0 11.0 12.0 14.0 15 16" # CC=${SELFDIR}/../parity.gnu.gcc/parity.gnu.gcc From 925f8d37ac7a146b1c2ba76a90c28547ed555930 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Mon, 9 Mar 2020 16:56:27 +0100 Subject: [PATCH 10/15] fix some compiler warnings --- parity.binary/CoffSection.cpp | 9 ++++----- parity.binary/CoffSymbol.cpp | 4 +++- parity.diagnostic/Diagnostic.cpp | 2 -- parity.inspector/Inspector.cpp | 3 --- parity.options/CommandLine.cpp | 2 +- parity.options/Compiler.cpp | 2 +- parity.tasks/MsCompiler.cpp | 2 +- parity.tasks/MsLoaderGenerator.cpp | 2 ++ parity.tasks/MsPcrtInitEntryGenerator.cpp | 2 ++ parity.tasks/MsResourceCompiler.cpp | 2 -- parity.tasks/MsResourceConverter.cpp | 4 ++-- parity.test/parity.binary.object.cpp | 1 - parity.utils/Context.cpp | 4 ++++ parity.utils/ContextGen.cpp | 11 ++--------- parity.utils/Timing.cpp | 2 +- 15 files changed, 23 insertions(+), 29 deletions(-) diff --git a/parity.binary/CoffSection.cpp b/parity.binary/CoffSection.cpp index 8bf0b7c..9f28a35 100644 --- a/parity.binary/CoffSection.cpp +++ b/parity.binary/CoffSection.cpp @@ -67,12 +67,14 @@ namespace parity // should not be required anymore hopefully... //::memset(&struct_, 0, sizeof(struct_)); + char buf[22] = {}; if(name.length() <= 8) { - ::strncpy(reinterpret_cast(struct_.Name), name.c_str(), 8); + ::strncpy(buf, name.c_str(), 8); } else { - ::sprintf(reinterpret_cast(struct_.Name), "/%-7d", fh->addString(name)); + ::snprintf(buf, sizeof(buf), "/%-7d", fh->addString(name)); } + memcpy(struct_.Name, buf, 8); } Section::Section(Section const& rhs) @@ -130,15 +132,12 @@ namespace parity char* ptr = MAKEPTR(char*, fh->getBasePointer(), struct_.PointerToRelocations); - unsigned int numRelocs = struct_.NumberOfRelocations; - if(struct_.Characteristics & CharExtendedRelocations) { if(struct_.NumberOfRelocations != 0xFFFF) throw utils::Exception("relocation overflow, but less than 0xFFFF relocations in section!"); Relocation first(ptr); - numRelocs = first.getVirtualAddress(); } for(int i = 0; i < struct_.NumberOfRelocations; ++i) diff --git a/parity.binary/CoffSymbol.cpp b/parity.binary/CoffSymbol.cpp index a396c38..e04e850 100644 --- a/parity.binary/CoffSymbol.cpp +++ b/parity.binary/CoffSymbol.cpp @@ -39,7 +39,9 @@ namespace parity if(name.length() <= 8) { - ::strncpy(struct_.N.ShortName, name.c_str(), 8); + char buf[9]; + ::strncpy(buf, name.c_str(), 8); + memcpy(struct_.N.ShortName, buf, 8); } else { struct_.N.N.Zeros = 0; struct_.N.N.Offset = fh->addString(name); diff --git a/parity.diagnostic/Diagnostic.cpp b/parity.diagnostic/Diagnostic.cpp index 67f80d7..91c49e1 100644 --- a/parity.diagnostic/Diagnostic.cpp +++ b/parity.diagnostic/Diagnostic.cpp @@ -28,8 +28,6 @@ #include -#pragma comment(lib, "psapi.lib") - #define BUFSIZE 512 BOOL GetFileNameFromHandle(HANDLE hFile, char* pszFilename, size_t length) diff --git a/parity.inspector/Inspector.cpp b/parity.inspector/Inspector.cpp index 04ce766..da5e664 100644 --- a/parity.inspector/Inspector.cpp +++ b/parity.inspector/Inspector.cpp @@ -123,7 +123,6 @@ namespace parity utils::SubsystemType genSubsystem = utils::SubsystemUnknown; utils::PathVector genRunPaths; InspectorLibraryVector genLibs; - bool genSectionFound = false; ++indent; for(unsigned int in = 0; in < indent; ++in) utils::Log::verbose(" "); @@ -137,8 +136,6 @@ namespace parity const char* genRunPathPtr = 0; unsigned int* genTablePtr = 0; - genSectionFound = true; - pointers = MAKEPTR(InspectorPointerLayoutVA*, mapping.getBase(), it->second.getPointerToRawData()); genImageName = reinterpret_cast(img.getHeader().getPointerFromVA(pointers->name)); diff --git a/parity.options/CommandLine.cpp b/parity.options/CommandLine.cpp index ce77ec9..bff591a 100644 --- a/parity.options/CommandLine.cpp +++ b/parity.options/CommandLine.cpp @@ -210,7 +210,7 @@ namespace parity } } } - catch (std::ifstream::failure e) { + catch (std::ifstream::failure &e) { throw; // throw the file error } diff --git a/parity.options/Compiler.cpp b/parity.options/Compiler.cpp index e0cd5b3..eb91aca 100644 --- a/parity.options/Compiler.cpp +++ b/parity.options/Compiler.cpp @@ -118,7 +118,7 @@ namespace parity { "-std=c++17", "/std:c++17", true }, { "-std=c++2a", "/std:c++latest", true }, }; - for(int i = 0; i < sizeof(mapping)/sizeof(mapping[0]); ++i) { + for(size_t i = 0; i < sizeof(mapping)/sizeof(mapping[0]); ++i) { if (strcmp(mapping[i].gnuOption, option) == 0) { ctx.setCxxStandardOption(mapping[i].msOption); ctx.setCplusPlusMacro(mapping[i].cxxMacro); diff --git a/parity.tasks/MsCompiler.cpp b/parity.tasks/MsCompiler.cpp index 874e28d..886ee55 100644 --- a/parity.tasks/MsCompiler.cpp +++ b/parity.tasks/MsCompiler.cpp @@ -269,7 +269,7 @@ namespace parity if(!tsk.execute(executable, vec)) throw utils::Exception("cannot execute %s", executable.get().c_str()); - if(!output.get().length() < 1) { + if(output.get().length()) { output.toNative(); if(!output.waitForAppearance()) { throw utils::Exception("cannot await appearance of %s\n", output.get().c_str()); diff --git a/parity.tasks/MsLoaderGenerator.cpp b/parity.tasks/MsLoaderGenerator.cpp index 55b113b..8b919c4 100644 --- a/parity.tasks/MsLoaderGenerator.cpp +++ b/parity.tasks/MsLoaderGenerator.cpp @@ -568,6 +568,8 @@ namespace parity case parity::utils::RuntimeStaticDebug: sectText.addData(dataExeEntryPart1StaticCrt, sizeof(dataExeEntryPart1StaticCrt)); break; + default: + break; } sectText.markRelocation(symLoaderInit, binary::Relocation::i386Relative32); sectText.addData(dataEmptyPtr, sizeof(dataEmptyPtr)); diff --git a/parity.tasks/MsPcrtInitEntryGenerator.cpp b/parity.tasks/MsPcrtInitEntryGenerator.cpp index 9545fea..18678af 100644 --- a/parity.tasks/MsPcrtInitEntryGenerator.cpp +++ b/parity.tasks/MsPcrtInitEntryGenerator.cpp @@ -139,6 +139,8 @@ namespace parity case parity::utils::RuntimeStaticDebug: sectText.addData(dataExeEntryPart1StaticCrt, sizeof(dataExeEntryPart1StaticCrt)); break; + default: + break; } sectText.markRelocation(symPcrtInit, binary::Relocation::i386Relative32); diff --git a/parity.tasks/MsResourceCompiler.cpp b/parity.tasks/MsResourceCompiler.cpp index aa06e44..eb57473 100644 --- a/parity.tasks/MsResourceCompiler.cpp +++ b/parity.tasks/MsResourceCompiler.cpp @@ -58,7 +58,6 @@ namespace parity void MsResourceCompiler::compileGeneric(const utils::Path& file, utils::Path executable, utils::Task::ArgumentVector& vec) { - utils::Context& ctx = utils::Context::getContext(); utils::Task tsk; utils::Path output(outputFile_); @@ -88,7 +87,6 @@ namespace parity void MsResourceCompiler::prepareGenericFile(utils::Path file, utils::Task::ArgumentVector& vec) { - utils::Context& ctx = utils::Context::getContext(); std::string base = file.file(); std::string out(outputFile_); diff --git a/parity.tasks/MsResourceConverter.cpp b/parity.tasks/MsResourceConverter.cpp index ce1d861..24b5572 100644 --- a/parity.tasks/MsResourceConverter.cpp +++ b/parity.tasks/MsResourceConverter.cpp @@ -58,7 +58,6 @@ namespace parity void MsResourceConverter::compileGeneric(const utils::Path& file, utils::Path executable, utils::Task::ArgumentVector& vec) { - utils::Context& ctx = utils::Context::getContext(); utils::Task tsk; utils::Path output(outputFile_); @@ -88,7 +87,6 @@ namespace parity void MsResourceConverter::prepareGenericFile(utils::Path file, utils::Task::ArgumentVector& vec) { - utils::Context& ctx = utils::Context::getContext(); std::string base = file.file(); std::string out(outputFile_); @@ -125,6 +123,8 @@ namespace parity case utils::MachineI386: vec.push_back("/MACHINE:X86"); break; + default: + break; } } } diff --git a/parity.test/parity.binary.object.cpp b/parity.test/parity.binary.object.cpp index e8e8762..6e38bce 100644 --- a/parity.test/parity.binary.object.cpp +++ b/parity.test/parity.binary.object.cpp @@ -155,7 +155,6 @@ namespace parity if(!hdr.isValid()) throw utils::Exception("invalid header of image!"); - binary::OptionalHeader ohdr = hdr.getOptionalHeader(); binary::Section::IndexedSectionMap vec = hdr.getSections(); for(binary::Section::IndexedSectionMap::iterator it = vec.begin(); it != vec.end(); ++it) diff --git a/parity.utils/Context.cpp b/parity.utils/Context.cpp index ed8df57..b8a13a0 100644 --- a/parity.utils/Context.cpp +++ b/parity.utils/Context.cpp @@ -242,6 +242,8 @@ namespace parity names.push_back("lib" + name + ".a"); names.push_back( name + ".a"); break; + default: + break; } switch(libspec) { @@ -255,6 +257,8 @@ namespace parity names.push_back(name); } break; + default: + break; } static utils::Environment envLibPath("LIBRARY_PATH"); diff --git a/parity.utils/ContextGen.cpp b/parity.utils/ContextGen.cpp index 60ef8a6..12048a2 100644 --- a/parity.utils/ContextGen.cpp +++ b/parity.utils/ContextGen.cpp @@ -390,18 +390,15 @@ namespace parity { case MachineI386: return "I386"; - break; case MachineAMD64: return "AMD64"; - break; case MachineARM: return "ARM"; - break; case MachineIA64: return "IA64"; - break; + default: + return "unknown"; } - return "unknown"; } std::string ContextGen::printable(const LanguageType& val) @@ -431,8 +428,6 @@ namespace parity // return "Invalid"; } - - return "unknown"; } std::string ContextGen::printable(const SubsystemType& val) @@ -452,8 +447,6 @@ namespace parity default: return "Not Supported"; } - - return "unknown"; } std::string ContextGen::printable(const SourceMap& val) diff --git a/parity.utils/Timing.cpp b/parity.utils/Timing.cpp index 1dd1bf4..82ccc0e 100644 --- a/parity.utils/Timing.cpp +++ b/parity.utils/Timing.cpp @@ -131,7 +131,7 @@ namespace parity continue; char buf[20]; - ::snprintf(buf, 19, "%ld", tmp); + ::snprintf(buf, sizeof(buf), "%ld", tmp); std::string col_buf; From c13f18bade087d394ad5dbf7a63b1326f08b5e92 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Tue, 10 Mar 2020 11:03:34 +0100 Subject: [PATCH 11/15] gitignore generated parity.gnu.nm --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7facff1..88dcf8c 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ parity.gnu.ar/parity.gnu.ar parity.gnu.gcc/parity.gnu.gcc parity.gnu.ld/parity.gnu.ld parity.gnu.nm/parity.gnu.dumpbin +parity.gnu.nm/parity.gnu.nm parity.inspector/parity.inspector parity.ms.cl/parity.ms.cl parity.ms.link/parity.ms.lib From 3d5c6d6740128fe3937a9379302eb82e84084842 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Thu, 20 Feb 2020 10:38:06 +0100 Subject: [PATCH 12/15] add parity.cygport, for creating Cygwin packages --- cygwin/parity.cygport | 127 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 cygwin/parity.cygport diff --git a/cygwin/parity.cygport b/cygwin/parity.cygport new file mode 100644 index 0000000..d3ef8b1 --- /dev/null +++ b/cygwin/parity.cygport @@ -0,0 +1,127 @@ +NAME="parity" +VERSION="2.0.0" +RELEASE="0.1" +CATEGORY="Devel" + +MSVC_VERSIONS=( +# quoted from parity-setup, ignoring the old ones not running on Windows 10 +# " '' " +# "7 'Visual Studio 2003' 7.1" + "8 'Visual Studio 2005' 8.0" + "9 'Visual Studio 2008' 9.0" + "10 'Visual Studio 2010' 10.0" + "11 'Visual Studio 2012' 11.0" + "12 'Visual Studio 2013' 12.0" + "14 'Visual Studio 2015' 14.0" + "15 'Visual Studio 2017'" + "16 'Visual Studio 2019'" +) + +HOMEPAGE="https://github.com/mduft/parity" +SUMMARY="GCC like commandline wrapper for Visual Studio toolchain" +SRC_URI="${HOMEPAGE}/releases/download/${VERSION}/${NAME}-${VERSION}.tar.bz2" +SRC_DIR="${NAME}-${VERSION}" +DEPEND="autoconf-archive" +core_DESCRIPTION="\ +Wraps the MSVC toolchain (cl.exe, link.exe, etc.) +providing a GCC like toolchain (gcc, g++, etc.)." + +chosts-for-ver() { + local chostver=$1 + local chost + for chost in \ + i686-msvc${chostver}-winnt \ + i686-msvcd${chostver}-winnt \ + i686-libcmt${chostver}-winnt \ + i686-libcmtd${chostver}-winnt \ + x86_64-msvc${chostver}-winnt \ + x86_64-msvcd${chostver}-winnt \ + x86_64-libcmt${chostver}-winnt \ + x86_64-libcmtd${chostver}-winnt \ + ; do + echo "${chost}" + done +} + +one_pkgspecs() { + local vcver=$1 + local vsname=$2 + local chostver=$3 + local pkgvarname="${NAME}_msvc${vcver}" + eval "${pkgvarname}_CATEGORY='${CATEGORY}'" + eval "${pkgvarname}_SUMMARY='${SUMMARY/Visual Studio/${vsname}}'" + eval "${pkgvarname}_DESCRIPTION='${core_DESCRIPTION/MSVC/MSVC ${chostver}}'" + eval "${pkgvarname}_CONTENTS='$( + echo "etc/postinstall/parity-msvc${vcver}.sh" + echo "etc/preremove/parity-msvc${vcver}.sh" + for chost in $(chosts-for-ver "${chostver}") + do + echo "usr/${chost}/" + echo "usr/bin/${chost}-*" + echo "etc/parity/${chost}/" + echo "var/parity/${chost}/" + done + )'" +} + +all_pkgspecs() { + PKG_NAMES="${NAME}-core" + eval "${NAME}_core_CATEGORY='${CATEGORY}'" + eval "${NAME}_core_SUMMARY='${SUMMARY}'" + eval "${NAME}_core_DESCRIPTION='${core_DESCRIPTION} +Install ${NAME}-msvcXX matching your MSVC versions you want to utilize.'" + eval "${NAME}_core_CONTENTS=' + etc/postinstall/${NAME}-core.sh + etc/preremove/${NAME}-core.sh + usr/bin/parity* + usr/lib/parity/ + usr/libexec/ + '" + PKG_IGNORE=' + usr/share/ + usr/lib/libparity_* + ' + CYGCONF_ARGS= + local msvc_version verspecs vcver vsname chostver + for msvc_version in "${MSVC_VERSIONS[@]}" + do + # unbundle " '' " + eval "verspecs=( ${msvc_version} )" + vcver=${verspecs[0]} + vsname=${verspecs[1]} + chostver=${verspecs[2]:-${vcver}} + + PKG_NAMES+=" ${NAME}-msvc${vcver}" + CYGCONF_ARGS+=",${chostver}" + one_pkgspecs "${vcver}" "${vsname}" "${chostver}" + done + CYGCONF_ARGS="--enable-binpkg-per-chost --enable-msvc-versions=${CYGCONF_ARGS#,}" +} + +all_pkgspecs + +src_install() { + cd ${B}; + cyginstall + dodir /etc/postinstall + dodir /etc/preremove + echo "/usr/bin/${NAME}-setup --enable-all" > "${D}"/etc/postinstall/${NAME}-core.sh + echo "/usr/bin/${NAME}-setup --disable-all" > "${D}"/etc/preremove/${NAME}-core.sh + local msvc_version verspecs vcver vsname chostver + for msvc_version in "${MSVC_VERSIONS[@]}" + do + # unbundle " '' " + eval "verspecs=( ${msvc_version} )" + vcver=${verspecs[0]} + vsname=${verspecs[1]} + chostver=${verspecs[2]:-${vcver}} + cat > "${D}"/etc/postinstall/${NAME}-msvc${vcver}.sh <<-EOF + for chost in $(echo $(chosts-for-ver "${chostver}")) + do + /usr/bin/${NAME}-setup --enable \${chost} & + done + wait + EOF + echo /usr/bin/${NAME}-setup --disable $(chosts-for-ver "${chostver}") > "${D}"/etc/preremove/${NAME}-msvc${vcver}.sh + done +} From fdb8c15ae54542e0ba23b6fd44edafaf756e27ac Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Tue, 10 Mar 2020 11:13:40 +0100 Subject: [PATCH 13/15] drop CMake support with Confix --- Confix2.pkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Confix2.pkg b/Confix2.pkg index c7ea858..c5854a9 100755 --- a/Confix2.pkg +++ b/Confix2.pkg @@ -12,5 +12,5 @@ from libconfix.setups.script import Script SETUP([AutoBoilerplate(), AutoC(), Automake(use_libtool=False, library_dependencies=True), - CMake(library_dependencies=True), Script()]) + Script()]) From b95c13fb6f0c157f54107736a31c09f0bedcbfde Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Tue, 10 Mar 2020 12:47:20 +0100 Subject: [PATCH 14/15] update ReleaseNotes --- ReleaseNotes.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index d075359..87e66b1 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -27,6 +27,9 @@ parity 2.0.0 Support up to Visual Studio 2019 (MSVC 16), and Visual Studio Build Tools. +Drop support for Visual Studio 2003 and older. Visual Studio 2005 (MSVC 8.0) +is the oldest one that still does run on Windows 10. + Support x86_64 (64bit) MSVC Toolchain. Switch to Cygwin as build system, Interix and MSVC are unlikely to still work. @@ -66,6 +69,12 @@ Provide libtool patches, creating NAME.lib as the import library along NAME.dll, and creating libNAME.lib as the static library. This implies searching for NAME.lib upon the -lNAME linker option. +Support distinct binary packages per CHOST value, to have parity-setup enable +or disable installed CHOST values only rather than all the compiled in ones. +To be enabled using the --enable-binpkg-per-chost configure option. + +Provide an exemplary parity.cygport, for building Cygwin binary packages. + parity.runtime: Stop switching stdio to binmode, almost everyone does expect and can handle textmode with native winnt programs these days. @@ -91,6 +100,8 @@ parity.gnu.gcc: Support the -include file option. parity.gnu.gcc: Support --define, --undefine options. +parity.gnu.gcc: Support -std=c++XX and -ansi compiler options. + parity.gnu.gcc: Distinguish -Dmacro (value 1) from -Dmacro= (empty value). parity.gnu.gcc: Distinguish --version from -v compiler option. From cadcab43f2573fdb42f473c54b6419a435545f10 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Tue, 10 Mar 2020 14:54:38 +0100 Subject: [PATCH 15/15] Confix2.pkg: no more need to import cmake setup --- Confix2.pkg | 1 - 1 file changed, 1 deletion(-) diff --git a/Confix2.pkg b/Confix2.pkg index c5854a9..eb104bb 100755 --- a/Confix2.pkg +++ b/Confix2.pkg @@ -6,7 +6,6 @@ PACKAGE_VERSION('2.0.0') from libconfix.setups.boilerplate import AutoBoilerplate from libconfix.setups.c import AutoC from libconfix.setups.automake import Automake -from libconfix.setups.cmake import CMake from libconfix.setups.script import Script SETUP([AutoBoilerplate(),