Revert r354449: libcompat: build 32-bit rtld and ldd as part of "everything"
Additional testing is required..
This commit is contained in:
parent
5270e1a584
commit
ccad77fe1e
@ -802,10 +802,11 @@ XCFLAGS+= --sysroot=${WORLDTMP}
|
||||
XCFLAGS+= ${BFLAGS}
|
||||
.endif
|
||||
|
||||
.if ${MK_LIB32} == "yes"
|
||||
.if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
|
||||
${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "")
|
||||
_LIBCOMPAT= 32
|
||||
.include "Makefile.libcompat"
|
||||
.elif ${MK_LIBSOFT} == "yes"
|
||||
.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH:Marmv[67]*} != ""
|
||||
_LIBCOMPAT= SOFT
|
||||
.include "Makefile.libcompat"
|
||||
.endif
|
||||
|
@ -111,10 +111,28 @@ build${libcompat}: .PHONY
|
||||
.endfor
|
||||
${_+_}cd ${.CURDIR}; \
|
||||
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
|
||||
.if ${libcompat} == "32"
|
||||
.for _t in ${_obj} all
|
||||
.if !defined(NO_RTLD)
|
||||
${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIBCOMPATWMAKE} \
|
||||
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
|
||||
.endif
|
||||
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \
|
||||
DIRPRFX=usr.bin/ldd ${_t}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
distribute${libcompat} install${libcompat}: .PHONY
|
||||
.for _dir in ${_LC_LIBDIRS.yes}
|
||||
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATIMAKE} ${.TARGET:S/${libcompat}$//}
|
||||
.endfor
|
||||
.if ${libcompat} == "32"
|
||||
.if !defined(NO_RTLD)
|
||||
${_+_}cd ${.CURDIR}/libexec/rtld-elf; \
|
||||
PROG=ld-elf32.so.1 ${LIBCOMPATIMAKE} ${.TARGET:S/32$//}
|
||||
.endif
|
||||
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATIMAKE} \
|
||||
${.TARGET:S/32$//}
|
||||
.endif
|
||||
|
||||
.endif # !targets(__<${_this:T}>__)
|
||||
.endif
|
||||
|
@ -28,8 +28,8 @@ S1lo = -9.2563760475949941e-18; /* -0x15580000000000.0p-109 */
|
||||
#define C1 ((long double)C1hi + C1lo)
|
||||
#else
|
||||
static const long double
|
||||
C1 = 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68 */
|
||||
S1 = -0.166666666666666666671L, /* -0xaaaaaaaaaaaaaaab.0p-66 */
|
||||
C1 = 0.0416666666666666666136L, /* 0xaaaaaaaaaaaaaa9b.0p-68 */
|
||||
S1 = -0.166666666666666666671L; /* -0xaaaaaaaaaaaaaaab.0p-66 */
|
||||
#endif
|
||||
|
||||
static const double
|
||||
|
@ -74,7 +74,6 @@ _tftp-proxy= tftp-proxy
|
||||
|
||||
.if !defined(NO_PIC) && !defined(NO_RTLD)
|
||||
_rtld-elf= rtld-elf
|
||||
SUBDIR.${MK_LIB32}+= rtld-elf32
|
||||
.endif
|
||||
|
||||
.if ${MK_RBOOTD} != "no"
|
||||
|
@ -4,8 +4,6 @@
|
||||
# linker:
|
||||
# make DEBUG_FLAGS=-g WITHOUT_TESTS=yes all
|
||||
|
||||
RTLD_ELF_DIR:= ${.PARSEDIR}
|
||||
|
||||
.include <src.opts.mk>
|
||||
PACKAGE= clibs
|
||||
MK_PIE= no # Always position independent using local rules
|
||||
@ -27,16 +25,16 @@ SRCS= \
|
||||
xmalloc.c \
|
||||
debug.c \
|
||||
libmap.c
|
||||
MAN?= rtld.1
|
||||
MAN= rtld.1
|
||||
CSTD?= gnu99
|
||||
CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding
|
||||
CFLAGS+= -I${SRCTOP}/lib/csu/common
|
||||
.if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH})
|
||||
.if exists(${.CURDIR}/${MACHINE_ARCH})
|
||||
RTLD_ARCH= ${MACHINE_ARCH}
|
||||
.else
|
||||
RTLD_ARCH= ${MACHINE_CPUARCH}
|
||||
.endif
|
||||
CFLAGS+= -I${RTLD_ELF_DIR}/${RTLD_ARCH} -I${RTLD_ELF_DIR}
|
||||
CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR}
|
||||
.if ${MACHINE_ARCH} == "powerpc64"
|
||||
LDFLAGS+= -nostdlib -e _rtld_start
|
||||
.else
|
||||
@ -83,16 +81,16 @@ LIBADD+= compiler_rt
|
||||
|
||||
.if ${MK_SYMVER} == "yes"
|
||||
VERSION_DEF= ${LIBCSRCDIR}/Versions.def
|
||||
SYMBOL_MAPS= ${RTLD_ELF_DIR}/Symbol.map
|
||||
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
|
||||
VERSION_MAP= Version.map
|
||||
LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
|
||||
|
||||
.if exists(${RTLD_ELF_DIR}/${RTLD_ARCH}/Symbol.map)
|
||||
SYMBOL_MAPS+= ${RTLD_ELF_DIR}/${RTLD_ARCH}/Symbol.map
|
||||
.if exists(${.CURDIR}/${RTLD_ARCH}/Symbol.map)
|
||||
SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.sinclude "${RTLD_ELF_DIR}/${RTLD_ARCH}/Makefile.inc"
|
||||
.sinclude "${.CURDIR}/${RTLD_ARCH}/Makefile.inc"
|
||||
|
||||
# Since moving rtld-elf to /libexec, we need to create a symlink.
|
||||
# Fixup the existing binary that's there so we can symlink over it.
|
||||
@ -101,12 +99,10 @@ beforeinstall:
|
||||
-chflags -h noschg ${DESTDIR}/usr/libexec/${PROG}
|
||||
.endif
|
||||
|
||||
.PATH: ${RTLD_ELF_DIR}/${RTLD_ARCH}
|
||||
.PATH: ${.CURDIR}/${RTLD_ARCH}
|
||||
|
||||
.if ${.CURDIR} == ${RTLD_ELF_DIR}
|
||||
HAS_TESTS=
|
||||
SUBDIR.${MK_TESTS}+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
${PROG_FULL}: ${VERSION_MAP}
|
||||
|
@ -1,10 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
NEED_COMPAT= 32
|
||||
.include <bsd.compat.mk>
|
||||
|
||||
PROG= ld-elf32.so.1
|
||||
MAN=
|
||||
|
||||
.PATH: ${SRCTOP}/libexec/rtld-elf
|
||||
.include "${SRCTOP}/libexec/rtld-elf/Makefile"
|
@ -26,9 +26,8 @@ LIB32CPUFLAGS= -march=${COMPAT_CPUTYPE}
|
||||
LIB32CPUFLAGS+= -target x86_64-unknown-freebsd13.0
|
||||
.endif
|
||||
LIB32CPUFLAGS+= -m32
|
||||
LIB32_MACHINE= i386
|
||||
LIB32_MACHINE_ARCH= i386
|
||||
LIB32WMAKEENV= MACHINE_CPU="i686 mmx sse sse2"
|
||||
LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \
|
||||
MACHINE_CPU="i686 mmx sse sse2"
|
||||
LIB32WMAKEFLAGS= \
|
||||
AS="${XAS} --32" \
|
||||
LD="${XLD} -m elf_i386_fbsd -L${LIBCOMPATTMP}/usr/lib32"
|
||||
@ -41,8 +40,7 @@ LIB32CPUFLAGS= -mcpu=powerpc
|
||||
LIB32CPUFLAGS= -mcpu=${COMPAT_CPUTYPE}
|
||||
.endif
|
||||
LIB32CPUFLAGS+= -m32
|
||||
LIB32_MACHINE= powerpc
|
||||
LIB32_MACHINE_ARCH= powerpc
|
||||
LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc
|
||||
LIB32WMAKEFLAGS= \
|
||||
LD="${XLD} -m elf32ppc_fbsd"
|
||||
|
||||
@ -63,8 +61,7 @@ LIB32CPUFLAGS= -target mips-unknown-freebsd13.0
|
||||
.endif
|
||||
.endif
|
||||
LIB32CPUFLAGS+= -mabi=32
|
||||
LIB32_MACHINE= mips
|
||||
LIB32_MACHINE_ARCH= mips
|
||||
LIB32WMAKEENV= MACHINE=mips MACHINE_ARCH=mips
|
||||
.if ${COMPAT_ARCH:Mmips64el*} != ""
|
||||
LIB32WMAKEFLAGS= LD="${XLD} -m elf32ltsmip_fbsd"
|
||||
.else
|
||||
@ -85,9 +82,7 @@ LIB32WMAKEFLAGS+= -DCOMPAT_32BIT
|
||||
HAS_COMPAT=SOFT
|
||||
LIBSOFTCFLAGS= -DCOMPAT_SOFTFP
|
||||
LIBSOFTCPUFLAGS= -mfloat-abi=softfp
|
||||
LIBSOFT_MACHINE= arm
|
||||
LIBSOFT_MACHINE_ARCH= ${COMPAT_ARCH}
|
||||
LIBSOFTWMAKEENV= CPUTYPE=soft
|
||||
LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=${COMPAT_ARCH}
|
||||
LIBSOFTWMAKEFLAGS= -DCOMPAT_SOFTFP
|
||||
.endif
|
||||
|
||||
@ -119,8 +114,8 @@ _LIBCOMPAT:= ${WANT_COMPAT}
|
||||
# Generic code for each type.
|
||||
# Set defaults based on type.
|
||||
libcompat= ${_LIBCOMPAT:tl}
|
||||
_LIBCOMPAT_MAKEVARS= _OBJTOP TMP CPUFLAGS CFLAGS CXXFLAGS \
|
||||
_MACHINE _MACHINE_ARCH WMAKEENV WMAKEFLAGS WMAKE
|
||||
_LIBCOMPAT_MAKEVARS= _OBJTOP TMP CPUFLAGS CFLAGS CXXFLAGS WMAKEENV \
|
||||
WMAKEFLAGS WMAKE
|
||||
.for _var in ${_LIBCOMPAT_MAKEVARS}
|
||||
.if !empty(LIB${_LIBCOMPAT}${_var})
|
||||
LIBCOMPAT${_var}?= ${LIB${_LIBCOMPAT}${_var}}
|
||||
@ -136,9 +131,6 @@ LIBCOMPATCFLAGS+= ${LIBCOMPATCPUFLAGS} \
|
||||
--sysroot=${LIBCOMPATTMP} \
|
||||
${BFLAGS}
|
||||
|
||||
LIBCOMPATWMAKEENV+= MACHINE=${LIBCOMPAT_MACHINE}
|
||||
LIBCOMPATWMAKEENV+= MACHINE_ARCH=${LIBCOMPAT_MACHINE_ARCH}
|
||||
|
||||
# -B is needed to find /usr/lib32/crti.o for GCC and /usr/libsoft/crti.o for
|
||||
# Clang/GCC.
|
||||
LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat}
|
||||
@ -147,8 +139,6 @@ LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat}
|
||||
LIBDIR_BASE:= /usr/lib${libcompat}
|
||||
_LIB_OBJTOP= ${LIBCOMPAT_OBJTOP}
|
||||
CFLAGS+= ${LIBCOMPATCFLAGS}
|
||||
MACHINE= ${LIBCOMPAT_MACHINE}
|
||||
MACHINE_ARCH= ${LIBCOMPAT_MACHINE_ARCH}
|
||||
.endif
|
||||
|
||||
.endif
|
||||
|
@ -126,6 +126,7 @@ __DEFAULT_YES_OPTIONS = \
|
||||
LDNS \
|
||||
LDNS_UTILS \
|
||||
LEGACY_CONSOLE \
|
||||
LIB32 \
|
||||
LIBPTHREAD \
|
||||
LIBTHR \
|
||||
LLVM_COV \
|
||||
@ -357,13 +358,6 @@ __DEFAULT_NO_OPTIONS+=GDB_LIBEXEC
|
||||
.else
|
||||
__DEFAULT_YES_OPTIONS+=GDB_LIBEXEC
|
||||
.endif
|
||||
# LIB32 is supported on amd64, mips64, and powerpc64
|
||||
.if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH:Mmips64*} || \
|
||||
${MACHINE_ARCH} == "powerpc64")
|
||||
__DEFAULT_YES_OPTIONS+=LIB32
|
||||
.else
|
||||
BROKEN_OPTIONS+=LIB32
|
||||
.endif
|
||||
# Only doing soft float API stuff on armv6 and armv7
|
||||
.if ${__T} != "armv6" && ${__T} != "armv7"
|
||||
BROKEN_OPTIONS+=LIBSOFT
|
||||
|
@ -226,7 +226,6 @@ SUBDIR.${MK_KDUMP}+= truss
|
||||
SUBDIR.${MK_KERBEROS_SUPPORT}+= compile_et
|
||||
SUBDIR.${MK_LDNS_UTILS}+= drill
|
||||
SUBDIR.${MK_LDNS_UTILS}+= host
|
||||
SUBDIR.${MK_LIB32}+= ldd32
|
||||
SUBDIR.${MK_LOCATE}+= locate
|
||||
# XXX msgs?
|
||||
SUBDIR.${MK_MAIL}+= biff
|
||||
|
@ -1,10 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
NEED_COMPAT= 32
|
||||
.include <bsd.compat.mk>
|
||||
|
||||
PROG= ldd32
|
||||
MAN=
|
||||
|
||||
.PATH: ${SRCTOP}/usr.bin/ldd
|
||||
.include "${SRCTOP}/usr.bin/ldd/Makefile"
|
Loading…
Reference in New Issue
Block a user