aboutsummaryrefslogtreecommitdiff
path: root/tools/build/cross-build/include/common
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2021-12-15 04:36:11 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2021-12-15 04:36:11 +0000
commitd752d10e53839ad0654c9c564c6ef6c6e462c96d (patch)
treec7b6fd9ec6f2395a31e2694e63163c8ff234466b /tools/build/cross-build/include/common
parent9dc70af83e5992e543542adbf5a6edeb38f187f6 (diff)
downloadsrc-d752d10e53839ad0654c9c564c6ef6c6e462c96d.tar.gz
src-d752d10e53839ad0654c9c564c6ef6c6e462c96d.zip
cross-build: Add __weak_symbol definition for libdwarf bootstrap
Fixes: 3aa0bc89c6a1 ("libdwarf: Add a weak uncompress() symbol") MFC after: 1 week
Diffstat (limited to 'tools/build/cross-build/include/common')
-rw-r--r--tools/build/cross-build/include/common/sys/cdefs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/build/cross-build/include/common/sys/cdefs.h b/tools/build/cross-build/include/common/sys/cdefs.h
index 6d62333bcffe..d69e4369e01e 100644
--- a/tools/build/cross-build/include/common/sys/cdefs.h
+++ b/tools/build/cross-build/include/common/sys/cdefs.h
@@ -109,6 +109,9 @@
#define __predict_false(exp) __builtin_expect((exp), 0)
#endif
+#ifndef __weak_symbol
+#define __weak_symbol __attribute__((__weak__))
+#endif
#ifndef __weak_reference
#ifdef __ELF__
#define __weak_reference(sym, alias) \