Module Name: src Committed By: mrg Date: Wed Apr 14 08:07:49 UTC 2021
Modified Files: src/lib/libc/string: Makefile.inc Log Message: for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling memset() and emitting calls to memset() where it seems code that looks like what memset() does, which ends up recursing and blowing the stack. this makes mips userland with GCC 10 work. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/lib/libc/string/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/string/Makefile.inc diff -u src/lib/libc/string/Makefile.inc:1.84 src/lib/libc/string/Makefile.inc:1.85 --- src/lib/libc/string/Makefile.inc:1.84 Wed Mar 25 18:45:42 2020 +++ src/lib/libc/string/Makefile.inc Wed Apr 14 08:07:49 2021 @@ -1,5 +1,5 @@ # from: @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -# $NetBSD: Makefile.inc,v 1.84 2020/03/25 18:45:42 kre Exp $ +# $NetBSD: Makefile.inc,v 1.85 2021/04/14 08:07:49 mrg Exp $ # string sources .PATH: ${ARCHDIR}/string ${.CURDIR}/string @@ -34,6 +34,12 @@ CPPFLAGS.wcscmp.c+= -I${LIBCDIR}/locale CPPFLAGS.wcsncmp.c+= -I${LIBCDIR}/locale CPPFLAGS.wmemcmp.c+= -I${LIBCDIR}/locale +# Avoid memset() compilation generating calls to memset() via code +# that appears to implement memset()-like semantics (similar to how +# printf("foo") may be converted to puts("foo")), since that tends +# to recurse and blow the stack. +COPTS.memset.c+= ${${ACTIVE_CC} == "gcc":? -fno-builtin :} + .include "${ARCHDIR}/string/Makefile.inc" MAN+= bm.3 bcmp.3 bcopy.3 bstring.3 bzero.3 consttime_memequal.3 \