joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.69k stars 381 forks source link

Build fails with 'asm' operand has impossible constraints #5219

Open juanitotc opened 1 week ago

juanitotc commented 1 week ago

Describe the bug

Building dosbox-x-dosbox-x-v2024.07.01 using gcc-13.2 fails with:

In function 'ESFM_process_feedback',
    inlined from 'ESFM_generate' at esfmu/esfm.c:2222:2:
esfmu/esfm.c:1849:25: error: 'asm' operand has impossible constraints
 1849 |                         asm (

Using -fomit-frame-pointer seems to fix this

Steps to reproduce the behaviour

CPPFLAGS="-I/usr/local/include/ncursesw" LIBS="-lncursesw" CC="gcc -march=i486 -mtune=i686 -Os -pipe -fomit-frame-pointer" CXX="g++ -march=i486 -mtune=i686 -Os -pipe" ./configure --prefix=/usr/local --localstatedir=/var --enable-sdl2

find . -name Makefile -type f -exec sed -i 's/-g -std=gnu11  -O2/-std=gnu11/g' {} \;
find . -name Makefile -type f -exec sed -i 's/-g -std=gnu++14  -O2/-std=gnu++14/g' {} \;

make

Expected behavior

Builds without error

What operating system(s) this bug have occurred on?

tinycorelinux

What version(s) of DOSBox-X have this bug?

dosbox-x-v2024.07.01

Used configuration

No response

Output log

No response

Additional information

No response

Have you checked that no similar bug report(s) exist?

Code of Conduct & Contributing Guidelines

maron2000 commented 1 week ago

The code is Imported from https://github.com/Kagamiin/ESFMu so this issue should be reported and fixed there. Maybe a bug of gcc-13 since gcc-14 and mingw lowend gcc7.3.0 is building fine.