kjliew / qemu-3dfx

MESA GL/3Dfx Glide pass-through for QEMU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

-fcf-protection is not compatible with this target

OSH1980 opened this issue · comments

So. I'm trying to compile QEMU under Ubuntu 21.10. And I can't because I got this message:
cc1: error: ‘-fcf-protection’ is not compatible with this target
make[2]: *** [Makefile:50: linuxboot_dma.o] Fehler 1
make[1]: *** [Makefile:197: pc-bios/optionrom/all] Fehler 2

This problem appears only under Ubuntu 21.10. Under 20.04 compiling went flawlessly. Any suggestions (except change OS to 20.04)?

It seems that this is both GCC-11 & Ubuntu 21.10 bug by packaging with the affected GCC toolchain.
https://bugs.launchpad.net/ubuntu/+source/gcc-11/+bug/1940029
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70454

The fix is already in GCC. I am not sure how Ubuntu keeps up with GCC upstream these days or if you are comfortable with custom PPA. I personally hated Ubuntu custom PPA during my days with Ubuntu. The easiest fix is to get the updated GCC toolchain with CET fix for your current Ubuntu distro. Otherwise, you can try adding --extra-cflags=-fno-cf-protection or --extra-cflags=-fcf-protection=none to your QEMU configure if this would workaround GCC issue.

I can also offer you another upgrade for QEMU binary package, as the prize & honor for being the First Donor of the project. 😄 I have made several improvements with regard to full-screen game experience since you donated. If you decided to stay with Ubuntu 21.10, then I will setup the VM to build the package for you.

It seems that the following additional configure options may also help you to get around GCC-11 CET issue.

--disable-blobs --disable-docs --disable-guest-agent

The --disable-blobs may be the solution. The other 2 just further reduce dependencies and eliminate spending build time for stuffs that aren't needed.

Hi KJ! I want gladly to test this new package but for Ubuntu 20.04. Can you send it to me?