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>
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>
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>
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>
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>
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>