Commit Graph

314 Commits

Author SHA1 Message Date
Jacek Caban
b6cc4d5cba widl: Import Wine version wine-9.20.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-10-18 23:16:01 +02:00
Jacek Caban
e83d045c23 widl: Update to Wine version 658df7f2121d4d.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-09-29 21:11:46 +02:00
Jacek Caban
87a12996ef widl: Updated to Wine version a4e77b33f6897d930261634c1b3ba5e4edc209f3.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-09-25 12:22:29 +02:00
Jacek Caban
a5027b0943 widl: Remove no longer used pathtools.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-09-17 00:44:14 +02:00
Jacek Caban
340bd632cf widl: Remove no longer needed BIN_TO_INCLUDEDIR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-09-17 00:44:14 +02:00
Jacek Caban
a5150c011f widl: Update to current Wine version.
Includes adjustments to relocable patch to use upstream relocable install support.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-09-17 00:43:21 +02:00
Martin Storsjö
1c506e8940 gendef: Regenerate configure
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 13:11:17 +03:00
Pali Rohár
8cde1a6725 gendef: Increase gendef version number to 1.1
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 13:11:17 +03:00
Pali Rohár
a0a52fc204 gendef: Fix generating ordinal-only exports
When using GNU ld or GNU dlltool, it is needed to mark ordinal-only export
with NONAME keyword. Otherwise the import library would use export by name,
instead of by ordinal.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 13:11:17 +03:00
Pali Rohár
251b6394a5 gendef: Update Check!!! comment about return value
This code block detected that the return value is from other library
function. It does not mean that function forwards to another one.

For example lot of times gendef detected that the call is GetLastError()
from kernel32.dll. But it does not mean that the function was forwarded to
GetLastError(). It just means that one of the code branch was propagating
return value from GetLastError().

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 13:11:17 +03:00
Pali Rohár
3a2ac9a216 gendef: Add new option --no-include-current-dir
gendef by default always scans current directory for other hint .def files
which are later parsed. This default behavior is sometimes problematic, so
add an option --no-include-current-dir which disables scanning of the
current directory for other hint .def files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 13:11:17 +03:00
Pali Rohár
2ff2b1c8d8 gendef: Show comment how to process generated def file
Generated file has be processed by --kill-at (-k) option of dlltool
or ld.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 13:11:17 +03:00
Pali Rohár
f35e3abb8c gendef: Recognize decorated I386 fastcall function exports
Decorated I386 fastcall functions have symbols with "@NAME@SIZE" pattern.

Normally function symbols from libraries are exported undecorated, symbol
name matches the function name. But some libraries export I386 fastcall
functions with decorated symbol names.

For example msvcr80.dll library exports symbol "@_calloc_crt@8" for which
gendef without this change generates line "@_calloc_crt@8@8", which cannot
be easily used by applications. With this change it generates line
"@_calloc_crt@8 == @_calloc_crt@8" which allows applications to call
fastcall function _calloc_crt(void *ptr, size_t size).

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 12:37:20 +03:00
Pali Rohár
4bd6b87e9c gendef: Recognize decorated I386 stdcall function exports
Decorated I386 stdcall functions have symbols with "_NAME@SIZE" pattern.

Normally function symbols from libraries are exported undecorated, symbol
name matches the function name. But some libraries export I386 stdcall
functions with decorated symbol names.

For example msvcrt20.dll library exports symbol "__seh_longjmp_unwind@4"
and gendef without this change generated line "__seh_longjmp_unwind@4@4",
which cannot be easily used by applications. With this change it generates
line "_seh_longjmp_unwind@4 == __seh_longjmp_unwind@4" which allows
applications to call stdcall function _seh_longjmp_unwind(void *jmp).

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 12:37:20 +03:00
Pali Rohár
b2b319d518 gendef: Recognize I386 PE with zeroed NT magic
binutils (objdump) accepts PE binaries (EXE/DLL) with zero value in
OptionalHeader's Magic field. Do same in gendef. Such I386 DLL binaries are
distributed as part of the Win32s.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 12:37:20 +03:00
Pali Rohár
ad8edb65bc gendef: Show gendef version in generated file and also in help
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 12:37:19 +03:00
Jacek Caban
b18c569f47 widl: Updated to Wine version 69e3c712dca9cc697830c74725e07daa46d23bdf.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-07-06 10:54:14 +02:00
Jacek Caban
cc1bb92a97 widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-05-15 23:10:43 +02:00
Jacek Caban
030497761c widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-05-04 12:49:17 +02:00
Jacek Caban
0721caf05e widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-04-16 12:06:54 +02:00
Jacek Caban
bc45a0a77a widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-04-05 11:26:05 +02:00
Jacek Caban
acffed9304 widl: Update to current Wine version. 2024-03-22 12:47:55 +01:00
Jacek Caban
a18c5ba469 widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-03-18 22:21:47 +01:00
Martin Storsjö
986e0ba679 tools: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-02-08 15:22:52 +02:00
Martin Storsjö
3507c491c3 tools: Remove hardcoded use of -Werror
By hardcoding the use of -Werror, we risk that the build can break
on any newer (or older) toolchain which can give warnings for
unexpected issues.

Fixing such issues is of course desired, but we shouldn't be breaking
the build universally, unless the user explicitly has asked for
this behaviour.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-02-08 15:22:49 +02:00
Martin Storsjö
202e375b74 gendef: Remove printing __DATE__, to improve build reproducibility
This tool isn't evolving particularly much at the moment, so the
additional value of knowing when a particular version was built
doesn't give much extra value.

Normally, a stripped build of gendef (on Linux) produces a binary
with the exact same hash each time. Using __DATE__ breaks that
reproducibility, if rebuilt on different days. It is possible to
avoid the issue by setting SOURCE_DATE_EPOCH to a fixed value when
building, but in this case, I think the printed date doesn't add much
value, so we could simply remove it. Most other similar tools don't
contain such printouts.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-02-06 11:33:58 +02:00
LIU Hao
b4515a6935 Regenerate configure with autoconf 2.72
Reference: https://sourceforge.net/p/mingw-w64/mailman/message/58721403/
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-01-09 22:26:23 +08:00
Jacek Caban
95a2cf4b72 widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-12-22 12:05:36 +01:00
Jacek Caban
48b2c1b278 widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-11-29 18:46:43 +01:00
LIU Hao
3ebb92804e Regenerate autotools scripts with automake 1.16.5
This is done by running `WANT_AUTOMAKE=1.16 autoreconf -ifv` in the top
directory.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-11-17 13:14:02 +08:00
LIU Hao
b6de4efae6 Run autoreconf -ifv in top directory
Reference: https://sourceforge.net/p/mingw-w64/mailman/message/51784428/
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-11-16 22:44:40 +08:00
Jacek Caban
0d4af3d82f widl: Update to current Wine version. 2023-11-09 11:37:02 +01:00
Martin Storsjö
d6c07d9561 Revert commit f86c3e7bbd
This was pushed accidentally as part of an earlier branch, updating
files with a slightly different version of tools than what has been
used before.
2023-10-27 21:02:54 +03:00
Martin Storsjö
f86c3e7bbd autoreconf 2023-10-26 12:02:51 +03:00
Jacek Caban
431747fd5f widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-10-11 11:57:09 +02:00
Jacek Caban
61f3f1ac7f widl: Updated to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-09-21 17:04:06 +02:00
Martin Storsjö
20702f54dc tools: Remove the unused tool genlib
This tool was meant as a standalone replacement for dlltool,
for generating import libraries, but it never got feature parity
(in particular, it lacked support for generating symbol aliases,
which are cruicial for the core mingw-w64-crt import libraries).

The same author later created llvm-dlltool which fulfilled the
niche which genlib initially was meant to handle, effectively
orphaning genlib.

The last update to the source is in 2015, and no known third party
build configurations actually use this tool. (Although some might
be building the tool even if it isn't used; such builds will need
to be updated though.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-08 10:40:26 +03:00
Jacek Caban
f6a3cec1ee widl: Update to current Wine version
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-08-27 12:52:27 +02:00
Jacek Caban
0362ce1538 widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-08-15 21:01:48 +02:00
Jacek Caban
f12e69344f widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-07-13 20:36:42 +02:00
Jacek Caban
1d28eb2ad0 widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-06-03 19:25:49 +02:00
Jacek Caban
6a0bbbf931 widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-04-13 23:42:58 +02:00
Jacek Caban
6da71c3ae1 widl: Update to current Wine version. 2023-04-10 12:18:14 +02:00
Christoph Reiter
8f8f677fc4 genpeimg: fix build error with clang v16
Building genpeimg with clang v16 fails like:

error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
        pe->is_64bit = 1;

is_64bit is always ever comapred against 0 in our case, so the value change
doesn't matter, but let's just make it unsigned to fix the error and avoid
any future confusion.

The same is theoretically true for is_bigendian, but that currently
never set to 1 in any place. Make it unsigned as well while at it.

Signed-off-by: Jonathan Yong <10walls@gmail.com>
2023-04-03 13:15:21 +00:00
Jacek Caban
92ac18e4e8 widl: Update widl to current Wine version. 2023-03-02 15:33:48 +01:00
LIU Hao
196cbae7fa genstubdll: Remove
There are very few details about this tool. In addition, neither MSYS2
nor Debian includes this tool in their toolchains. I believe it should
be out of date and of no use, and may hence be removed.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2022-12-23 22:00:46 +08:00
Martin Storsjö
ab72a48505 widl: Avoid conflicting definitions of __fastfail from Wine's winnt.h
Widl uses a subset of Wine headers, on top of the host's platform
headers (either Unix or Windows ones). When building widl for a
Windows target, the included Wine headers end up being preferred
over the toolchain's own platform headers.

Wine defines the __fastfail function in the winnt.h header (as
a static inline function), while mingw-w64 headers define it in
_mingw.h as a extern gnu_inline function.

When built with Clang, this combintion of an extern declaration
and static inline, ends up producing extern definitions of the
function in every compilation unit that ends up including both
headers - which ends up as linker errors due to duplicate definitions.
(GCC doesn't seem to produce any extern definitions in these cases.)

Patch the imported winnt.h from Wine, to skip the definition of
__fastfail if __MINGW_FASTFAIL_IMPL is defined (which is set by
_mingw.h).

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-12-21 19:05:01 +02:00
Jacek Caban
bb0a9749dd widl: Update to Wine 8.0-rc1. 2022-12-13 13:09:30 +01:00
Ozkan Sezer
b340a3e4b3 libmangle, genidl, genpeimg: do not use AC_FUNC_MALLOC / AC_FUNC_REALLOC
breaks cross-compilation.
2022-09-25 15:55:32 +03:00
Martin Storsjö
4cce3f65dc widl: Regenerate configure and config.h.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-05-02 13:41:16 +03:00