about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-04-19 22:05:29 -0400
committerRich Felker <dalias@aerifal.cx>2015-04-19 22:05:29 -0400
commitde2b67f8d41e08caa56bf6540277f6561edb647f (patch)
treec0117710aa8a092a7ead36770811d430fca0b477 /Makefile
parent51fc77c7c03fa0b300e9a609b18f11f0e4db065a (diff)
downloadmusl-de2b67f8d41e08caa56bf6540277f6561edb647f.tar.gz
musl-de2b67f8d41e08caa56bf6540277f6561edb647f.tar.xz
musl-de2b67f8d41e08caa56bf6540277f6561edb647f.zip
add optional global visibility override
this is implemented via the build system and does not affect source
files. the idea is to use protected or hidden visibility to prevent
the compiler from pessimizing function calls within a shared (or
position-independent static) libc in the form of overhead setting up
for a call through the PLT. the ld-time symbol binding via the
-Bsymbolic-functions option already optimized out the PLT itself, but
not the code in the caller needed to support a call through the PLT.
on some archs this overhead can be substantial; on others it's
trivial.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d943988d..15a30f83 100644
--- a/Makefile
+++ b/Makefile
@@ -104,6 +104,8 @@ NOSSP_SRCS = $(wildcard crt/*.c) \
 	src/ldso/dlstart.c src/ldso/dynlink.c
 $(NOSSP_SRCS:%.c=%.o) $(NOSSP_SRCS:%.c=%.lo): CFLAGS += $(CFLAGS_NOSSP)
 
+$(CRT_LIBS): CFLAGS += -DCRT
+
 # This incantation ensures that changes to any subarch asm files will
 # force the corresponding object file to be rebuilt, even if the implicit
 # rule below goes indirectly through a .sub file.