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

-fcf-protection is not compatible with this target #37

Closed
OSH1980 opened this issue Mar 12, 2022 · 3 comments
Closed

-fcf-protection is not compatible with this target #37

OSH1980 opened this issue Mar 12, 2022 · 3 comments

Comments

@OSH1980
Copy link

OSH1980 commented Mar 12, 2022

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)?

@kjliew
Copy link
Owner

kjliew commented Mar 13, 2022

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.

@kjliew
Copy link
Owner

kjliew commented Mar 13, 2022

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.

@OSH1980
Copy link
Author

OSH1980 commented Mar 21, 2022

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

@kjliew kjliew closed this as completed Mar 25, 2022
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

2 participants