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>
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>
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>
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>
On macOS unixlibs that link to ntdll.so currently fail to load.
It appears the macOS loader needs to be able to locate the file
even if the library is already loaded.
This patch changes the LC_ID_DYLIB name of ntdll.so to
"@loader_path/ntdll.so" so that when other unixlibs link against this
they will insert that name into their LC_LOAD_DYLIB entry for
ntdll.so.
While changing only ntdll.so is necessary, for simplicity this patch
changes all unixlibs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51632
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
These arguments need to be in the correct position so they need to go in
the files array.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
While you could get 90% of the way with "-lpthread", supporting -pthread
should be more reliable and is required for build systems like meson
that have special handling for the threads dependency.
Since this is both a compiler (really preprocessor) and linker option,
we can't just add it to is_linker_arg().
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
For more compatibility with mingw-gcc. Since meson always names object
files with a .obj extension when using mingw, this improves
compatibility with meson.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
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>
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>
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>
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>