Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with GCC14 #43

Open
ggardet opened this issue Aug 29, 2024 · 2 comments
Open

Build fails with GCC14 #43

ggardet opened this issue Aug 29, 2024 · 2 comments

Comments

@ggardet
Copy link

ggardet commented Aug 29, 2024

Build fails with GCC14.
Error log:

[   12s] gcc -c -g -O2 -fPIC -fvisibility=hidden -fomit-frame-pointer -Wall mem.c
[   12s] mem.c: In function ‘vm_i_byte’:
[   12s] mem.c:581:12: error: implicit declaration of function ‘inb’; did you mean ‘ins’? [-Wimplicit-function-declaration]
[   12s]   581 |     return inb(addr);
[   12s]       |            ^~~
[   12s]       |            ins
[   12s] mem.c: In function ‘vm_i_word’:
[   12s] mem.c:619:10: error: implicit declaration of function ‘inw’; did you mean ‘ins’? [-Wimplicit-function-declaration]
[   12s]   619 |   return inw(addr);
[   12s]       |          ^~~
[   12s]       |          ins
[   12s] mem.c: In function ‘vm_i_dword’:
[   12s] mem.c:657:10: error: implicit declaration of function ‘inl’; did you mean ‘ins’? [-Wimplicit-function-declaration]
[   12s]   657 |   return inl(addr);
[   12s]       |          ^~~
[   12s]       |          ins
[   12s] mem.c: In function ‘vm_o_byte’:
[   12s] mem.c:676:5: error: implicit declaration of function ‘outb’; did you mean ‘outs’? [-Wimplicit-function-declaration]
[   12s]   676 |     outb(val, addr);
[   12s]       |     ^~~~
[   12s]       |     outs
[   12s] mem.c: In function ‘vm_o_word’:
[   12s] mem.c:711:3: error: implicit declaration of function ‘outw’; did you mean ‘outs’? [-Wimplicit-function-declaration]
[   12s]   711 |   outw(val, addr);
[   12s]       |   ^~~~
[   12s]       |   outs
[   12s] mem.c: In function ‘vm_o_dword’:
[   12s] mem.c:748:3: error: implicit declaration of function ‘outl’; did you mean ‘outs’? [-Wimplicit-function-declaration]
[   12s]   748 |   outl(val, addr);
[   12s]       |   ^~~~
[   12s]       |   outs
[   12s] make: *** [Makefile:30: mem.o] Error 1

Likely a matter of adding #include <sys/io.h>.

@ggardet
Copy link
Author

ggardet commented Sep 5, 2024

<sys/io.h> is only available on x86, and libx86emu is not used on aarch64, ppc64, etc, only on x86 for firmware purpose.
So, we may just need to allow build on x86 only.

@ggardet
Copy link
Author

ggardet commented Sep 5, 2024

@wfeldt WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant