You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/18 16:01:08 UTC
[GitHub] [incubator-nuttx] ppisa opened a new pull request #4173: Make: fix use of gcc as LD for modules and ELF executables builds
ppisa opened a new pull request #4173:
URL: https://github.com/apache/incubator-nuttx/pull/4173
## Summary
The patch
Make: use gcc as LD
introduced use of GCC wrapper as linker. LD variable references GCC
executable now. But when GCC wrapper s used to build relocatable
loadable objects (ELF executables and modules) then it causes
linking of toolchain default libc and other libraries even when -r
is usd. Another problem is that incorrect multiarch variant is selected
for libraries search and possibly even for LTO or C++ templates
instantiating and other glue code which causes fails during linking
if CFLAGS selects non/default miltiarch variant.
Corresponding CFLAGS are passed to LDMODULEFLAGS and LDELFFLAGS
as well as -nostartfiles -nodefaultlibs options.
Separate line is used to easily find and adjust lines if link
process is changed in future.
Signed-off-by: Pavel Pisa <pp...@pikron.com>
## Impact
## Testing
Tested on LX_CPU board
tools/configure.sh lx_cpu:nsh
This board default config enables ELF and MODULES which results
in the build errors
/usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: error:
chardev.o uses VFP register arguments, chardev does not
/usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: failed to
merge target specific data of file chardev.o
collect2: error: ld returned 1 exit status
If only CFLAGS are added then linking of GCC/Newlib provided CRT0 and LIBC
causes attempt t export symbols which are not provided by NuttX build and build
fails in the linking phase.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis merged pull request #4173: Make: fix use of gcc as LD for modules and ELF executables builds
Posted by GitBox <gi...@apache.org>.
acassis merged pull request #4173:
URL: https://github.com/apache/incubator-nuttx/pull/4173
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis merged pull request #4173: Make: fix use of gcc as LD for modules and ELF executables builds
Posted by GitBox <gi...@apache.org>.
acassis merged pull request #4173:
URL: https://github.com/apache/incubator-nuttx/pull/4173
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis merged pull request #4173: Make: fix use of gcc as LD for modules and ELF executables builds
Posted by GitBox <gi...@apache.org>.
acassis merged pull request #4173:
URL: https://github.com/apache/incubator-nuttx/pull/4173
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org