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

RTEMS CMake module does not define all required outputs #145

Closed
jphickey opened this issue Mar 26, 2020 · 1 comment · Fixed by #146 or #153
Closed

RTEMS CMake module does not define all required outputs #145

jphickey opened this issue Mar 26, 2020 · 1 comment · Fixed by #146 or #153
Labels
bug Something isn't working
Milestone

Comments

@jphickey
Copy link
Contributor

Describe the bug
When building with CFE, this ultimately triggers a (seemingly) unrelated error:

i386-rtems4.11-gcc: error: unrecognized command line option '--whole-archive'
i386-rtems4.11-gcc: error: unrecognized command line option '--no-whole-archive'

To Reproduce
Build software for i686-rtems4.11 per README instructions and example toolchain

Expected behavior
Build should succeed without warnings or errors

System observed on:
Ubuntu 18.04 LTS 64-bit (build host) building for i686-rtems4.11

Additional context
This regression was introduced when CFE added logic to inspect the variable CMAKE_EXE_EXPORTS_C_FLAG and use the same flags for the --[no-]whole-archive option on the link line. Normally CMAKE_EXE_EXPORTS_C_FLAG is exported by the platform module, but not in the locally-provided RTEMS module.

RTEMS uses the compiler to perform linking (gcc) and as such it needs the -Wl, prefix. It may also benefit from --export-dynamic anyway so it is a good idea to include this.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey
Copy link
Contributor Author

NOTE - Change also needs to be coordinated with nasa/cFE#573, which is a related issue in the example toolchain file.

jphickey added a commit to jphickey/PSP that referenced this issue Mar 26, 2020
Addresses various compatibility/usability issues observed during testing

- Correctly set/export the CMAKE_EXE_EXPORTS_C_FLAG
- Incorporate the system specs directly into the COMPILE_OBJECT templates
  so these don't need to be specified by the toolchain or CMAKE_C_FLAGS
- Similarly include the always-needed linker flags flags for entry point
  and relocation address into the linker command template
@skliper skliper added the bug Something isn't working label Mar 27, 2020
astrogeco added a commit that referenced this issue Apr 14, 2020
@skliper skliper added this to the 1.5.0 milestone Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants