[PATCH] D88410: [clang][AVR] Improve avr-ld command line options

Ben Shi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 05:45:30 PDT 2020


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



More information about the cfe-commits mailing list