extinguish opened a new pull request, #17864:
URL: https://github.com/apache/nuttx/pull/17864

   ## Summary
   
   Add a workaround in the Green Hills CMake build configuration to handle the 
compiler's restriction that preprocessed linker script files (*.ld) must have a 
.i output suffix. When preprocessing a file ending with .ld, the intermediate 
output is now generated as *.ld.i and then copied to the expected target 
filename.
   
   ## Impact
   
   1. Fixes the Green Hills compilation error:
   ```
   ccarm: Error: -o .../gnu-elf.ld has wrong suffix for -P option (expect .i)
   ```
   2. Ensures linker scripts (e.g., gnu-elf.ld) can be preprocessed 
successfully when building with the Green Hills toolchain.
   3. No effect on other toolchains (GCC, Clang, etc.)—the workaround is only 
applied for GHS builds.
   
   ## Testing
   
   1. Verified that builds with Green Hills compiler no longer report the 
suffix error for *.ld files.
   2. Confirmed that the final preprocessed linker script is correctly produced 
and used in the linking stage.
   3. Ensured the change does not break preprocessing of other file types or 
affect non‑GHS toolchain builds.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to