summaryrefslogtreecommitdiffstats
path: root/lib/libc/Makefile
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-01-03 07:14:01 +0000
committered <ed@FreeBSD.org>2012-01-03 07:14:01 +0000
commit6014007e0092971acca93d674c9cc07855981aef (patch)
tree8ab3a468a2bb64fe48da5a2fa68950bee0300453 /lib/libc/Makefile
parent29cd68a581450e8d265ffcd2f82de6bcd65778c6 (diff)
downloadFreeBSD-src-6014007e0092971acca93d674c9cc07855981aef.zip
FreeBSD-src-6014007e0092971acca93d674c9cc07855981aef.tar.gz
Merge index() and strchr() together.
As I looked through the C library, I noticed the FreeBSD MIPS port has a hand-written version of index(). This is nice, if it weren't for the fact that most applications call strchr() instead. Also, on the other architectures index() and strchr() are identical, meaning we have two identical pieces of code in the C library and statically linked applications. Solve this by naming the actual file strchr.[cS] and let it use __strong_reference()/STRONG_ALIAS() to provide the index() routine. Do the same for rindex()/strrchr(). This seems to make the C libraries and static binaries slightly smaller, but this reduction in size seems negligible.
Diffstat (limited to 'lib/libc/Makefile')
-rw-r--r--lib/libc/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 77c7ce0..bcf1797 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -127,8 +127,8 @@ SRCS+= ${_src}
KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
-KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \
- strcat.c strcmp.c strcpy.c strlen.c strncpy.c
+KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c mcount.c strcat.c strchr.c \
+ strcmp.c strcpy.c strlen.c strncpy.c strrchr.c
libkern: libkern.gen libkern.${LIBC_ARCH}
OpenPOWER on IntegriCloud