v01d edited a comment on issue #1764:
URL: 
https://github.com/apache/incubator-nuttx/issues/1764#issuecomment-691369441


   Actually I found a different problem (although I believe the one I mentioned 
still holds, but just in another case which wasn't mine): the library files are 
built by just doing "ar crs lib.a objs...", which will simply append the object 
files to the existing .a file. When a .o is not built anymore, the .a will 
still include it and generate a "multiple definitions" error. In this case the 
solution would be to redefine the `ARCHIVE` macro as:
   
   <pre>
   define ARCHIVE
           $(RM) $1
           $(AR) $1 $(2)
   endef
   </pre>
   
   Do you think it is correct to do so? This ensure the .a file is of only 
object files passed as parameter.
   
   EDIT: OK, I see some cases where ARCHIVE is actually used to aggregate 
object files from different places. I considered this case also. I created a PR 
for this second problem: #1765 


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to