2020-11-17 23:28:41 +08:00
|
|
|
// RUN: %clang -### -target avr -no-canonical-prefixes -save-temps -mmcu=attiny102 %s 2>&1 | FileCheck --check-prefix=WARN0 %s
|
|
|
|
// WARN0: warning: support for linking stdlibs for microcontroller 'attiny102' is not implemented
|
|
|
|
// WARN0: warning: standard library not linked and so no interrupt vector table or compiler runtime routines will be linked
|
[AVR] Automatically link CRT and libgcc from the system avr-gcc
Summary:
This patch modifies the AVR toolchain so that if avr-gcc and avr-libc
are detected during compilation, the CRT, libgcc, libm, and libc anre
linked.
This matches avr-gcc's default behaviour, and the expected behaviour of
all C compilers - including the C runtime.
avr-gcc also needs a -mmcu specified in order to link runtime libraries.
The difference betwen this patch and avr-gcc is that this patch will
warn users whenever they compile without a runtime, as opposed to GCC,
which silently trims the runtime libs from the linker arguments when no
-mmcu is specified.
Reviewers: aaron.ballman, kparzysz, asb, hfinkel, brucehoult, TimNN
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D54334
llvm-svn: 361116
2019-05-19 17:54:14 +08:00
|
|
|
|
2020-11-17 23:28:41 +08:00
|
|
|
// RUN: %clang -### -target avr -no-canonical-prefixes -save-temps -mmcu=atxmega32x1 %s 2>&1 | FileCheck --check-prefix=WARN1 %s
|
|
|
|
// WARN1: warning: support for linking stdlibs for microcontroller 'atxmega32x1' is not implemented
|
|
|
|
// WARN1: warning: standard library not linked and so no interrupt vector table or compiler runtime routines will be linked
|
[AVR] Automatically link CRT and libgcc from the system avr-gcc
Summary:
This patch modifies the AVR toolchain so that if avr-gcc and avr-libc
are detected during compilation, the CRT, libgcc, libm, and libc anre
linked.
This matches avr-gcc's default behaviour, and the expected behaviour of
all C compilers - including the C runtime.
avr-gcc also needs a -mmcu specified in order to link runtime libraries.
The difference betwen this patch and avr-gcc is that this patch will
warn users whenever they compile without a runtime, as opposed to GCC,
which silently trims the runtime libs from the linker arguments when no
-mmcu is specified.
Reviewers: aaron.ballman, kparzysz, asb, hfinkel, brucehoult, TimNN
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D54334
llvm-svn: 361116
2019-05-19 17:54:14 +08:00
|
|
|
|
|
|
|
int main() { return 0; }
|
|
|
|
|