[GH-ISSUE #2661] Fedora 30 Compilation Errors #1677

Closed
opened 2026-05-05 08:19:27 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @SkewedZeppelin on GitHub (Apr 23, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2661

Fedora 30 has changed the default compile flags for programs. One new addition is -fcf-protection which is marked incompatible with -mindirect-branch.

Example:

/usr/include/bits/stdio.h: In function 'getchar':
/usr/include/bits/stdio.h:48:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   48 | {
      | ^

https://github.com/netblue30/firejail/blob/master/configure#L3113
will need to be changed.

Originally created by @SkewedZeppelin on GitHub (Apr 23, 2019). Original GitHub issue: https://github.com/netblue30/firejail/issues/2661 Fedora 30 has changed the default compile flags for programs. One new addition is `-fcf-protection` which is marked incompatible with `-mindirect-branch`. Example: ``` /usr/include/bits/stdio.h: In function 'getchar': /usr/include/bits/stdio.h:48:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible 48 | { | ^ ``` https://github.com/netblue30/firejail/blob/master/configure#L3113 will need to be changed.
Author
Owner

@chiraag-nataraj commented on GitHub (May 21, 2019):

So how do we do this such that it doesn't affect other distros which haven't (yet?) done this?

<!-- gh-comment-id:494216818 --> @chiraag-nataraj commented on GitHub (May 21, 2019): So how do we do this such that it doesn't affect other distros which haven't (yet?) done this?
Author
Owner

@rusty-snake commented on GitHub (May 31, 2019):

Maybe something like

[ -e /etc/fedora-release ] && [ "$(cat /etc/fedora-release)" = "Fedora release 30 (Thirty)" ]
<!-- gh-comment-id:497688528 --> @rusty-snake commented on GitHub (May 31, 2019): Maybe something like ```bash [ -e /etc/fedora-release ] && [ "$(cat /etc/fedora-release)" = "Fedora release 30 (Thirty)" ] ```
Author
Owner

@Vincent43 commented on GitHub (May 31, 2019):

I think it's better to detect if -fcf-protection is passed in CFLAGS.

<!-- gh-comment-id:497785056 --> @Vincent43 commented on GitHub (May 31, 2019): I think it's better to detect if `-fcf-protection` is passed in `CFLAGS`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1677
No description provided.