diff options
-rw-r--r-- | windows/README-Windows.txt | 30 | ||||
-rw-r--r-- | windows/build.bash | 23 |
2 files changed, 30 insertions, 23 deletions
diff --git a/windows/README-Windows.txt b/windows/README-Windows.txt index b6a85b83..f9a00248 100644 --- a/windows/README-Windows.txt +++ b/windows/README-Windows.txt @@ -21,14 +21,18 @@ Package contents ---------------- All executables and libraries in this package require msvcrt.dll. - It's included in all recent Windows versions. On Windows 95 it - might be missing, but once you get it somewhere, XZ Utils should - run even on Windows 95. + It's included in all recent Windows versions. (On Windows 95 it + might be missing, but once you get it somewhere, the i686 binaries + should run even on Windows 95 if the processor is new enough.) - There are two different versions of the executable and library files. - There is one directory for each type of binaries: + There is a SSE2 optimization in the compression code but this + version of XZ Utils doesn't include run-time processor detection. + This is why there is a separate i686-SSE2 version. - bin_i486 32-bit x86 (i486 and up), Windows 95 and later + There is one directory for each type of executable and library files: + + bin_i686 32-bit x86 (i686 and newer), Windows 95 and later + bin_i686-sse2 32-bit x86 (i686 with SSE2), Windows 98 and later bin_x86-64 64-bit x86-64, Windows Vista and later Each of the above directories have the following files: @@ -90,15 +94,13 @@ Microsoft Visual C++ lib /def:liblzma.def /out:liblzma.lib /machine:x64 - Linking against static liblzma might work too, but usually you - should use liblzma.dll if possible. (Or, if having a decompressor - is enough, consider using XZ Embedded or LZMA SDK which can be - compiled with MSVC.) + If you need to link statically against liblzma, you should build + liblzma with MSVC 2013 update 2 or later. Alternatively, if having + a decompressor is enough, consider using XZ Embedded or LZMA SDK. - To try linking against static liblzma, rename liblzma.a to e.g. - liblzma_static.lib and tell MSVC to link against it. You also need - to tell lzma.h to not use __declspec(dllimport) by defining the - macro LZMA_API_STATIC. You can do it either in the C/C++ code + When you plan to link against static liblzma, you need to tell + lzma.h to not use __declspec(dllimport) by defining the macro + LZMA_API_STATIC. You can do it either in the C/C++ code #define LZMA_API_STATIC #include <lzma.h> diff --git a/windows/build.bash b/windows/build.bash index 85e1f4fc..3d8fb559 100644 --- a/windows/build.bash +++ b/windows/build.bash @@ -75,6 +75,8 @@ buildit() # threading. So I don't include a size-optimized liblzma for now. ./configure \ --prefix= \ + --enable-silent-rules \ + --disable-dependency-tracking \ --disable-nls \ --disable-scripts \ --disable-threads \ @@ -89,9 +91,12 @@ buildit() make distclean - # Build the normal speed-optimized binaries. + # Build the normal speed-optimized binaries. The type of threading + # (win95 vs. vista) will be autodetect from the target architecture. ./configure \ --prefix= \ + --enable-silent-rules \ + --disable-dependency-tracking \ --disable-nls \ --disable-scripts \ --build="$BUILD" \ @@ -125,19 +130,19 @@ txtcp() done } -# FIXME: Make sure that we don't get i686 or i586 code from the runtime. -# Or if we do, update the strings here to match the generated code. -# i686 has cmov which can help like maybe 1 % in performance but things -# like SSE don't help, so i486 isn't horrible for performance. -# -# FIXME: Using i486 in the configure triplet may be wrong. if [ -d "$MINGW_W32_DIR" ]; then # 32-bit x86, Win95 or later, using MinGW-w32 PATH=$MINGW_W32_DIR/bin:$MINGW_W32_DIR/i686-w64-mingw32/bin:$PATH \ buildit \ pkg/bin_i486 \ - i486-w64-mingw32 \ - '-march=i486 -mtune=generic' + i686-w64-mingw32 \ + '-march=i686 -mtune=generic' + # 32-bit x86 with SSE2, Win98 or later, using MinGW-w32 + PATH=$MINGW_W32_DIR/bin:$MINGW_W32_DIR/i686-w64-mingw32/bin:$PATH \ + buildit \ + pkg/bin_i686-sse2 \ + i686-w64-mingw32 \ + '-march=i686 -msse2 -mfpmath=sse -mtune=generic' elif [ -d "$MINGW_DIR" ]; then # 32-bit x86, Win95 or later, using MinGW PATH=$MINGW_DIR/bin:$PATH \ |