ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
33.44k stars 2.44k forks source link

Linker flag `--enable-auto-image-base` is not supported #19613

Open alexrp opened 4 months ago

alexrp commented 4 months ago

Zig Version

0.11.0

Steps to Reproduce and Observed Behavior

Build an Autotools project with zig cc targeting any Windows/MinGW-w64 triple.

For example, cross-compiling libopus 1.5.1 from Linux to Windows:

$ mkdir build
$ cd build
$ ../configure --prefix=$PWD CC="zig cc -target x86-windows-gnu" --host=i686-w64-mingw32
$ make
... snip ...
  CCLD     libopus.la
error: unsupported linker arg: --enable-auto-image-base

Expected Behavior

No linker error.

alexrp commented 4 months ago

For reference, this flag is used in Libtool:

tannal commented 3 months ago

Box64 also need this. https://github.com/ptitSeb/box64/blob/46dfaab639b7d2a5af79c288160bfe92b1fd6961/CMakeLists.txt#L937-L939

alexrp commented 2 months ago

Box64 also need this. https://github.com/ptitSeb/box64/blob/46dfaab639b7d2a5af79c288160bfe92b1fd6961/CMakeLists.txt#L937-L939

This seems to be --image-base? That should already be supported.