benshi001 added a comment.

For some devices, the library sub path "-L" and family name "-m" are not always 
equal.
-L/usr/lib/avr/lib/XXX" "-L/usr/lib/gcc/avr/5.4.0/XXX" "-mYYY"

XXX and YYY do not always equal to each other. But current 
clang/lib/Driver/ToolChains/AVR.cpp assumes they equal.

For example, "./bin/clang  -O2 -Wall b.c --target=avr -mmcu=atmega2313" needs 
the following avr-ld options
"/usr/bin/avr-ld" *** "-L/usr/lib/avr/lib/avr25/tiny-stack" 
"-L/usr/lib/gcc/avr/5.4.0/avr25/tiny-stack" "-mavr25"

Here XXX=avr25/tiny-stack but YYY = avr25


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88410/new/

https://reviews.llvm.org/D88410

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to