nasa / PSP

The Core Flight System (cFS) Platform Support Package (PSP)
Apache License 2.0
66 stars 56 forks source link

RTEMS.cmake: add quotes around ${RTEMS_BSP_C_FLAGS}. #395

Closed Jkillelea closed 10 months ago

Jkillelea commented 1 year ago

Without the quotes, only the first argument is actually passed to the compiler by rtems-syms.

Checklist (Please check before submitting)

Describe the contribution A clear and concise description of what the contribution is.

Testing performed Steps taken to test the contribution:

  1. Only tested to check if compilation succeeds.

Expected behavior changes A clear and concise description of how this contribution will change behavior and level of impact.

Before: The only flag that rtems-syms passes to the compiler is -march=armv7-a. This causes a crash because the compiler assumes the wrong floating point ABI.

/home/jacob/projects/rtems/6/bin/rtems-syms -vvv -e -c -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a7 -fno-common -fdata-sections -ffunction-sections -C /home/jacob/projects/rtems/6/bin/arm-rtems6-gcc -o cmTC_56657.exe-dl-sym.o cmTC_56657.exe-prelink
    RTEMS Kernel Symbols 6.ac1fee4f04fe
    kernel: cmTC_56657.exe-prelink
    cache:load-sym: object files: 1
    cache:load-sym: symbols: 1459
    Filtered symbols: 1074
    symbol C file: /tmp/ccaneeaa.c
    symbol O file: cmTC_56657.exe-dl-sym.o
    execute: /home/jacob/projects/rtems/6/bin/arm-rtems6-gcc -march=armv7-a -O2 -c -o cmTC_56657.exe-dl-sym.o /tmp/ccaneeaa.c 

After: All flags are correctly passed to the compiler. The floating point ABI is correctly specified.

/home/jacob/projects/rtems/6/bin/rtems-syms -vvv -e -c "-march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a7 -fno-common -fdata-sections -ffunction-sections" -C /home/jacob/projects/rtems/6/bin/arm-rtems6-gcc -o cmTC_ed3ae.exe-dl-sym.o cmTC_ed3ae.exe-prelink
RTEMS Kernel Symbols 6.ac1fee4f04fe
kernel: cmTC_ed3ae.exe-prelink
cache:load-sym: object files: 1
cache:load-sym: symbols: 1463
Filtered symbols: 1075
symbol C file: /tmp/ccNoeeaa.c
symbol O file: cmTC_ed3ae.exe-dl-sym.o
execute: /home/jacob/projects/rtems/6/bin/arm-rtems6-gcc -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a7 -fno-common -fdata-sections -ffunction-sections -O2 -c -o cmTC_ed3ae.exe-dl-sym.o /tmp/ccNoeeaa.c 

System(s) tested on

Additional context N/A

Third party code N/A

Contributor Info - All information REQUIRED for consideration of pull request Full name and company/organization/center of all contributors ("Personal" if individual work)