svn commit: r228269 - head/lib/libc/locale
Kostik Belousov
kostikbel at gmail.com
Mon Dec 5 11:04:39 UTC 2011
On Mon, Dec 05, 2011 at 12:00:48AM +0000, Jilles Tjoelker wrote:
> Author: jilles
> Date: Mon Dec 5 00:00:47 2011
> New Revision: 228269
> URL: http://svn.freebsd.org/changeset/base/228269
>
> Log:
> libc: Eliminate 13 relative relocations in wctype().
>
This reminds me the following change I had intended to do for quite some
time. The hack for openssl is due to buggy assembler, which exactly the
case I want to avoid for the base code.
commit 3fdba61936a011b768845a8336ad2529e77e8ddb
Author: Kostik Belousov <kostik at sirion>
Date: Mon Dec 5 13:01:48 2011 +0200
Fail the build when text relocations are generated for dso.
diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile
index 0a1704c..73f5cb7 100644
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -7,6 +7,7 @@ SUBDIR= engines
LIB= crypto
SHLIB_MAJOR= 6
+ALLOW_SHARED_TEXTREL=
NO_LINT=
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 1e43921..40632de 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -167,6 +167,11 @@ SOBJS+= ${OBJS:.o=.So}
.if defined(SHLIB_NAME)
_LIBS+= ${SHLIB_NAME}
+SOLINKOPTS= -shared -Wl,-x -Wl,--fatal-warnings
+.if !defined(ALLOW_SHARED_TEXTREL)
+SOLINKOPTS+= -Wl,--warn-shared-textrel
+.endif
+
.if target(beforelinking)
${SHLIB_NAME}: ${SOBJS} beforelinking
.else
@@ -178,11 +183,11 @@ ${SHLIB_NAME}: ${SOBJS}
@ln -fs ${.TARGET} ${SHLIB_LINK}
.endif
.if !defined(NM)
- @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \
+ @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
-o ${.TARGET} -Wl,-soname,${SONAME} \
`lorder ${SOBJS} | tsort -q` ${LDADD}
.else
- @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \
+ @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
-o ${.TARGET} -Wl,-soname,${SONAME} \
`NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
.endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20111205/52ba1c26/attachment.pgp
More information about the svn-src-head
mailing list