[riot-notifications] [RIOT-OS/RIOT] boards/samr21-xpro: namespace board_init (#16481)

Marian Buschsieweke notifications at github.com
Wed May 19 12:09:36 CEST 2021


I'm a bit pissed with GCC's performance here. I would have expected that this would yield the exact same machine code:

```diff
diff --git a/boards/samr21-xpro/board.c b/boards/samr21-xpro/board.c
index 089ef01682..785e694d3f 100644
--- a/boards/samr21-xpro/board.c
+++ b/boards/samr21-xpro/board.c
@@ -51,7 +51,4 @@ void board_samr21_xpro_init(void)
     cpu_init();
 }
 
-void __attribute__((weak)) board_init(void)
-{
-    board_samr21_xpro_init();
-}
+void board_init(void) __attribute__((weak,alias("board_samr21_xpro_init")));
```

But GCC indeed emits a separate `board_init` function that just calls `board_samr21_xpro_init`, rather than using an alias.

-- 
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/16481#issuecomment-843954269
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210519/069d45d2/attachment.htm>


More information about the notifications mailing list