[riot-notifications] [RIOT-OS/RIOT] boards/native: remove toolchain variables duplication (#11627)

Gaëtan Harter notifications at github.com
Tue Jun 4 16:01:24 CEST 2019


### Contribution description

boards/native: remove toolchain variables duplication

The toolchain variables were overwritten anyway in
`makefiles/toolchain/gnu|llvm.inc.mk` as they use `=` affectation,
except for `OBJCOPY`.
    
On my Linux ubuntu bionic machine, the only difference for `info-build`
with both gnu/llvm and also with LTO=1
is that it now uses an absolute path for `objcopy`
    
    -OBJCOPY: objcopy
    +OBJCOPY: /usr/bin/objcopy
    
On the OSX 17.7.0 I tested, there was no difference.

### Testing procedure

Compare the output of `info-build` with different toolchains and enabling LTO.

I used this output:

```
{ TOOLCHAIN=gnu BOARD=native make -C examples/hello-world/ info-build; TOOLCHAIN=gnu LTO=1 BOARD=native make -C examples/hello-world/ info-build; TOOLCHAIN=llvm BOARD=native make -C examples/hello-world/ info-build; TOOLCHAIN=llvm LTO=1 BOARD=native make -C examples/hello-world/ info-build; } | tee info_build_pr
```

On my Linux machine I get this difference

``` diff
diff -u info_build_*
--- info_build_master   2019-06-04 15:43:51.031958413 +0200
+++ info_build_pr       2019-06-04 15:44:01.800045718 +0200
@@ -88,7 +88,7 @@
        -Wl,--gc-sections
        -ffunction-sections

-OBJCOPY: objcopy
+OBJCOPY: /usr/bin/objcopy
 OFLAGS:

 FLASHER: true
@@ -241,7 +241,7 @@
        -ffunction-sections
        -flto

-OBJCOPY: objcopy
+OBJCOPY: /usr/bin/objcopy
 OFLAGS:

 FLASHER: true
@@ -390,7 +390,7 @@
        -Wl,--gc-sections
        -ffunction-sections

-OBJCOPY: objcopy
+OBJCOPY: /usr/bin/objcopy
 OFLAGS:

 FLASHER: true
@@ -540,7 +540,7 @@
        -ffunction-sections
        -flto

-OBJCOPY: objcopy
+OBJCOPY: /usr/bin/objcopy
 OFLAGS:

 FLASHER: true
```

On OSX I get the same output.

### Issues/PRs references

Found as a dependency for cleaning exports for compilation variables https://github.com/RIOT-OS/RIOT/issues/10850
Board/cpu cleanup https://github.com/RIOT-OS/RIOT/issues/8713#issuecomment-369609643

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * boards/native: remove toolchain variables duplication

-- File Changes --

    M boards/native/Makefile.include (27)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11627.patch
https://github.com/RIOT-OS/RIOT/pull/11627.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/11627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190604/db8b742d/attachment.html>


More information about the notifications mailing list