[riot-notifications] [RIOT-OS/RIOT] Makefile.include: RIOTNOLINK ensure linking fails (#11168)

Gaƫtan Harter notifications at github.com
Tue Mar 12 17:44:35 CET 2019


### Contribution description

This checks that linking correctly fails when it is supposed to.
This should help keeping the `BOARD_INSUFFICIENT_MEMORY` list up to date.


### Testing procedure

This verifies the board is indeed not linking:

```
RIOT_CI_BUILD=1 BOARD=arduino-uno make  -C examples/default
make: Entering directory '/home/harter/work/git/RIOT/examples/default'
CI-build: skipping link step
Building application "default" for "arduino-uno" with MCU "atmega328p".

/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x800a56 of /home/harter/work/git/RIOT/examples/default/bin/arduino-uno/default.elf.nolink section `.data' is not within region `data'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x800e1b of /home/harter/work/git/RIOT/examples/default/bin/arduino-uno/default.elf.nolink section `.bss' is not within region `data'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x800e1d of /home/harter/work/git/RIOT/examples/default/bin/arduino-uno/default.elf.nolink section `.noinit' is not within region `data'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x800a56 of /home/harter/work/git/RIOT/examples/default/bin/arduino-uno/default.elf.nolink section `.data' is not within region `data'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x800e1b of /home/harter/work/git/RIOT/examples/default/bin/arduino-uno/default.elf.nolink section `.bss' is not within region `data'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x800e1d of /home/harter/work/git/RIOT/examples/default/bin/arduino-uno/default.elf.nolink section `.noinit' is not within region `data'
collect2: error: ld returned 1 exit status
make: Leaving directory '/home/harter/work/git/RIOT/examples/default'
```

If the board should not link (here overwritten) but does, it shows an error:

```
RIOT_CI_BUILD=1 BOARD=samr21-xpro make -C examples/default/  BOARD_INSUFFICIENT_MEMORY='$(BOARD)'
make: Entering directory '/home/harter/work/git/RIOT/examples/default'
CI-build: skipping link step
Building application "default" for "samr21-xpro" with MCU "samd21".

Error, linking should have failed because of not enough memory but did not
/home/harter/work/git/RIOT/examples/default/../../Makefile.include:466: recipe for target '/home/harter/work/git/RIOT/examples/default/bin/samr21-xpro/default.elf.nolink' failed
make: *** [/home/harter/work/git/RIOT/examples/default/bin/samr21-xpro/default.elf.nolink] Error 1
make: Leaving directory '/home/harter/work/git/RIOT/examples/default'
```


### Issues/PRs references

https://github.com/RIOT-OS/RIOT/issues/11128
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11168

-- Commit Summary --

  * Makefile.include: RIOTNOLINK ensure linking fails

-- File Changes --

    M Makefile.include (10)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11168.patch
https://github.com/RIOT-OS/RIOT/pull/11168.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11168
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190312/7e3ce878/attachment.html>


More information about the notifications mailing list