Remove the SYMVER build option.

This option was added as a transition aide when symbol versioning was
first added.  It was enabled by default in 2007 and is supported even
by the old GPLv2 binutils.  Trying to disable it currently fails to
build in libc and at this point it isn't worth fixing the build.

Reported by:	Michael Dexter
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D24637
This commit is contained in:
John Baldwin 2020-04-30 22:08:40 +00:00
parent de1ca57386
commit 371f3da616
12 changed files with 19 additions and 40 deletions

View File

@ -3,7 +3,5 @@
.PATH: ${LIBC_SRCTOP}/db/mpool .PATH: ${LIBC_SRCTOP}/db/mpool
SRCS+= mpool.c SRCS+= mpool.c \
.if ${MK_SYMVER} == yes mpool-compat.c
SRCS+= mpool-compat.c
.endif

View File

@ -34,6 +34,7 @@ SRCS+= __getosreldate.c \
ctermid.c \ ctermid.c \
daemon.c \ daemon.c \
devname.c \ devname.c \
devname-compat11.c \
dirfd.c \ dirfd.c \
dirname.c \ dirname.c \
dirname_compat.c \ dirname_compat.c \
@ -58,7 +59,10 @@ SRCS+= __getosreldate.c \
fstab.c \ fstab.c \
ftok.c \ ftok.c \
fts.c \ fts.c \
fts-compat.c \
fts-compat11.c \
ftw.c \ ftw.c \
ftw-compat11.c \
getbootfile.c \ getbootfile.c \
getbsize.c \ getbsize.c \
getcap.c \ getcap.c \
@ -71,6 +75,7 @@ SRCS+= __getosreldate.c \
getloadavg.c \ getloadavg.c \
getlogin.c \ getlogin.c \
getmntinfo.c \ getmntinfo.c \
getmntinfo-compat11.c \
getnetgrent.c \ getnetgrent.c \
getosreldate.c \ getosreldate.c \
getpagesize.c \ getpagesize.c \
@ -83,6 +88,7 @@ SRCS+= __getosreldate.c \
getutxent.c \ getutxent.c \
getvfsbyname.c \ getvfsbyname.c \
glob.c \ glob.c \
glob-compat11.c \
initgroups.c \ initgroups.c \
isatty.c \ isatty.c \
isinf.c \ isinf.c \
@ -94,6 +100,7 @@ SRCS+= __getosreldate.c \
lrand48.c \ lrand48.c \
mrand48.c \ mrand48.c \
nftw.c \ nftw.c \
nftw-compat11.c \
nice.c \ nice.c \
nlist.c \ nlist.c \
nrand48.c \ nrand48.c \
@ -107,10 +114,12 @@ SRCS+= __getosreldate.c \
pw_scan.c \ pw_scan.c \
raise.c \ raise.c \
readdir.c \ readdir.c \
readdir-compat11.c \
readpassphrase.c \ readpassphrase.c \
recvmmsg.c \ recvmmsg.c \
rewinddir.c \ rewinddir.c \
scandir.c \ scandir.c \
scandir-compat11.c \
seed48.c \ seed48.c \
seekdir.c \ seekdir.c \
semctl.c \ semctl.c \
@ -147,6 +156,7 @@ SRCS+= __getosreldate.c \
ualarm.c \ ualarm.c \
ulimit.c \ ulimit.c \
uname.c \ uname.c \
unvis-compat.c \
usleep.c \ usleep.c \
utime.c \ utime.c \
utxdb.c \ utxdb.c \
@ -156,18 +166,6 @@ SRCS+= __getosreldate.c \
waitpid.c \ waitpid.c \
waitid.c \ waitid.c \
wordexp.c wordexp.c
.if ${MK_SYMVER} == yes
SRCS+= devname-compat11.c \
fts-compat.c \
fts-compat11.c \
ftw-compat11.c \
getmntinfo-compat11.c \
glob-compat11.c \
nftw-compat11.c \
readdir-compat11.c \
scandir-compat11.c \
unvis-compat.c
.endif
CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20 CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20

View File

@ -14,10 +14,7 @@ SRCS+= citrus_bcs.c citrus_bcs_strtol.c citrus_bcs_strtoul.c \
citrus_esdb.c citrus_hash.c citrus_iconv.c citrus_lookup.c \ citrus_esdb.c citrus_hash.c citrus_iconv.c citrus_lookup.c \
citrus_lookup_factory.c citrus_mapper.c citrus_memstream.c \ citrus_lookup_factory.c citrus_mapper.c citrus_memstream.c \
citrus_mmap.c citrus_module.c citrus_none.c citrus_pivot_factory.c \ citrus_mmap.c citrus_module.c citrus_none.c citrus_pivot_factory.c \
citrus_prop.c citrus_stdenc.c bsd_iconv.c citrus_prop.c citrus_stdenc.c bsd_iconv.c iconv_compat.c
.if ${MK_SYMVER} == yes
SRCS+= iconv_compat.c
.endif
SYM_MAPS+= ${LIBC_SRCTOP}/iconv/Symbol.map SYM_MAPS+= ${LIBC_SRCTOP}/iconv/Symbol.map

View File

@ -11,6 +11,7 @@ subr_acl_nfs4.c: ${SRCTOP}/sys/kern/subr_acl_nfs4.c
CONFS+= posix1e/mac.conf CONFS+= posix1e/mac.conf
SRCS+= acl_branding.c \ SRCS+= acl_branding.c \
acl_calc_mask.c \ acl_calc_mask.c \
acl_compat.c \
acl_copy.c \ acl_copy.c \
acl_delete.c \ acl_delete.c \
acl_delete_entry.c \ acl_delete_entry.c \
@ -36,9 +37,6 @@ SRCS+= acl_branding.c \
mac_get.c \ mac_get.c \
mac_set.c \ mac_set.c \
subr_acl_nfs4.c subr_acl_nfs4.c
.if ${MK_SYMVER} == yes
SRCS+= acl_compat.c
.endif
SYM_MAPS+=${LIBC_SRCTOP}/posix1e/Symbol.map SYM_MAPS+=${LIBC_SRCTOP}/posix1e/Symbol.map

View File

@ -5,9 +5,7 @@
.PATH: ${LIBC_SRCTOP}/secure .PATH: ${LIBC_SRCTOP}/secure
# Sources common to both syscall interfaces: # Sources common to both syscall interfaces:
SRCS+= stack_protector.c SRCS+= stack_protector.c \
.if ${MK_SYMVER} == yes stack_protector_compat.c
SRCS+= stack_protector_compat.c
.endif
SYM_MAPS+= ${LIBC_SRCTOP}/secure/Symbol.map SYM_MAPS+= ${LIBC_SRCTOP}/secure/Symbol.map

View File

@ -12,7 +12,6 @@ WARNS?= 2
LDFLAGS+= -nodefaultlibs LDFLAGS+= -nodefaultlibs
LIBADD+= c LIBADD+= c
.if ${MK_SYMVER} == "yes"
VERSION_DEF= ${.CURDIR}/Versions.def VERSION_DEF= ${.CURDIR}/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map SYMBOL_MAPS= ${.CURDIR}/Symbol.map
# Export ARM AEABI unwind routines needed by libc and libthr. # Export ARM AEABI unwind routines needed by libc and libthr.
@ -21,7 +20,6 @@ SYMBOL_MAPS+= ${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map
.else .else
SYMBOL_MAPS+= ${.CURDIR}/SymbolDefault.map SYMBOL_MAPS+= ${.CURDIR}/SymbolDefault.map
.endif .endif
.endif
.include "../libcompiler_rt/Makefile.inc" .include "../libcompiler_rt/Makefile.inc"
.include "../libgcc_eh/Makefile.inc" .include "../libgcc_eh/Makefile.inc"

View File

@ -8,14 +8,11 @@ SRCS= cd9660.c \
common_kvm.c \ common_kvm.c \
core.c \ core.c \
libprocstat.c \ libprocstat.c \
libprocstat_compat.c \
msdosfs.c \ msdosfs.c \
smbfs.c \ smbfs.c \
udf.c udf.c
.if ${MK_SYMVER} == yes
SRCS+= libprocstat_compat.c
.endif
VERSION_DEF= ${LIBCSRCDIR}/Versions.def VERSION_DEF= ${LIBCSRCDIR}/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map SYMBOL_MAPS= ${.CURDIR}/Symbol.map

View File

@ -1541,8 +1541,6 @@ as
Set to not build Set to not build
.Xr svnlite 1 .Xr svnlite 1
and related programs. and related programs.
.It Va WITHOUT_SYMVER
Set to disable symbol versioning when building shared libraries.
.It Va WITHOUT_SYSCONS .It Va WITHOUT_SYSCONS
Set to not build Set to not build
.Xr syscons 4 .Xr syscons 4

View File

@ -227,7 +227,7 @@ SHLIB_NAME_FULL=${SHLIB_NAME}
# Allow libraries to specify their own version map or have it # Allow libraries to specify their own version map or have it
# automatically generated (see bsd.symver.mk above). # automatically generated (see bsd.symver.mk above).
.if ${MK_SYMVER} == "yes" && !empty(VERSION_MAP) .if !empty(VERSION_MAP)
${SHLIB_NAME_FULL}: ${VERSION_MAP} ${SHLIB_NAME_FULL}: ${VERSION_MAP}
LDFLAGS+= -Wl,--version-script=${VERSION_MAP} LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
.endif .endif

View File

@ -63,7 +63,6 @@ __DEFAULT_YES_OPTIONS = \
OPENSSH \ OPENSSH \
PROFILE \ PROFILE \
SSP \ SSP \
SYMVER \
TESTS \ TESTS \
TOOLCHAIN \ TOOLCHAIN \
WARNS WARNS

View File

@ -7,7 +7,7 @@ __<bsd.symver.mk>__:
# Generate the version map given the version definitions # Generate the version map given the version definitions
# and symbol maps. # and symbol maps.
.if ${MK_SYMVER} == "yes" && !empty(VERSION_DEF) && !empty(SYMBOL_MAPS) .if !empty(VERSION_DEF) && !empty(SYMBOL_MAPS)
# Find the awk script that generates the version map. # Find the awk script that generates the version map.
VERSION_GEN?= version_gen.awk VERSION_GEN?= version_gen.awk
VERSION_MAP?= Version.map VERSION_MAP?= Version.map

View File

@ -1,2 +0,0 @@
.\" $FreeBSD$
Set to disable symbol versioning when building shared libraries.