[Bug 48846] msvcr90/tests/msvcr90.c: error: variadic functions must use the base AAPCS variant

WineHQ Bugzilla wine-bugs at winehq.org
Sun Mar 29 07:10:14 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48846

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net
           Hardware|x86                         |arm
           Keywords|                            |regression
    Regression SHA1|                            |0a89a699135802b083d142130d3
                   |                            |b0ef618485478

--- Comment #1 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming. Although I regularly cross-compile Wine for ARMv7 and AArch64 on my
x86_64 host I didn't notice the breakage due to having building of tests
disabled by default :|

The build regression was introduced here:
https://source.winehq.org/git/wine.git/commitdiff/0a89a699135802b083d142130d3b0ef618485478
("msvcrt: Fix fscanf return when EOF is immediately after an end of line.")

You need to use WINAPIV calling convention for variadic functions. This was
missed here when the test got added.

Poky SDK cross-toolchain for ARMv7 hard-float target:

--- snip ---
...
make[1]: Entering directory
'/home/focht/projects/wine/mainline-build-arm/dlls/msvcr90/tests'
arm-pokymllib32-linux-gnueabi-gcc  -march=armv7-a -mthumb -mfpu=neon-vfpv4
-mfloat-abi=hard
--sysroot=/home/focht/projects/poky/sdk-install/sysroots/aarch64-poky-linux -c
-o msvcr90.o
/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests/msvcr90.c -I. \
  -I/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests
-I../../../include \
  -I/home/focht/projects/wine/mainline-src/include \
  -I/home/focht/projects/wine/mainline-src/include/msvcrt -D__WINESRC__
-D_REENTRANT -fPIC \
  -fno-builtin -fshort-wchar -Wall -pipe -fcf-protection=none
-fno-stack-protector \
  -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body
-Wignored-qualifiers \
  -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits
\
  -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op
-gdwarf-2 \
  -gstrict-dwarf -g -O2  -marm -mfloat-abi=hard -mfpu=neon
/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests/msvcr90.c: In
function ‘test_swscanf’:
/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests/msvcr90.c:1941:9:
error: variadic functions must use the base AAPCS variant
     ret = p_swscanf(L" \t\n\n", L"%s", buffer);
     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests/msvcr90.c:1941:9:
error: variadic functions must use the base AAPCS variant
make[1]: *** [Makefile:180: msvcr90.o] Error 1
make[1]: Leaving directory
'/home/focht/projects/wine/mainline-build-arm/dlls/msvcr90/tests'
make: *** [Makefile:9191: dlls/msvcr90/tests] Error 2
--- snip ---

AArch64 (AAPCS64) is fine:

--- snip ---
...
aarch64-poky-linux-clang  -mlittle-endian
--sysroot=/home/focht/projects/poky/sdk-install/sysroots/aarch64-poky-linux -c
-o msvcr90.o
/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests/msvcr90.c -I. \
  -I/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests
-I../../../include \
  -I/home/focht/projects/wine/mainline-src/include \
  -I/home/focht/projects/wine/mainline-src/include/msvcrt -D__WINESRC__
-D_REENTRANT -fPIC \
  -fno-builtin -fshort-wchar -Wall -pipe -fcf-protection=none
-fno-stack-protector \
  -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body
-Wignored-qualifiers \
  -Wno-pragma-pack -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings
-Wpointer-arith -gdwarf-2 \
  -gstrict-dwarf -g -O2 -ffixed-x18
aarch64-poky-linux-clang  -mlittle-endian
--sysroot=/home/focht/projects/poky/sdk-install/sysroots/aarch64-poky-linux -c
-o testlist.o testlist.c -I.
-I/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests \
  -I../../../include -I/home/focht/projects/wine/mainline-src/include \
  -I/home/focht/projects/wine/mainline-src/include/msvcrt -D__WINESRC__
-D_REENTRANT -fPIC \
  -fno-builtin -fshort-wchar -Wall -pipe -fcf-protection=none
-fno-stack-protector \
  -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body
-Wignored-qualifiers \
  -Wno-pragma-pack -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings
-Wpointer-arith -gdwarf-2 \
  -gstrict-dwarf -g -O2 -ffixed-x18
/home/focht/projects/wine/mainline-build-x86_64/tools/wrc/wrc -u -o msvcr90.res
-b aarch64-poky-linux \
  --nostdinc -I. -I/home/focht/projects/wine/mainline-src/dlls/msvcr90/tests
-I../../../include \
  -I/home/focht/projects/wine/mainline-src/include \
  -I/home/focht/projects/wine/mainline-src/include/msvcrt -D__WINESRC__ \
  /home/focht/projects/wine/mainline-src/dlls/msvcr90/tests/msvcr90.rc
/home/focht/projects/wine/mainline-build-x86_64/tools/winegcc/winegcc -o
msvcr90_test-stripped.exe.so --wine-objdir ../../.. \
  --winebuild
/home/focht/projects/wine/mainline-build-x86_64/tools/winebuild/winebuild -b \
  aarch64-poky-linux -fPIC -fasynchronous-unwind-tables -s
-Wb,-F,msvcr90_test.exe -mno-cygwin \
  msvcr90.o testlist.o msvcr90.res -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
echo "msvcr90_test.exe TESTRES \"msvcr90_test-stripped.exe.so\"" |
/home/focht/projects/wine/mainline-build-x86_64/tools/wrc/wrc -u -o
../../../programs/winetest/msvcr90_test.res
/home/focht/projects/wine/mainline-build-x86_64/tools/winegcc/winegcc -o
msvcr90_test.exe.so --wine-objdir ../../.. \
  --winebuild
/home/focht/projects/wine/mainline-build-x86_64/tools/winebuild/winebuild -b \
  aarch64-poky-linux -fPIC -fasynchronous-unwind-tables -mno-cygwin msvcr90.o
testlist.o msvcr90.res \
  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
make[1]: Leaving directory
'/home/focht/projects/wine/mainline-build-aarch64/dlls/msvcr90/tests'
--- snip ---

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list