Jacek Caban
87e1e43506
winegcc: Use msvcrt by default for PE targets.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 20:56:54 +02:00
Alexandre Julliard
0aa335b106
winegcc: Look for libraries in the architecture-specific directory.
...
Based on patches by Jacek Caban.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 16:25:48 +02:00
Jacek Caban
5a1d836def
winegcc: Use -idirafter for system include paths.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50996
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 21:12:57 +02:00
Jacek Caban
4f78781299
winegcc: Add Wine include directories before standard directories on search list.
...
This is especially important for msvcrt headers, which need to be used
instead of system ones.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Jacek Caban
c7a210bc2f
winegcc: Use paths for found libraries on PE targets when using msvcrt.
...
We use -nodefaultlibs now, so we don't need to worry about GCC additions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Francois Gouget
5d80ee4b60
winegcc: Add a trailing linefeed to an error() message.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:42:33 +01:00
Jacek Caban
d281c90c4b
winegcc: Properly set debug info type on msvc targets.
...
Fixes a typo from 9faa5eeddd
.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 22:21:13 +01:00
Alexandre Julliard
7c909489b4
winegcc: Pass the same winebuild args to all winebuild invocations.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 17:34:36 +01:00
Alexandre Julliard
4e9f855be5
winegcc: Look for ntdll.so instead of libwine.so to find the library directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 22:25:59 +01:00
Kevin Puetz
a1078d4770
winebuild: Select all __wine_spec_exe* entry inside winebuild.
...
Override --entry in winegcc only when it applies to any compiler
(e.g. kernel drivers or msvcrt) but leave spec details to winebuild.
Forward -municode so winebuild will know which to use.
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 22:18:20 +01:00
Kevin Puetz
9faa5eeddd
winegcc: Implement -Wl,--out-implib.
...
This allows a CMake toolchain (or other caller) to treat winegcc like MinGW,
specifying that it produce a separate file for imports, e.g.
set(CMAKE_IMPORT_LIBRARY_PREFIX lib)
set(CMAKE_IMPORT_LIBRARY_SUFFIX .a)
string(APPEND CMAKE_C_CREATE_SHARED_LIBRARY " -Wl,--out-implib,<TARGET_IMPLIB>")
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Alexandre Julliard
27b20c1db5
makefiles: Don't add a default crt lib for msvcrt dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-19 21:23:21 +01:00
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