Fix weak symbols to work in tcc.

Fixes #322.
This commit is contained in:
Andrius Štikonas 2024-01-09 22:52:43 +00:00
parent 9ec45654cf
commit be15f9caca
10 changed files with 82 additions and 73 deletions

View file

@ -1,17 +0,0 @@
SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: MIT
Replace weak symbols with strong to workaround an issue with tcc -ar
This won't be necessary once we can rebuild with ar from binutils.
--- src/include/features.h 2021-02-02 23:15:42.791932948 +0000
+++ src/include/features.h 2021-02-02 23:17:21.394647015 +0000
@@ -6,6 +6,6 @@
#define weak __attribute__((__weak__))
#define hidden __attribute__((__visibility__("hidden")))
#define weak_alias(old, new) \
- extern __typeof(old) new __attribute__((__weak__, __alias__(#old)))
+ extern __typeof(old) new __attribute__((/*__weak__, */__alias__(#old)))
#endif