[PATCH] D27123: Add AVR target and toolchain to Clang

Senthil Kumar Selvaraj via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 7 05:00:02 PST 2016


saaadhu updated this revision to Diff 80575.
saaadhu added a comment.

Thanks, setting DoubleFormat and LongDoubleFormat fixed the __DBL_ and __LDBL_ differences. Also, setting SigAtomicType fixed the __SIG_ATOMIC_ differences as well. I've added those defines to the test. Unrelated, but I also removed a redundant set of LongLongAlign and overriding of GetDefaultDwarfVersion (returning 2 wasn't necessary).

The only remaining  (textually) conflicting defines between "avr-gcc -dM -E" and "clang -dM -E" are

1. short vs int for a bunch of __xxx_TYPE__ defines, like say __CHAR16_TYPE__. short and int are both 2 bytes for the avr, so I think either one is ok.
2. Casts vs plain literals in the defines for double MIN, MAX values.  avr-gcc, for example, defines #define __DBL_MAX__ ((double)3.40282347e+38L), whereas clang does  #define __DBL_MAX__ 3.40282347e+38. Again, I think this shouldn't matter - I've added the literals sans the cast to the test.


https://reviews.llvm.org/D27123

Files:
  lib/Basic/Targets.cpp
  lib/Driver/Driver.cpp
  lib/Driver/ToolChains.cpp
  lib/Driver/ToolChains.h
  lib/Driver/Tools.cpp
  lib/Driver/Tools.h
  test/Driver/avr-toolchain.c
  test/Preprocessor/init.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27123.80575.patch
Type: text/x-patch
Size: 14462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161207/f4afac36/attachment.bin>


More information about the cfe-commits mailing list