Am 04.04.25 um 15:44 schrieb Alexandre Julliard:
Alexander Leithner aleithner@level101.at writes:
Shouldn't GCC provide support for -mabi=ms out of the box?
Yes, there must be something else going on. Is the config.log file available?
OK, I've managed to extract config.log from a local OBS build. The section relevant to -mabi=ms reads:
configure:20674: checking for working -mabi=ms configure:20693: gcc -m64 -c -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -mabi=ms conftest.c >&5 conftest.c: In function 'a': conftest.c:165:79: error: control reaches end of non-void function [-Werror=return-type] 165 | int a(int b, ...) { __builtin_ms_va_list list; __builtin_ms_va_start(list,b); } | ^ cc1: some warnings being treated as errors configure:20693: $? = 1
Indeed, the build script on OBS exports a bunch of additional flags before configuring Wine as seen above, including setting -Werror=return-type.
Running configure with CFLAGS='-Werror=return-type ' also is enough to reproduce OBS' config.log output locally on my machine. Is this a bug in -mabi=ms detection or should OBS not set -Werror=return-type?
As a side note, OBS also enables Fortify. Isn't this subsequently disabled by configure anyway? If so, I imagine OBS could just not enable it in the first place, right?
Thanks for your help!
Best, Alexander Leithner
Alexander Leithner aleithner@level101.at writes:
Am 04.04.25 um 15:44 schrieb Alexandre Julliard:
Alexander Leithner aleithner@level101.at writes:
Shouldn't GCC provide support for -mabi=ms out of the box?
Yes, there must be something else going on. Is the config.log file available?
OK, I've managed to extract config.log from a local OBS build. The section relevant to -mabi=ms reads:
configure:20674: checking for working -mabi=ms configure:20693: gcc -m64 -c -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -mabi=ms conftest.c >&5 conftest.c: In function 'a': conftest.c:165:79: error: control reaches end of non-void function [-Werror=return-type] 165 | int a(int b, ...) { __builtin_ms_va_list list; __builtin_ms_va_start(list,b); } | ^ cc1: some warnings being treated as errors configure:20693: $? = 1
Indeed, the build script on OBS exports a bunch of additional flags before configuring Wine as seen above, including setting -Werror=return-type.
Running configure with CFLAGS='-Werror=return-type ' also is enough to reproduce OBS' config.log output locally on my machine. Is this a bug in -mabi=ms detection or should OBS not set -Werror=return-type?
We can work around this specific failure, but yes, setting -Werror options is a bad idea, particularly during configure.
As a side note, OBS also enables Fortify. Isn't this subsequently disabled by configure anyway? If so, I imagine OBS could just not enable it in the first place, right?
Yes, it's useless.
Am 05.04.25 um 14:52 schrieb Alexandre Julliard:
Alexander Leithner aleithner@level101.at writes:
Indeed, the build script on OBS exports a bunch of additional flags before configuring Wine as seen above, including setting -Werror=return-type.
Running configure with CFLAGS='-Werror=return-type ' also is enough to reproduce OBS' config.log output locally on my machine. Is this a bug in -mabi=ms detection or should OBS not set -Werror=return-type?
We can work around this specific failure, but yes, setting -Werror options is a bad idea, particularly during configure.
As a side note, OBS also enables Fortify. Isn't this subsequently disabled by configure anyway? If so, I imagine OBS could just not enable it in the first place, right?
Yes, it's useless.
Thanks for all the help; I've submitted a change request to openSUSE's packaging on OBS. For the time being, exporting -Wno-error=return-type in CFLAGS and CXXFLAGS before configure is called does the trick.
Let's see if it'll be accepted.
This could be removed if/when the configure test is modified to work in case -Werror=return-type is set.
Best, Alexander Leithner