aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2016-09-24 15:11:27 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2016-09-24 15:11:27 +0000
commit2b4da8aa2021023fed30cb168d9770d431760882 (patch)
treeb3fe596dc928c6aef978758bef4e4a40e5e4ad03
parentd44268d13592e507e585988f4c4a7d5534e9fc23 (diff)
downloadsrc-2b4da8aa2021023fed30cb168d9770d431760882.tar.gz
src-2b4da8aa2021023fed30cb168d9770d431760882.zip
When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target files (case-insensitivity speaking). This is the case for object files compiled with -fpic and shared libraries. The former uses an extension of ".So", and the latter an extension ".so". Rename shared object files from *.So to *.pico to match what NetBSD does. See also r305855 MFC after: 1 month Sponsored by: Bracket Computing Differential Revision: https://reviews.freebsd.org/D7906
Notes
Notes: svn path=/head/; revision=306297
-rw-r--r--gnu/lib/libgcc/Makefile14
-rw-r--r--gnu/lib/libgcov/Makefile2
-rw-r--r--lib/libedit/Makefile2
-rw-r--r--lib/libprocstat/Makefile6
-rw-r--r--lib/libthr/support/Makefile.inc6
-rw-r--r--share/mk/bsd.dep.mk4
-rw-r--r--share/mk/bsd.lib.mk20
-rw-r--r--share/mk/meta.autodep.mk6
-rw-r--r--sys/conf/kern.post.mk6
-rw-r--r--sys/conf/kern.pre.mk2
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/Makefile2
11 files changed, 35 insertions, 35 deletions
diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile
index d9837cc3a7cd..b101b4f2ea91 100644
--- a/gnu/lib/libgcc/Makefile
+++ b/gnu/lib/libgcc/Makefile
@@ -258,8 +258,8 @@ OBJ_GRPS += FPBIT DPBIT
.for T in ${OBJ_GRPS}
${T}_OBJS_T = ${${T}_FUNCS:S/$/.o/}
${T}_OBJS_P = ${${T}_FUNCS:S/$/.po/}
-${T}_OBJS_S = ${${T}_FUNCS:S/$/.So/}
-SOBJS += ${${T}_FUNCS:S/$/.So/}
+${T}_OBJS_S = ${${T}_FUNCS:S/$/.pico/}
+SOBJS += ${${T}_FUNCS:S/$/.pico/}
${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS}
${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
@@ -274,7 +274,7 @@ ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHDRS}
# Extra objects coming from separate files
#
.if !empty(LIB2ADD)
-SOBJS += ${LIB2ADD:R:S/$/.So/}
+SOBJS += ${LIB2ADD:R:S/$/.pico/}
.endif
#-----------------------------------------------------------------------
@@ -298,9 +298,9 @@ ${STAT_OBJS_P}: ${STD_CFILE} ${COMMONHDRS}
.if defined(LIB1ASMSRC)
ASM_T = ${LIB1ASMFUNCS:S/$/.o/}
ASM_P = ${LIB1ASMFUNCS:S/$/.po/}
-ASM_S = ${LIB1ASMFUNCS:S/$/.So/}
+ASM_S = ${LIB1ASMFUNCS:S/$/.pico/}
ASM_V = ${LIB1ASMFUNCS:S/$/.vis/}
-SOBJS += ${LIB1ASMFUNCS:S/$/.So/}
+SOBJS += ${LIB1ASMFUNCS:S/$/.pico/}
${ASM_T}: ${LIB1ASMSRC} ${.PREFIX}.vis
${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \
@@ -327,7 +327,7 @@ CLEANFILES += ${ASM_V} ${ASM_V:R:S/$/.vo/}
#
EH_OBJS_T = ${LIB2ADDEHSTATIC:R:S/$/.o/}
EH_OBJS_P = ${LIB2ADDEHSTATIC:R:S/$/.po/}
-EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.So/}
+EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.pico/}
EH_CFLAGS = -fexceptions -D__GLIBC__=3 -DElfW=__ElfN
.if ${TARGET_CPUARCH} != "riscv64"
# RISCVTODO: unwinding support
@@ -341,7 +341,7 @@ ${_src:R:S/$/.po/}: ${_src} ${COMMONHDRS}
${CC_P} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
.endfor
.for _src in ${LIB2ADDEHSHARED:M*.c}
-${_src:R:S/$/.So/}: ${_src} ${COMMONHDRS}
+${_src:R:S/$/.pico/}: ${_src} ${COMMONHDRS}
${CC_S} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
.endfor
diff --git a/gnu/lib/libgcov/Makefile b/gnu/lib/libgcov/Makefile
index 65d0fdb55a7f..740b1101e5a6 100644
--- a/gnu/lib/libgcov/Makefile
+++ b/gnu/lib/libgcov/Makefile
@@ -35,7 +35,7 @@ SYMS = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
OBJS= ${SYMS:S/$/.o/}
OBJS_T= ${SYMS:S/$/.o/}
OBJS_P= ${SYMS:S/$/.po/}
-OBJS_S= ${SYMS:S/$/.So/}
+OBJS_S= ${SYMS:S/$/.pico/}
#-----------------------------------------------------------------------
#
diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile
index 14c9cbbcc175..a75c9d2fcb6d 100644
--- a/lib/libedit/Makefile
+++ b/lib/libedit/Makefile
@@ -76,7 +76,7 @@ historyn.c: makelist Makefile
sh ${.CURDIR}/makelist -n history.c > ${.TARGET}
# minimal dependency to make "make depend" optional
-editline.o editline.po editline.So editline.ln: \
+editline.o editline.po editline.pico editline.ln: \
common.h emacs.h fcns.c fcns.h help.c help.h vi.h
tc1.o: ${.CURDIR}/TEST/tc1.c
diff --git a/lib/libprocstat/Makefile b/lib/libprocstat/Makefile
index 240718dd9cd6..1e6f43686157 100644
--- a/lib/libprocstat/Makefile
+++ b/lib/libprocstat/Makefile
@@ -58,13 +58,13 @@ MLINKS+=libprocstat.3 procstat_close.3 \
.if ${MK_CDDL} != "no"
CFLAGS+= -DLIBPROCSTAT_ZFS
OBJS+= zfs/zfs.o
-SOBJS+= zfs/zfs.So
+SOBJS+= zfs/zfs.pico
POBJS+= zfs/zfs.po
SUBDIR= zfs
zfs/zfs.o: .PHONY
@cd ${.CURDIR}/zfs && ${MAKE} zfs.o
-zfs/zfs.So: .PHONY
- @cd ${.CURDIR}/zfs && ${MAKE} zfs.So
+zfs/zfs.pico: .PHONY
+ @cd ${.CURDIR}/zfs && ${MAKE} zfs.pico
zfs/zfs.po: .PHONY
@cd ${.CURDIR}/zfs && ${MAKE} zfs.po
.endif
diff --git a/lib/libthr/support/Makefile.inc b/lib/libthr/support/Makefile.inc
index 35a15f859264..1814f8a5f3da 100644
--- a/lib/libthr/support/Makefile.inc
+++ b/lib/libthr/support/Makefile.inc
@@ -15,15 +15,15 @@ CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH}
SYSCALLS= thr_new
SYSCALL_SRC= ${SYSCALLS:S/$/.S/}
-SYSCALL_OBJ= ${SYSCALLS:S/$/.So/}
+SYSCALL_OBJ= ${SYSCALLS:S/$/.pico/}
${SYSCALL_SRC}:
printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
LIBC_OBJS=
-SOBJS+= thr_libc.So
+SOBJS+= thr_libc.pico
CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS}
-thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS}
+thr_libc.pico: ${SYSCALL_OBJ} ${LIBC_OBJS}
${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC}
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index d3591b9eafbe..c5d242f166e2 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -152,8 +152,8 @@ ${_D}.o: ${_DSRC} ${OBJS:S/^${_D}.o$//}
@rm -f ${.TARGET}
${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC:N*.h}
.if defined(LIB)
-CLEANFILES+= ${_D}.So ${_D}.po
-${_D}.So: ${_DSRC} ${SOBJS:S/^${_D}.So$//}
+CLEANFILES+= ${_D}.pico ${_D}.po
+${_D}.pico: ${_DSRC} ${SOBJS:S/^${_D}.pico$//}
@rm -f ${.TARGET}
${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC:N*.h}
${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$//}
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index ffb03c020ff6..f3b9f146d282 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -77,9 +77,9 @@ CTFFLAGS+= -g
.include <bsd.libnames.mk>
# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
-# .So used for PIC object files
+# .pico used for PIC object files
.SUFFIXES:
-.SUFFIXES: .out .o .po .So .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln
+.SUFFIXES: .out .o .po .pico .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln
.if !defined(PICFLAG)
.if ${MACHINE_CPUARCH} == "sparc64"
@@ -99,7 +99,7 @@ PO_FLAG=-pg
${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
-.c.So:
+.c.pico:
${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
@@ -109,18 +109,18 @@ PO_FLAG=-pg
.cc.po .C.po .cpp.po .cxx.po:
${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-.cc.So .C.So .cpp.So .cxx.So:
+.cc.pico .C.pico .cpp.pico .cxx.pico:
${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
.f.po:
${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
${CTFCONVERT_CMD}
-.f.So:
+.f.pico:
${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
${CTFCONVERT_CMD}
-.s.po .s.So:
+.s.po .s.pico:
${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
${CTFCONVERT_CMD}
@@ -129,7 +129,7 @@ PO_FLAG=-pg
${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
-.asm.So:
+.asm.pico:
${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${PICFLAG} -DPIC \
${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
@@ -139,7 +139,7 @@ PO_FLAG=-pg
-o ${.TARGET}
${CTFCONVERT_CMD}
-.S.So:
+.S.pico:
${CC:N${CCACHE_BIN}} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \
-c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
@@ -207,7 +207,7 @@ lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS}
.if defined(SHLIB_NAME) || \
defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
-SOBJS+= ${OBJS:.o=.So}
+SOBJS+= ${OBJS:.o=.pico}
DEPENDOBJS+= ${SOBJS}
CLEANFILES+= ${SOBJS}
.endif
@@ -430,7 +430,7 @@ OBJS_DEPEND_GUESS.${_S:R}.po+= ${_S}
.if defined(SHLIB_NAME) || \
defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
.for _S in ${SRCS:N*.[hly]}
-OBJS_DEPEND_GUESS.${_S:R}.So+= ${_S}
+OBJS_DEPEND_GUESS.${_S:R}.pico+= ${_S}
.endfor
.endif
diff --git a/share/mk/meta.autodep.mk b/share/mk/meta.autodep.mk
index 7095b1f21a40..7df58bc9d0eb 100644
--- a/share/mk/meta.autodep.mk
+++ b/share/mk/meta.autodep.mk
@@ -23,7 +23,7 @@ __${_this}__: .NOTMAIN
.if defined(SRCS)
# it would be nice to be able to query .SUFFIXES
-OBJ_EXTENSIONS+= .o .po .lo .So
+OBJ_EXTENSIONS+= .o .po .lo .pico
# explicit dependencies help short-circuit .SUFFIX searches
SRCS_DEP_FILTER+= N*.[hly]
@@ -179,7 +179,7 @@ DEPEND_SUFFIXES += .c .h .cpp .hpp .cxx .hxx .cc .hh
@case "${.MAKE.META.FILES:T:M*.po.*}" in \
*.po.*) mv $@.${.MAKE.PID} $@;; \
*) { cat $@.${.MAKE.PID}; \
- sed 's,\.So:,.o:,;s,\.o:,.po:,' $@.${.MAKE.PID}; } | sort -u > $@; \
+ sed 's,\.pico:,.o:,;s,\.o:,.po:,' $@.${.MAKE.PID}; } | sort -u > $@; \
rm -f $@.${.MAKE.PID};; \
esac
.else
@@ -244,7 +244,7 @@ META_FILES = *.meta
.elif ${OPTIMIZE_OBJECT_META_FILES:Uno:tl} == "no"
META_FILES = ${.MAKE.META.FILES:T:N.depend*:O:u}
.else
-# if we have 1000's of .o.meta, .So.meta etc we need only look at one set
+# if we have 1000's of .o.meta, .pico.meta etc we need only look at one set
# it is left as an exercise for the reader to work out what this does
META_FILES = ${.MAKE.META.FILES:T:N.depend*:N*o.meta:O:u} \
${.MAKE.META.FILES:T:M*.${.MAKE.META.FILES:M*o.meta:R:E:O:u:[1]}.meta:O:u}
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index f44645c8287b..128e47d67432 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -165,7 +165,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile}
.endfor
kernel-clean:
- rm -f *.o *.so *.So *.ko *.s eddep errs \
+ rm -f *.o *.so *.pico *.ko *.s eddep errs \
${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \
linterrs tags vers.c \
vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \
@@ -180,9 +180,9 @@ lint: ${LNFILES}
# dynamic references. We could probably do a '-Bforcedynamic' mode like
# in the a.out ld. For now, this works.
HACK_EXTRA_FLAGS?= -shared
-hack.So: Makefile
+hack.pico: Makefile
:> hack.c
- ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.So
+ ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.pico
rm -f hack.c
assym.s: $S/kern/genassym.sh genassym.o
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index c05e75c3b9d1..0a2d9a65ee76 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -176,7 +176,7 @@ SYSTEM_CFILES= config.c env.c hints.c vnode_if.c
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
-SYSTEM_OBJS+= hack.So
+SYSTEM_OBJS+= hack.pico
MD_ROOT_SIZE_CONFIGURED!= grep MD_ROOT_SIZE opt_md.h || true ; echo
.if ${MFS_IMAGE:Uno} != "no"
diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile b/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile
index 57f3eab0d5f5..80349ca0414f 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile
+++ b/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile
@@ -73,7 +73,7 @@ LIBADD= kvm devinfo m geom memstat
.include <bsd.snmpmod.mk>
-printcap.So: printcap.c
+printcap.pico: printcap.c
${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET}
smilint: