anjiahao1 opened a new pull request, #4189:
URL: https://github.com/apache/nuttx-apps/pull/4189

   ## Summary
   
   Pass EXTRA_LIBPATHS when linking modules.
   
   ELFLD links a module with MODLDFLAGS and LDLIBPATH but not with
   EXTRA_LIBPATHS, although an exported build provides EXTRA_LIBPATHS in
   makeinfo.sh (nuttx tools/Export.mk writes it).  A module that needs a
   library from one of the extra paths therefore fails to link in an
   exported build.  Pass EXTRA_LIBPATHS to MODULELD, the same way the
   regular application link does.
   
   ## Impact
   
   * Is new feature added? NO - build fix.
   * Impact on user: NO
   * Impact on build: NO - the variable is empty in a normal in-tree
     build, so the link command is unchanged there.
   * Impact on hardware: NO
   * Impact on documentation: NO
   * Impact on security: NO
   * Impact on compatibility: NO
   
   ## Testing
   
   Build host: Linux x86_64, gcc 13.3.
   
   ```
   tools/configure.sh -a <apps> sim:module
   make -j$(nproc)
   ```
   
   The build completes and ELFLD is exercised by the module application:
   `LD: <apps>/bin/chardev` is present in the build log.  In this in-tree
   build EXTRA_LIBPATHS is empty, so the link command is unchanged; in an
   exported build the variable carries the extra library paths.
   
   ## PR verification
   
   * [x] This PR introduces only one functional change.
   * [x] I have updated all required description fields above.
   * [x] My PR adheres to Contributing Guidelines and Documentation.
   * [ ] My PR is still work in progress (not ready for review).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   


-- 
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