From 0d8a7e16662d236a803d4c9a43b49f25067969df Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sun, 16 Sep 2018 14:50:56 +0200 Subject: avr: link with the GCC runtime library This allows the use of some compiler-generated builtins that are hopefully compatible with LLVM. Example: println(uint8(foo)) Code size is unchanged normally but of course compiler builtins will increase code size when actually used (for example with division). --- targets/arduino.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'targets') diff --git a/targets/arduino.json b/targets/arduino.json index 39d5f44f7..ab3150314 100644 --- a/targets/arduino.json +++ b/targets/arduino.json @@ -2,7 +2,7 @@ "llvm-target": "avr-atmel-none", "build-tags": ["avr", "avr8", "atmega", "atmega328p", "js", "wasm"], "linker": "avr-gcc", - "pre-link-args": ["-nostdlib", "-T", "targets/avr.ld", "-Wl,--gc-sections", "targets/avr.S"], + "pre-link-args": ["-nostartfiles", "-T", "targets/avr.ld", "-Wl,--gc-sections", "targets/avr.S"], "objcopy": "avr-objcopy", "flash": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}" } -- cgit v1.2.3