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

Use -fno-common in CI workflow builds #2218

Closed
3 tasks done
jphickey opened this issue Dec 1, 2022 · 2 comments · Fixed by #2219
Closed
3 tasks done

Use -fno-common in CI workflow builds #2218

jphickey opened this issue Dec 1, 2022 · 2 comments · Fixed by #2219
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Dec 1, 2022

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the cFS README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Some versions of the GNU toolchains enable -fcommon by default, so globals end up in a "common" section rather than the normal "bss" section. The CFS apps should not rely on common sections, as it can mask duplicate symbols and cause strange results if not expected. In particular, this feature hid linking errors in nasa/LC#51.

Describe the solution you'd like
Add -fno-common to the default arch_build_custom_native.cmake file so this feature is consistently not enabled rather than assuming the default for whatever version of gcc/binutils is being used at the time.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Dec 1, 2022
@jphickey
Copy link
Contributor Author

jphickey commented Dec 1, 2022

For now just asking the question, trivial PR can be submitted if we decide to do this.

@jphickey
Copy link
Contributor Author

jphickey commented Dec 1, 2022

I realized this change needs to happen in CFE, as this is where the reference copy of arch_build_custom.cmake lives.

@jphickey jphickey transferred this issue from nasa/cFS Dec 1, 2022
@jphickey jphickey removed the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Dec 1, 2022
dzbaker added a commit that referenced this issue Dec 6, 2022
Fix #2218, add -fno-common to arch build flags
@dzbaker dzbaker closed this as completed in 200031f Dec 6, 2022
@dmknutsen dmknutsen added this to the Draco milestone Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants