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
This commit is contained in:
Marcel Moolenaar 2016-09-16 03:04:48 +00:00
parent 487b46173d
commit cb1cb6a2a8

View File

@ -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