From 3c1e70ef7010c29ef35a0ab36caa8fccf4853837 Mon Sep 17 00:00:00 2001 From: marcel Date: Fri, 16 Sep 2016 03:04:48 +0000 Subject: [PATCH] When MAKEOBJDIRPREFIX points to a case-insensitive file system, the build can break when different source files create the same object files (case-insensitivity speaking). This is the case for _Exit.c and _exit.s. Compile _Exit.c as C99_Exit.c Reviewed by: sjg@ MFC after: completion Sponsored by: Bracket Computing Differential Revision: https://reviews.freebsd.org/D7893 --- lib/libc/stdlib/Makefile.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index beb5316961d..935f3ffb35f 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -4,7 +4,7 @@ # machine-independent stdlib sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib -MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ +MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ bsearch.c cxa_thread_atexit.c div.c exit.c getenv.c getopt.c getopt_long.c \ getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ hsearch_r.c imaxabs.c imaxdiv.c \ @@ -16,6 +16,13 @@ MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ strtol.c strtoll.c strtoq.c strtoul.c strtonum.c strtoull.c \ strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c +# Work around an issue on case-insensitive file systems. +# libc has both _Exit.c and _exit.s and they both yield +# _exit.o (case insensitively speaking). +CLEANFILES+=C99_Exit.c +C99_Exit.c: ${LIBC_SRCTOP}/stdlib/_Exit.c .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} + SYM_MAPS+= ${LIBC_SRCTOP}/stdlib/Symbol.map # machine-dependent stdlib sources -- 2.45.0