Commit graph

368 commits

Author SHA1 Message Date
Alexandre Julliard a03bd94204 winegcc: Don't print a potentially reallocated pointer. 2024-05-24 18:42:22 +02:00
Jacek Caban 00198c4084 winegcc: Add -marm64x option for linking ARM64X images. 2024-04-09 12:07:27 -05:00
Jacek Caban 753f405536 winegcc: Pass target and resources as arguments to build_spec_obj. 2024-04-09 12:07:27 -05:00
Alexandre Julliard 0c0d181551 winegcc: Stop passing ARM code generation options to winebuild.
They are not needed for PE builds.
2024-02-23 12:01:38 +01:00
Jacek Caban 0c7a1be11b winegcc: Support --no-default-config argument. 2023-11-27 22:39:51 +01:00
Jacek Caban a0a2ef5a2b tools: Initial ARM64EC target support. 2023-11-13 11:36:12 +01:00
Alexandre Julliard 4819a850a0 winegcc: Use a temp file for the implicitly created import library.
Otherwise clang creates a .lib file along with every dll.
2023-10-31 17:04:57 +01:00
Alexandre Julliard 4e9f1a41b9 makefiles: Always use the global SOURCES variable for .man.in files. 2023-10-14 13:44:07 +02:00
Alexandre Julliard 0d3ff192aa winegcc: Enable dynamic base by default. 2023-10-05 18:49:44 +02:00
Alexandre Julliard 425bd55b02 winegcc: Don't disable unwind tables for PE targets. 2023-09-07 16:19:00 +02:00
Jinoh Kang 9de7c79153 winegcc: Enable SafeSEH only on i386.
SafeSEH is not applicable to architectures other than i386.

This fixes compiling with the clang ARM assembler, which cannot parse
".def @feat.00" since "@" is parsed as the start of a line comment.
2023-07-17 11:11:48 +02:00
Jacek Caban b090866663 winegcc: Disable exporting all symbols on mingw targets.
Mingw targets export all symbols by default if there is no explicit
export. We generate export table in winebuild and don't use explicit
exports. This may make linker generate an unused export-all table.

Spotted by Gabriel Ivăncescu.
2023-06-27 22:14:15 +02:00
Alexandre Julliard 834f7b2366 winegcc: Fix an uninitialized variable warning in the PE build. 2023-06-12 21:21:42 +02:00
Alexandre Julliard 4a0f3fbcb5 winegcc: Stop using the deprecated prelink tool. 2023-02-27 11:01:47 +01:00
Alexandre Julliard ae8797c8e3 tools: Add a common helper to setup signal handlers. 2023-01-25 11:47:51 +01:00
Alexandre Julliard 9f0ae8c992 tools: Move signal masking to the common make_temp_file() helper. 2023-01-25 11:47:51 +01:00
Alexandre Julliard ca398e2762 tools: Add a common helper to cleanup temp files. 2023-01-25 11:47:51 +01:00
Alexandre Julliard ecb651c01f tools: Add a common helper to get the argv0 directory. 2023-01-25 11:47:51 +01:00
Alexandre Julliard 6f123e8424 tools: Always fall back to argv[0] to find the tools directory.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54319
2023-01-16 22:08:43 +01:00
Alexandre Julliard bdc40b4b60 tools: Create a temporary directory to store temp files. 2023-01-12 14:47:39 +01:00
Alexandre Julliard 3c235e053c winegcc: Check for Mingw-style .dll.a import libraries.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53918
2022-12-16 17:08:10 +01:00
Alexandre Julliard 19f59ce839 winegcc: Add -ldl when linking .so files.
This is needed for dladdr1/dlinfo to run the constructors.
2022-12-12 23:12:42 +01:00
Jacek Caban cc91a2f933 winegcc: Use -nostdlib instead of -nostartfiles on Clang MSVC targets.
-nostartfiles is not enough if clang is configured with explicit default rtlib.
2022-11-28 21:01:55 +01:00
Alexandre Julliard c1a00d4b5a winegcc: Default to msvcrt mode for all PE builds. 2022-11-16 21:24:19 +01:00
Alexandre Julliard f57c8d68bd winegcc: Remove support for "hybrid" Unix libraries. 2022-11-11 12:07:13 +01:00
Martin Storsjö 6705a71045 winegcc: Prefer -Wl,--pdb=<file> over -Wl,-pdb,<file>.
The previously used syntax, -Wl,-pdb,<file>, was the originally
supported one in lld (since 2018). Later (in 2019) the second
syntax was added, allowing both -Wl,-pdb=<file> and -Wl,-pdb,<file>.
(This other parameter syntax allows easier distinguishing an empty
argument, for letting the linker implicitly pick the file name.)

Move over to using the more modern syntax - reducing the usage of
the old form of the option. This potentially allows deprecating
the original syntax and maybe allows using --pdb as a boolean
flag for implying an automatically named PDB file (which currently
requires using the awkward syntax "--pdb=").

Also prefer the long two dashes form, i.e. --pdb instead of -pdb;
the single dash form is only allowed by getopt when there
are no conflicts with single-letter options, while the form with
two dashes is unambiguous.
2022-11-01 20:46:22 +01:00
Alexandre Julliard 6a91264918 makefiles: Store PE objects in subdirectories in the build tree.
This will make it possible to build multiple PE architectures.
2022-10-26 15:03:05 +02:00
Michael Stefaniuc b46eef7e2a winegcc: Use ARRAY_SIZE instead of open coding it. 2022-10-25 10:59:05 +02:00
Tatsuyuki Ishi 510cfd2762 winegcc: Identify ar files through signature.
Rust uses the ".rlib" extension for intermediate libraries which it
passes to the linker. Detect them through signature so that winegcc will
not try to compile it.

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 09:53:59 +01:00
Brendan Shanks 7b27e60e67 makefiles: On macOS, use @rpath instead of @loader_path when building Unix libs.
Fixes launching 32-bit EXEs from a WOW64 build dir.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52618
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-08 09:32:37 +01:00
Alexandre Julliard 1662af11a4 winegcc: Add support for winebuild --data-only option.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 22:05:33 +01:00
Alexandre Julliard 62f9bd39a2 tools: Consistently use xmalloc/xrealloc/xstrdup everywhere.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:14 +01:00
Kevin Puetz ccf7b4459b winegcc: --out-implib needs to propagate -m32/-m64 to winebuild.
This was already passed through for linking, and for spec.o files,
but was overlooked when implementing -Wl,--out-implib

Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-04 09:48:05 +01:00
Jacek Caban 099ba1b410 winegcc: Use libgcc on Cygwin target.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52328
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-05 17:16:45 +01:00
Alexandre Julliard 9ac2eecbba winegcc: Support an explicit --fake-module option.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 20:15:19 +01:00
Alexandre Julliard d969d02e21 tools: Move target CPU and platform handling to the common tools.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:50:30 +01:00
Alexandre Julliard 8cd3679848 winegcc: Get rid of PowerPC support.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:16:17 +01:00
Alexandre Julliard a7074ea2a3 winegcc: Don't link directly to ntdll or ntoskrnl import libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:19:33 +01:00
Alexandre Julliard 6ebcc54a5c makefiles: Explicitly import all the needed libraries.
Don't rely on winegcc adding any default libraries.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-11 13:28:19 +01:00
Damjan Jovanovic c1e83ae9fb winegcc: Use sysctl instead of /proc/curproc/file on FreeBSD.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-25 18:50:59 +02:00
Alexandre Julliard f9ee0d2f05 tools: Avoid using wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02:00
Alexandre Julliard 9e3959bd9b tools: Add a few helper functions for file names and extensions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:11 +02:00
Alexandre Julliard 55701c6672 tools: Add a helper function to create temp files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:11 +02:00
Alexandre Julliard 2a08d6ce80 tools: Add helper functions to spawn a command from an strarray.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 18:18:49 +02:00
Alexandre Julliard 97ca9f8a3d tools: Add a shared header for common helper functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 17:38:06 +02:00
Chip Davis 9e133a9a22 winegcc: Only add -static-libgcc if -nodefaultlibs weren't given. (Clang).
The flag does nothing if -nodefaultlibs or -nostdlib were given, because
the driver does not automatically link to libgcc/compiler-rt in that
case. Clang will warn about this, which is annoying, which clutters up
the output, and which makes it impossible to use -Werror when building
with Clang.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:15 +02:00
Rémi Bernon 6db01bcbbc winegcc: Add missing strarray initialization.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-24 21:55:19 +02:00
Alexandre Julliard 2064181c1f winegcc: Unify the strarray implementation with the one from makedep.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 14:45:39 +02:00
Alexandre Julliard ab5664a5e6 makefiles: Explicitly name the Unix library in the makefile instead of using --subsystem unixlib.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 17:49:48 +02:00
Zebediah Figura 37ceea6451 winegcc: Correctly put the -munix manual section in its own paragraph.
Use a style consistent with the rest of the file.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00