Commit Graph

291 Commits

Author SHA1 Message Date
Alexandre Julliard c670df976c makefiles: Don't use default imports for Unix libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 15:03:08 +02:00
Alexandre Julliard a204ad557d makefiles: Expand makedep path at compile time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Jacek Caban fd71ffb44a winegcc: Try using msvc file align syntax if mingw-style is not supported.
Allows setting file alignment on LLD 10.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-01 10:00:18 +02:00
Jacek Caban 5e4ca097be winegcc: Support file alignment on msvc target.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-01 10:00:18 +02:00
Alexandre Julliard 0e4d22bd8d winegc: Support overriding the default PE file alignment.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +02:00
Rémi Bernon e36bed4f37 winegcc: Align sections in PE files to page size.
This makes sure it will be possible to mmap the section directly instead
of having to copy them. It then also makes perf able to figure the code
origin for Wine modules.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +02:00
Alexandre Julliard cbc35152c4 winegcc: Pass -mno-cygwin and -munix flags directly to winebuild.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:59:35 +02:00
Jacek Caban 0db5f6cf1b winegcc: Add support for -Wl,--whole-archive option.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-26 10:00:30 +02:00
Jacek Caban c5ee64a101 winegcc: Add support for @file arguments.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-26 10:00:29 +02:00
Jacek Caban f42e4431fb winegcc: Store main arguments in strarray.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-26 10:00:26 +02:00
Jacek Caban e9de7761cd winegcc: Pass only raw compiler and linker arguments in forward mode.
Fixes use case like:
CC=winegcc -b i686-w64-mingw32
$CC --version

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-20 20:12:02 +02:00
Jacek Caban 14d97456a9 winegcc: Default to ucrtbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 19:48:56 +02:00
Alexandre Julliard 469058acc1 winegcc: Allow the output file to end in .so.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 23:12:31 +02:00
Jacek Caban 942e298308 winegcc: Introduce --debug-file option for generating separated symbol files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 23:12:31 +02:00
Jacek Caban d784de82c8 winegcc: Use --safeseh winebuild option on msvc target.
lld-link requires all x86 object files to be SEH compatible unless it's
explicitly disabled.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 19:02:58 +02:00
Jacek Caban 35a7ed0c78 winegcc: Add support for msvc target.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 17:33:52 +02:00
Jacek Caban 66aa39d959 winegcc: Use libgcc only on mingw target.
It's not available for msvc, but we get all we need from importlibs there.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 17:33:35 +02:00
Jacek Caban 2dee9b9874 winegcc: Make mingw a separated platform from msvc.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 17:33:28 +02:00
Jacek Caban 78ce43f017 winegcc: Explicitly pass DLL crt entry point to PE linker when Wine crt is used.
Linkers don't agree on its default.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 17:33:00 +02:00
Jacek Caban 346cbb6f26 winegcc: Add entry symbol underscore when building linker command.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 17:32:39 +02:00
Serge Gautherie 0939a3f7f2 winegcc: Reorder DECLSPEC_NORETURN on error().
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 12:57:45 +02:00
Alexandre Julliard 62807be8c9 makefiles: Explicitly import libwine where necessary.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 12:00:08 +02:00
Alexandre Julliard 1ccd638b1a winegcc: No longer use a constructor for module initialization.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 11:27:53 +02:00
Alexandre Julliard c30d30d328 winegcc: Fixup constructors after building a module.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard b336a084d6 winegcc: Only use a constructor for dll modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 20:03:30 +02:00
Alexandre Julliard 3622b9ab15 winegcc: Use the CRT startup code also for non-PE builds.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 17:21:07 +02:00
Chip Davis f83646736b winegcc: Put quotes around arguments with spaces when printing them.
This makes it easier to copy and paste the command into the shell.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:46:03 +02:00
Jacek Caban aabfd2dd3a winegcc: Add support for using clang directly.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 14:22:17 +01:00
Jacek Caban 9a9f35a4df winegcc: Pass tool by id to build_tool_name.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 14:22:13 +01:00
Jacek Caban 4cfe747772 winegcc: Return build_tool_name result as strarray.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 14:22:11 +01:00
Jacek Caban 945c61c32d winegcc: Lookup PATH in find_binary and don't try to run binaries that can't be found.
Based on winebuild.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 14:22:07 +01:00
Jacek Caban 747c46a4bc winegcc: Don't pass ld command to winebuild when building PE file.
It's not used anyway.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-28 16:39:02 +01:00
Jacek Caban e7fe6c0ac2 winegcc: Fix passing -delayload argument to linker.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-28 16:39:02 +01:00
Jacek Caban cf20f54dd9 winegcc: Check more target components for platform string.
Fixes parsing llvm style mingw target *-pc-windows-gnu.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Jacek Caban b253bd6565 winegcc: Clean up output file on error.
Based on winebuild.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 21:10:40 +01:00
Jacek Caban b0ea67ed46 winegcc: Treat -target argument as an alias to --target for clang compatibility.
clang uses -target for the same thing as we do.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 21:10:29 +01:00
Jacek Caban 8cf418314c winegcc: Recognize -rtlib as linker argument.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 21:10:22 +01:00
Alexandre Julliard d96a0acf29 winegcc: Make the WINEBUILD variable take precedence over the bin directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-06 21:40:22 +01:00
Alexandre Julliard 69a9c2be72 winegcc: Also search the include and lib dirs relative to the binary path.
Suggested by Kevin Puetz.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:57:11 +01:00
Jacek Caban 1867a411b0 winegcc: Use Wine crt when linking to msvcrt.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:40:42 +01:00
Jacek Caban c6e6771fab winegcc: Use Wine crt when linking builtin EXEs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01:00
Jacek Caban 618ac5f32a winegcc: Add support for -Wl,--entry argument.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01:00
Alexandre Julliard 51ffea5a39 winegcc: Use winebuild to set the builtin flag.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-18 21:13:16 +01:00
Chip Davis 6c50dbd14e winegcc: Pass through -fuse-ld= to the linker.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Jacek Caban 9180dec0b7 winegcc: Add support for -Wl,-delayload argument.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 21:39:40 +01:00
Alexandre Julliard 21c832da63 winegcc: Also check magic number to detect shared libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:43:01 +01:00
Huw Davies ba2def2503 winegcc: Add a missing break.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 11:48:21 +02:00
Alexandre Julliard 0bfee2c6eb winegcc: Centralize argument parsing into the main switch.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 13:26:52 +02:00
Alexandre Julliard c307223791 winegcc: Update __stdcall defines for ARM platforms.
Reported by Kevin Puetz.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 13:26:52 +02:00
Kevin Puetz d5e175e32b winegcc: Correctly pass the '-' file name (stdin) to the compiler.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38300
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-24 18:38:28 +02:00