Date: Tue, 23 Dec 2014 10:43:36 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276128 - in head: gnu/lib/libssp lib/libbsnmp/libbsnmp share/mk Message-ID: <201412231043.sBNAha4o052022@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Tue Dec 23 10:43:35 2014 New Revision: 276128 URL: https://svnweb.freebsd.org/changeset/base/276128 Log: Fix build with recent binutils Recent binutils considered the .gnu.warning.symbol section as a fatal error when run with --fatal-warnings which makes any users of "insecure" functions from libc failing to build with recent binutils. Introduce a new macro: LD_FATAL_WARNINGS=no to run ld(1) with --no-fatal-warnings for the users of "insecure" functions Differential Revision: https://reviews.freebsd.org/D1320 Modified: head/gnu/lib/libssp/Makefile head/lib/libbsnmp/libbsnmp/Makefile head/share/mk/bsd.lib.mk Modified: head/gnu/lib/libssp/Makefile ============================================================================== --- head/gnu/lib/libssp/Makefile Tue Dec 23 10:18:42 2014 (r276127) +++ head/gnu/lib/libssp/Makefile Tue Dec 23 10:43:35 2014 (r276128) @@ -15,6 +15,7 @@ SRCDIR= ${GCCLIB}/libssp LIB= ssp SHLIB_MAJOR= 0 +LD_FATAL_WARNINGS= no SRCS= ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \ memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \ Modified: head/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile Tue Dec 23 10:18:42 2014 (r276127) +++ head/lib/libbsnmp/libbsnmp/Makefile Tue Dec 23 10:43:35 2014 (r276128) @@ -9,6 +9,7 @@ CONTRIB= ${.CURDIR}/../../../contrib/bsn LIB= bsnmp SHLIB_MAJOR= 6 +LD_FATAL_WARNINGS= no CFLAGS+= -I${CONTRIB} -DHAVE_ERR_H -DHAVE_GETADDRINFO -DHAVE_STRLCPY CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DQUADFMT='"llu"' -DQUADXFMT='"llx"' Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Dec 23 10:18:42 2014 (r276127) +++ head/share/mk/bsd.lib.mk Tue Dec 23 10:43:35 2014 (r276128) @@ -207,7 +207,12 @@ _LIBS+= ${SHLIB_NAME} SOLINKOPTS= -shared -Wl,-x .if !defined(ALLOW_SHARED_TEXTREL) -SOLINKOPTS+= -Wl,--fatal-warnings -Wl,--warn-shared-textrel +.if defined(LD_FATAL_WARNINGS) && ${LD_FATAL_WARNINGS} == "no" +SOLINKOPTS+= -Wl,--no-fatal-warnings +.else +SOLINKOPTS+= -Wl,--fatal-warnings +.endif +SOLINKOPTS+= -Wl,--warn-shared-textrel .endif .if target(beforelinking)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412231043.sBNAha4o052022>