Index: head/Makefile.inc1 =================================================================== --- head/Makefile.inc1 (revision 272349) +++ head/Makefile.inc1 (revision 272350) @@ -1,2030 +1,2030 @@ # # $FreeBSD$ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir # -DNO_CLEAN do not clean at all # -DDB_FROM_SRC use the user/group databases in src/etc instead of # the system database when installing. # -DNO_SHARE do not go into share subdir # -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,DEPEND,OBJ} # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel # -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel # -DNO_PORTSUPDATE do not update ports in ${MAKE} update # -DNO_ROOT install without using root privilege # -DNO_DOCUPDATE do not update doc in ${MAKE} update # -DWITHOUT_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # LOCAL_ITOOLS="list of tools" to add additional tools to the ITOOLS list # LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target # LOCAL_MTREE="list of mtree files" to process to allow local directories # to be created before files are installed # LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools # list # METALOG="path to metadata log" to write permission and ownership # when NO_ROOT is set. (default: ${DESTDIR}/METALOG) # TARGET="machine" to crossbuild world for a different machine type # TARGET_ARCH= may be required when a TARGET supports multiple endians # BUILDENV_SHELL= shell to launch for the buildenv target (def:/bin/sh) # WORLD_FLAGS= additional flags to pass to make(1) during buildworld # KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel # # The intended user-driven targets are: # buildworld - rebuild *everything*, including glue to help do upgrades # installworld- install everything built by "buildworld" # doxygen - build API documentation of the kernel # update - convenient way to update your source tree (eg: svn/svnup) # # Standard targets (not defined here) are documented in the makefiles in # /usr/share/mk. These include: # obj depend all install clean cleandepend cleanobj .if !defined(TARGET) || !defined(TARGET_ARCH) .error "Both TARGET and TARGET_ARCH must be defined." .endif .include "share/mk/src.opts.mk" .include .include # We must do share/info early so that installation of info `dir' # entries works correctly. Do it first since it is less likely to # grow dependencies on include and lib than vice versa. # # We must do lib/ and libexec/ before bin/, because if installworld # installs a new /bin/sh, the 'make' command will *immediately* # use that new version. And the new (dynamically-linked) /bin/sh # will expect to find appropriate libraries in /lib and /libexec. # SRCDIR?= ${.CURDIR} .if defined(SUBDIR_OVERRIDE) SUBDIR= ${SUBDIR_OVERRIDE} .else SUBDIR= share/info lib libexec SUBDIR+=bin .if ${MK_GAMES} != "no" SUBDIR+=games .endif .if ${MK_CDDL} != "no" SUBDIR+=cddl .endif SUBDIR+=gnu include .if ${MK_KERBEROS} != "no" SUBDIR+=kerberos5 .endif .if ${MK_RESCUE} != "no" SUBDIR+=rescue .endif SUBDIR+=sbin .if ${MK_CRYPT} != "no" SUBDIR+=secure .endif .if !defined(NO_SHARE) SUBDIR+=share .endif SUBDIR+=sys usr.bin usr.sbin .if ${MK_TESTS} != "no" SUBDIR+= tests .endif .if ${MK_OFED} != "no" SUBDIR+=contrib/ofed .endif # # We must do etc/ last for install/distribute to work. # SUBDIR+=etc # These are last, since it is nice to at least get the base system # rebuilt before you do them. .for _DIR in ${LOCAL_LIB_DIRS} ${LOCAL_DIRS} .if exists(${.CURDIR}/${_DIR}/Makefile) SUBDIR+= ${_DIR} .endif .endfor .endif .if defined(NOCLEAN) NO_CLEAN= ${NOCLEAN} .endif .if defined(NO_CLEANDIR) CLEANDIR= clean cleandepend .else CLEANDIR= cleandir .endif LOCAL_TOOL_DIRS?= BUILDENV_SHELL?=/bin/sh SVN?= /usr/local/bin/svn SVNFLAGS?= -r HEAD MAKEOBJDIRPREFIX?= /usr/obj .if !defined(OSRELDATE) .if exists(/usr/include/osreldate.h) OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ /usr/include/osreldate.h .else OSRELDATE= 0 .endif .endif .if !defined(VERSION) REVISION!= ${MAKE} -C ${SRCDIR}/release -V REVISION BRANCH!= ${MAKE} -C ${SRCDIR}/release -V BRANCH SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ ${SRCDIR}/sys/sys/param.h VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} .endif KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm armv6hf/arm i386 i386/pc98 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else _t= ${TARGET_ARCH}/${TARGET} .endif .for _t in ${_t} .if empty(KNOWN_ARCHES:M${_t}) .error Unknown target ${TARGET_ARCH}:${TARGET}. .endif .endfor .if ${TARGET} == ${MACHINE} TARGET_CPUTYPE?=${CPUTYPE} .else TARGET_CPUTYPE?= .endif .if !empty(TARGET_CPUTYPE) _TARGET_CPUTYPE=${TARGET_CPUTYPE} .else _TARGET_CPUTYPE=dummy .endif _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \ -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE .if ${_CPUTYPE} != ${_TARGET_CPUTYPE} .error CPUTYPE global should be set with ?=. .endif .if make(buildworld) BUILD_ARCH!= uname -p .if ${MACHINE_ARCH} != ${BUILD_ARCH} .error To cross-build, set TARGET_ARCH. .endif .endif .if ${MACHINE} == ${TARGET} && ${MACHINE_ARCH} == ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING) OBJTREE= ${MAKEOBJDIRPREFIX} .else OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp # /usr/games added for fortune which depend on strfile BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games:${WORLDTMP}/legacy/bin XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} # # Avoid running mktemp(1) unless actually needed. # It may not be functional, e.g., due to new ABI # when in the middle of installing over this system. # .if make(distributeworld) || make(installworld) INSTALLTMP!= /usr/bin/mktemp -d -u -t install .endif # # Building a world goes through the following stages # # 1. legacy stage [BMAKE] # This stage is responsible for creating compatibility # shims that are needed by the bootstrap-tools, # build-tools and cross-tools stages. # 1. bootstrap-tools stage [BMAKE] # This stage is responsible for creating programs that # are needed for backward compatibility reasons. They # are not built as cross-tools. # 2. build-tools stage [TMAKE] # This stage is responsible for creating the object # tree and building any tools that are needed during # the build process. # 3. cross-tools stage [XMAKE] # This stage is responsible for creating any tools that # are needed for cross-builds. A cross-compiler is one # of them. # 4. world stage [WMAKE] # This stage actually builds the world. # 5. install stage (optional) [IMAKE] # This stage installs a previously built world. # BOOTSTRAPPING?= 0 # Common environment for world related stages CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ CPUTYPE=${TARGET_CPUTYPE} .if ${MK_GROFF} != "no" CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \ GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \ GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac .endif .if defined(TARGET_CFLAGS) CROSSENV+= ${TARGET_CFLAGS} .endif # bootstrap-tools stage BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ VERSION="${VERSION}" \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ MK_CLANG_FULL=no MK_LLDB=no MK_TESTS=no # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ -DNO_LINT \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no MK_CLANG_FULL=no MK_LLDB=no MK_TESTS=no # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ MK_GDB=no MK_TESTS=no # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ VERSION="${VERSION}" KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \ ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ _LDSCRIPTROOT= \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} # make hierarchy HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q} .if defined(NO_ROOT) HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT .endif .if ${MK_CDDL} == "no" WMAKEENV+= MK_CTF=no .endif .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} .endif XCOMPILERS= CC CXX CPP .for COMPILER in ${XCOMPILERS} .if defined(CROSS_COMPILER_PREFIX) X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} .else X${COMPILER}?= ${${COMPILER}} .endif .endfor XBINUTILS= AS AR LD NM OBJDUMP RANLIB STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} .else X${BINUTIL}?= ${${BINUTIL}} .endif .endfor WMAKEENV+= CC="${XCC} ${XFLAGS}" CXX="${XCXX} ${XFLAGS}" \ CPP="${XCPP} ${XFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} .if ${XCC:M/*} XFLAGS= --sysroot=${WORLDTMP} .if defined(CROSS_BINUTILS_PREFIX) # In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a # directory, but the compiler will look in the right place for it's # tools so we don't need to tell it where to look. .if exists(${CROSS_BINUTILS_PREFIX}) XFLAGS+= -B${CROSS_BINUTILS_PREFIX} .endif .else XFLAGS+= -B${WORLDTMP}/usr/bin .endif -.if ${TARGET} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET} == "arm" .if ${TARGET_ARCH:M*eb*} == "" TARGET_ABI= gnueabi .elif ${TARGET_ARCH} == "armv6hf" TARGET_ABI= gnueabihf .endif .endif TARGET_ABI?= unknown TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XFLAGS+= -target ${TARGET_TRIPLE} .endif WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" # 32 bit world LIB32_OBJTREE= ${OBJTREE}${.CURDIR}/world32 LIB32TMP= ${OBJTREE}${.CURDIR}/lib32 .if ${TARGET_ARCH} == "amd64" .if empty(TARGET_CPUTYPE) LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ MACHINE_CPU="i686 mmx sse sse2" LIB32WMAKEFLAGS= \ AS="${AS} --32" \ LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" .elif ${TARGET_ARCH} == "powerpc64" .if empty(TARGET_CPUTYPE) LIB32CPUFLAGS= -mcpu=powerpc .else LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} .endif LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc LIB32WMAKEFLAGS= \ LD="${LD} -m elf32ppc_fbsd" .endif LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -DCOMPAT_32BIT \ -isystem ${LIB32TMP}/usr/include/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 .if ${XCC:M/*} LIB32FLAGS+= --sysroot=${WORLDTMP} .endif # Yes, the flags are redundant. LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${LIB32_OBJTREE} \ _SHLIBDIRPREFIX=${LIB32TMP} \ _LDSCRIPTROOT=${LIB32TMP} \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 \ LIBPRIVATEDIR=/usr/lib32/private \ DTRACE="${DTRACE} -32" LIB32WMAKEFLAGS+= CC="${XCC} ${LIB32FLAGS}" \ CXX="${XCXX} ${LIB32FLAGS}" \ DESTDIR=${LIB32TMP} \ -DCOMPAT_32BIT \ -DLIBRARIES_ONLY \ -DNO_CPU_CFLAGS \ MK_CTF=no \ -DNO_LINT \ MK_TESTS=no LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ MK_MAN=no MK_INFO=no MK_HTML=no LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} \ MK_TOOLCHAIN=no ${IMAKE_INSTALL} .endif IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \ ${IMAKE_INSTALL} ${IMAKE_MTREE} .if empty(.MAKEFLAGS:M-n) IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ LD_LIBRARY_PATH=${INSTALLTMP} \ PATH_LOCALE=${INSTALLTMP}/locale IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh .else IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP} .endif .if defined(DB_FROM_SRC) INSTALLFLAGS+= -N ${.CURDIR}/etc MTREEFLAGS+= -N ${.CURDIR}/etc .endif _INSTALL_DDIR= ${DESTDIR}/${DISTDIR} INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::} .if defined(NO_ROOT) METALOG?= ${DESTDIR}/${DISTDIR}/METALOG IMAKE+= -DNO_ROOT METALOG=${METALOG} INSTALLFLAGS+= -U -M ${METALOG} -D ${INSTALL_DDIR} MTREEFLAGS+= -W .endif .if defined(DB_FROM_SRC) || defined(NO_ROOT) IMAKE_INSTALL= INSTALL="install ${INSTALLFLAGS}" IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}" .endif # kernel stage KMAKEENV= ${WMAKEENV} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} # # buildworld # # Attempt to rebuild the entire system, with reasonable chance of # success, regardless of how old your existing system is. # _worldtmp: .if ${.CURDIR:C/[^,]//g} != "" # The m4 build of sendmail files doesn't like it if ',' is used # anywhere in the path of it's files. @echo @echo "*** Error: path to source tree contains a comma ','" @echo false .endif @echo @echo "--------------------------------------------------------------" @echo ">>> Rebuilding the temporary build tree" @echo "--------------------------------------------------------------" .if !defined(NO_CLEAN) rm -rf ${WORLDTMP} .if defined(LIB32TMP) rm -rf ${LIB32TMP} .endif .else rm -rf ${WORLDTMP}/legacy/usr/include # XXX - These three can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ lib usr legacy/bin legacy/usr mkdir -p ${WORLDTMP}/${_dir} .endfor mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/legacy/usr >/dev/null .if ${MK_GROFF} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.groff.dist \ -p ${WORLDTMP}/legacy/usr >/dev/null .endif mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} .if ${MK_DEBUG_FILES} != "no" # We could instead disable debug files for these build stages mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${WORLDTMP}/legacy/usr/lib >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${WORLDTMP}/usr/lib >/dev/null .endif .if ${MK_TESTS} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${WORLDTMP}/usr >/dev/null .endif .for _mtree in ${LOCAL_MTREE} mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null .endfor _legacy: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 1.1: legacy release compatibility shims" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${BMAKE} legacy _bootstrap-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 1.2: bootstrap tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools _cleanobj: .if !defined(NO_CLEAN) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} .if defined(LIB32TMP) ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} .endif .endif _obj: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-obj _build-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${TMAKE} build-tools _cross-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3: cross tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools _includes: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4.1: building includes" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes _libraries: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4.2: building libraries" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ ${WMAKE} -DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \ MK_PROFILE=no MK_TESTS=no libraries _depend: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4.3: make dependencies" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-depend everything: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4.4: building everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-all .if defined(LIB32TMP) build32: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 5.1: building 32 bit shim libraries" @echo "--------------------------------------------------------------" mkdir -p ${LIB32TMP}/usr/include mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${LIB32TMP}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null .if ${MK_DEBUG_FILES} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${LIB32TMP}/usr/lib >/dev/null .endif mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} .for _t in obj includes cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t} cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t} .if ${MK_CDDL} != "no" cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t} .endif cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t} .if ${MK_CRYPT} != "no" cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t} .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t} .endif .endfor .for _dir in usr.bin/lex/lib cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic cd ${.CURDIR}/${_dir}; \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ MAKEOBJDIRPREFIX=${LIB32_OBJTREE} ${MAKE} SSP_CFLAGS= DESTDIR= \ DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ build-tools .endfor cd ${.CURDIR}; \ ${LIB32WMAKE} -f Makefile.inc1 libraries .for _t in obj depend all cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ DIRPRFX=libexec/rtld-elf/ ${_t} cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ DIRPRFX=usr.bin/ldd ${_t} .endfor distribute32 install32: cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .if ${MK_CDDL} != "no" cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .if ${MK_CRYPT} != "no" cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif cd ${.CURDIR}/libexec/rtld-elf; \ PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//} .endif WMAKE_TGTS= .if !defined(SUBDIR_OVERRIDE) WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools .endif WMAKE_TGTS+= _cleanobj _obj _build-tools .if !defined(SUBDIR_OVERRIDE) WMAKE_TGTS+= _cross-tools .endif WMAKE_TGTS+= _includes _libraries _depend everything .if defined(LIB32TMP) && ${MK_LIB32} != "no" WMAKE_TGTS+= build32 .endif buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue buildworld_prologue: @echo "--------------------------------------------------------------" @echo ">>> World build started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" buildworld_epilogue: @echo @echo "--------------------------------------------------------------" @echo ">>> World build completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" # # We need to have this as a target because the indirection between Makefile # and Makefile.inc1 causes the correct PATH to be used, rather than a # modification of the current environment's PATH. In addition, we need # to quote multiword values. # buildenvvars: @echo ${WMAKEENV:Q} buildenv: @echo Entering world for ${TARGET_ARCH}:${TARGET} @cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32} toolchain: ${TOOLCHAIN_TGTS} kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} # # installcheck # # Checks to be sure system is ready for installworld/installkernel. # installcheck: _installcheck_world _installcheck_kernel _installcheck_world: _installcheck_kernel: # # Require DESTDIR to be set if installing for a different architecture or # using the user/group database in the source tree. # .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \ defined(DB_FROM_SRC) .if !make(distributeworld) _installcheck_world: __installcheck_DESTDIR _installcheck_kernel: __installcheck_DESTDIR __installcheck_DESTDIR: .if !defined(DESTDIR) || empty(DESTDIR) @echo "ERROR: Please set DESTDIR!"; \ false .endif .endif .endif .if !defined(DB_FROM_SRC) # # Check for missing UIDs/GIDs. # CHECK_UIDS= auditdistd CHECK_GIDS= audit .if ${MK_SENDMAIL} != "no" CHECK_UIDS+= smmsp CHECK_GIDS+= smmsp .endif .if ${MK_PF} != "no" CHECK_UIDS+= proxy CHECK_GIDS+= proxy authpf .endif .if ${MK_UNBOUND} != "no" CHECK_UIDS+= unbound CHECK_GIDS+= unbound .endif _installcheck_world: __installcheck_UGID __installcheck_UGID: .for uid in ${CHECK_UIDS} @if ! `id -u ${uid} >/dev/null 2>&1`; then \ echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \ false; \ fi .endfor .for gid in ${CHECK_GIDS} @if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \ echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \ false; \ fi .endfor .endif # # Required install tools to be saved in a scratch dir for safety. # .if ${MK_INFO} != "no" _install-info= install-info .endif .if ${MK_ZONEINFO} != "no" _zoneinfo= zic tzsetup .endif ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep id install ${_install-info} \ ln lockf make mkdir mtree mv pwd_mkdb \ rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo} \ ${LOCAL_ITOOLS} # # distributeworld # # Distributes everything compiled by a `buildworld'. # # installworld # # Installs everything compiled by a 'buildworld'. # # Non-base distributions produced by the base system EXTRA_DISTRIBUTIONS= doc .if ${MK_GAMES} != "no" EXTRA_DISTRIBUTIONS+= games .endif .if defined(LIB32TMP) && ${MK_LIB32} != "no" EXTRA_DISTRIBUTIONS+= lib32 .endif .if ${MK_TESTS} != "no" EXTRA_DISTRIBUTIONS+= tests .endif DEBUG_DISTRIBUTIONS= .if ${MK_DEBUG_FILES} != "no" DEBUG_DISTRIBUTIONS+= base ${EXTRA_DISTRIBUTIONS:S,doc,,} .endif MTREE_MAGIC?= mtree 2.0 distributeworld installworld: _installcheck_world mkdir -p ${INSTALLTMP} progs=$$(for prog in ${ITOOLS}; do \ if progpath=`which $$prog`; then \ echo $$progpath; \ else \ echo "Required tool $$prog not found in PATH." >&2; \ exit 1; \ fi; \ done); \ libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \ while read line; do \ set -- $$line; \ if [ "$$2 $$3" != "not found" ]; then \ echo $$2; \ else \ echo "Required library $$1 not found." >&2; \ exit 1; \ fi; \ done); \ cp $$libs $$progs ${INSTALLTMP} cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale .if defined(NO_ROOT) echo "#${MTREE_MAGIC}" > ${METALOG} .endif .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} -mkdir ${DESTDIR}/${DISTDIR}/${dist} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ -p ${DESTDIR}/${DISTDIR}/${dist} >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null .if ${MK_DEBUG_FILES} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null .endif .if ${MK_TESTS} != "no" && ${dist} == "tests" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null .endif .if defined(NO_ROOT) ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ sed -e 's#^\./#./${dist}/#' >> ${METALOG} ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \ sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \ sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG} .endif .endfor -mkdir ${DESTDIR}/${DISTDIR}/base cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \ DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \ LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs .endif ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} find ${DESTDIR}/${DISTDIR}/${dist} -mindepth 1 -empty -delete .endfor .if defined(NO_ROOT) .for dist in base ${EXTRA_DISTRIBUTIONS} @# For each file that exists in this dist, print the corresponding @# line from the METALOG. This relies on the fact that @# a line containing only the filename will sort immediatly before @# the relevant mtree line. cd ${DESTDIR}/${DISTDIR}; \ find ./${dist} | sort -u ${METALOG} - | \ awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}\//, "./"); print } }' > \ ${DESTDIR}/${DISTDIR}/${dist}.meta .endfor .for dist in ${DEBUG_DISTRIBUTIONS} @# For each file that exists in this dist, print the corresponding @# line from the METALOG. This relies on the fact that @# a line containing only the filename will sort immediatly before @# the relevant mtree line. cd ${DESTDIR}/${DISTDIR}; \ find ./${dist}/usr/lib/debug | sort -u ${METALOG} - | \ awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}\//, "./"); print } }' > \ ${DESTDIR}/${DISTDIR}/${dist}.debug.meta .endfor .endif .endif packageworld: .for dist in base ${EXTRA_DISTRIBUTIONS} .if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \ --exclude usr/lib/debug \ @${DESTDIR}/${DISTDIR}/${dist}.meta .else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \ --exclude usr/lib/debug . .endif .endfor .for dist in ${DEBUG_DISTRIBUTIONS} . if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvJf ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz \ @${DESTDIR}/${DISTDIR}/${dist}.debug.meta . else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvJfL ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz \ usr/lib/debug . endif .endfor # # reinstall # # If you have a build server, you can NFS mount the source and obj directories # and do a 'make reinstall' on the *client* to install new binaries from the # most recent server build. # reinstall: .MAKE @echo "--------------------------------------------------------------" @echo ">>> Making hierarchy" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \ LOCAL_MTREE=${LOCAL_MTREE:Q} hierarchy @echo @echo "--------------------------------------------------------------" @echo ">>> Installing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install .if defined(LIB32TMP) && ${MK_LIB32} != "no" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 .endif redistribute: .MAKE @echo "--------------------------------------------------------------" @echo ">>> Distributing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute .if defined(LIB32TMP) && ${MK_LIB32} != "no" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \ DISTRIBUTION=lib32 .endif distrib-dirs distribution: .MAKE cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} # # buildkernel and installkernel # # Which kernels to build and/or install is specified by setting # KERNCONF. If not defined a GENERIC kernel is built/installed. # Only the existing (depending TARGET) config files are used # for building kernels and only the first of these is designated # as the one being installed. # # Note that we have to use TARGET instead of TARGET_ARCH when # we're in kernel-land. Since only TARGET_ARCH is (expected) to # be set to cross-build, we have to make sure TARGET is set # properly. .if defined(KERNFAST) NO_KERNELCLEAN= t NO_KERNELCONFIG= t NO_KERNELDEPEND= t NO_KERNELOBJ= t # Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah .if !defined(KERNCONF) && ${KERNFAST} != "1" KERNCONF=${KERNFAST} .endif .endif .if ${TARGET_ARCH} == "powerpc64" KERNCONF?= GENERIC64 .else KERNCONF?= GENERIC .endif INSTKERNNAME?= kernel KERNSRCDIR?= ${.CURDIR}/sys KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR} KERNCONFDIR?= ${KRNLCONFDIR} BUILDKERNELS= INSTALLKERNEL= .for _kernel in ${KERNCONF} .if exists(${KERNCONFDIR}/${_kernel}) BUILDKERNELS+= ${_kernel} .if empty(INSTALLKERNEL) INSTALLKERNEL= ${_kernel} .endif .endif .endfor buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE # # buildkernel # # Builds all kernels defined by BUILDKERNELS. # buildkernel: .if empty(BUILDKERNELS) @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \ false .endif @echo .for _kernel in ${BUILDKERNELS} @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" @echo "===> ${_kernel}" mkdir -p ${KRNLOBJDIR} .if !defined(NO_KERNELCONFIG) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 1: configuring the kernel" @echo "--------------------------------------------------------------" cd ${KRNLCONFDIR}; \ PATH=${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ -I '${KERNCONFDIR}' '${KERNCONFDIR}/${_kernel}' .endif .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} .endif .if !defined(NO_KERNELOBJ) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj .endif @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3.1: making dependencies" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ .endif @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3.2: building everything" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" .endfor # # installkernel, etc. # # Install the kernel defined by INSTALLKERNEL # installkernel installkernel.debug \ reinstallkernel reinstallkernel.debug: _installcheck_kernel .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ false .endif @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${INSTALLKERNEL}" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} distributekernel distributekernel.debug: .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ false .endif mkdir -p ${DESTDIR}/${DISTDIR} .if defined(NO_ROOT) echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.premeta .endif cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.premeta/} \ ${IMAKE_MTREE} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \ DESTDIR=${INSTALL_DDIR}/kernel \ ${.TARGET:S/distributekernel/install/} .if defined(NO_ROOT) sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \ ${DESTDIR}/${DISTDIR}/kernel.meta .endif .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//} .if defined(NO_ROOT) echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta .endif cd ${KRNLOBJDIR}/${_kernel}; \ ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.${_kernel}.premeta/} \ ${IMAKE_MTREE} PATH=${TMPPATH} ${MAKE} \ KERNEL=${INSTKERNNAME}.${_kernel} \ DESTDIR=${INSTALL_DDIR}/kernel.${_kernel} \ ${.TARGET:S/distributekernel/install/} .if defined(NO_ROOT) sed -e 's|^./kernel|.|' \ ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta > \ ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta .endif .endfor packagekernel: .if defined(NO_ROOT) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz \ @${DESTDIR}/${DISTDIR}/kernel.meta .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz \ @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta .endfor .else cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz . .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz . .endfor .endif # # doxygen # # Build the API documentation with doxygen # doxygen: @if [ ! -x `/usr/bin/which doxygen` ]; then \ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all # # update # # Update the source tree(s), by running svn/svnup to update to the # latest copy. # update: .if (defined(CVS_UPDATE) || defined(SUP_UPDATE)) && !defined(SVN_UPDATE) @echo "--------------------------------------------------------------" @echo "CVS_UPDATE and SUP_UPDATE are no longer supported." @echo "Please see: https://wiki.freebsd.org/CvsIsDeprecated" @echo "--------------------------------------------------------------" @exit 1 .endif .if defined(SVN_UPDATE) @echo "--------------------------------------------------------------" @echo ">>> Updating ${.CURDIR} using Subversion" @echo "--------------------------------------------------------------" @(cd ${.CURDIR} && ${SVN} update ${SVNFLAGS}) .endif # # ------------------------------------------------------------------------ # # From here onwards are utility targets used by the 'make world' and # related targets. If your 'world' breaks, you may like to try to fix # the problem and manually run the following targets to attempt to # complete the build. Beware, this is *not* guaranteed to work, you # need to have a pretty good grip on the current state of the system # to attempt to manually finish it. If in doubt, 'make world' again. # # # legacy: Build compatibility shims for the next three targets # legacy: .if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0 @echo "ERROR: Source upgrades from versions prior to 8.0 not supported."; \ false .endif .for _tool in tools/build ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all && \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor # # bootstrap-tools: Build tools needed for compatibility # .if ${MK_GAMES} != "no" _strfile= games/fortune/strfile .endif .if ${MK_CXX} != "no" _gperf= gnu/usr.bin/gperf .endif .if ${MK_GROFF} != "no" _groff= gnu/usr.bin/groff .endif .if ${MK_VT} != "no" _vtfontcvt= usr.bin/vtfontcvt .endif .if ${BOOTSTRAPPING} < 900002 _sed= usr.bin/sed .endif .if ${BOOTSTRAPPING} < 1000002 _m4= lib/libohash \ usr.bin/m4 .endif .if ${BOOTSTRAPPING} < 1000013 _yacc= lib/liby \ usr.bin/yacc .endif .if ${BOOTSTRAPPING} < 1000014 _crunch= usr.sbin/crunch .endif .if ${BOOTSTRAPPING} < 1000026 _nmtree= lib/libnetbsd \ usr.sbin/nmtree .endif .if ${BOOTSTRAPPING} < 1000027 _cat= bin/cat .endif .if ${BOOTSTRAPPING} < 1000033 _lex= usr.bin/lex .endif .if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041 _awk= usr.bin/awk .endif .if ${MK_BSNMP} != "no" _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif # We need to build tblgen when we're building clang either as # the bootstrap compiler, or as the part of the normal build. .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" _clang_tblgen= \ lib/clang/libllvmsupport \ lib/clang/libllvmtablegen \ usr.bin/clang/tblgen \ usr.bin/clang/clang-tblgen .endif # dtrace tools are required for older bootstrap env and cross-build # pre libdwarf .if ${MK_CDDL} != "no" && (${BOOTSTRAPPING} < 1100006 \ || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge .endif # Default to building the GPL DTC, but build the BSDL one if users explicitly # request it. _dtc= usr.bin/dtc .if ${MK_GPL_DTC} != "no" _dtc= gnu/usr.bin/dtc .endif .if ${MK_KERBEROS} != "no" _kerberos5_bootstrap_tools= \ kerberos5/tools/make-roken \ kerberos5/lib/libroken \ kerberos5/lib/libvers \ kerberos5/tools/asn1_compile \ kerberos5/tools/slc \ usr.bin/compile_et .endif # Please document (add comment) why something is in 'bootstrap-tools'. # Try to bound the building of the bootstrap-tool to just the # FreeBSD versions that need the tool built at this stage of the build. bootstrap-tools: .MAKE .for _tool in \ ${_clang_tblgen} \ ${_kerberos5_bootstrap_tools} \ ${_dtrace_tools} \ ${_strfile} \ ${_gperf} \ ${_groff} \ ${_dtc} \ ${_awk} \ ${_cat} \ usr.bin/lorder \ usr.bin/makewhatis \ usr.bin/rpcgen \ ${_sed} \ ${_yacc} \ ${_m4} \ ${_lex} \ lib/libmd \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ ${_crunch} \ ${_nmtree} \ ${_vtfontcvt} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all && \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor # # build-tools: Build special purpose build tools # .if !defined(NO_SHARE) _share= share/syscons/scrnmaps .endif .if ${MK_GCC} != "no" _gcc_tools= gnu/usr.bin/cc/cc_tools .endif .if ${MK_RESCUE} != "no" _rescue= rescue/rescue .endif build-tools: .MAKE .for _tool in \ bin/csh \ bin/sh \ ${_rescue} \ ${LOCAL_TOOL_DIRS} \ lib/ncurses/ncurses \ lib/ncurses/ncursesw \ ${_share} \ usr.bin/awk \ lib/libmagic \ usr.bin/mkesdb_static \ usr.bin/mkcsmapper_static \ usr.bin/vi/catalog ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ build-tools .endfor .for _tool in \ ${_gcc_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all .endfor # # kernel-tools: Build kernel-building tools # kernel-tools: .MAKE mkdir -p ${MAKEOBJDIRPREFIX}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${MAKEOBJDIRPREFIX}/usr >/dev/null # # cross-tools: Build cross-building tools # .if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld .endif .endif .if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${MK_RESCUE} != "no" || defined(RELEASEDIR) _crunchide= usr.sbin/crunch/crunchide .endif .if ${TARGET_ARCH} == "i386" && defined(RELEASEDIR) _kgzip= usr.sbin/kgzip .endif .endif # If we're given an XAS, don't build binutils. .if ${XAS:M/*} == "" && ${MK_BINUTILS_BOOTSTRAP} != "no" _binutils= gnu/usr.bin/binutils .endif # If an full path to an external cross compiler is given, don't build # a cross compiler. .if ${XCC:M/*} == "" && ${MK_CROSS_COMPILER} != "no" .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang _clang_libs= lib/clang .endif .if ${MK_GCC_BOOTSTRAP} != "no" _cc= gnu/usr.bin/cc .endif .endif cross-tools: .MAKE .for _tool in \ ${_clang_libs} \ ${_clang} \ ${_binutils} \ ${_cc} \ usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ ${_kgzip} \ sys/boot/usb/tools ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all && \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ VERSION="${VERSION}" NXBMAKE= ${NXBENV} ${MAKE} \ TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \ CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \ MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ MK_GDB=no MK_TESTS=no \ SSP_CFLAGS= \ MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ MK_CLANG_FULL=no MK_LLDB=no native-xtools: .MAKE mkdir -p ${OBJTREE}/nxb-bin/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${OBJTREE}/nxb-bin/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${OBJTREE}/nxb-bin/usr/include >/dev/null .for _tool in \ ${_clang_tblgen} \ usr.bin/ar \ ${_binutils} \ ${_cc} \ ${_gcc_tools} \ ${_clang_libs} \ ${_clang} \ usr.bin/awk \ usr.bin/bmake \ usr.bin/lex \ usr.bin/lorder \ usr.bin/sed \ usr.bin/yacc ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${NXBMAKE} DIRPRFX=${_tool}/ obj && \ ${NXBMAKE} DIRPRFX=${_tool}/ depend && \ ${NXBMAKE} DIRPRFX=${_tool}/ all && \ ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${OBJTREE}/nxb-bin install .endfor # # hierarchy - ensure that all the needed directories are present # hierarchy hier: .MAKE cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}. # # The list of libraries with dependents (${_prebuild_libs}) and their # interdependencies (__L) are built automatically by the # ${.CURDIR}/tools/make_libdeps.sh script. # libraries: .MAKE cd ${.CURDIR} && \ ${MAKE} -f Makefile.inc1 _prereq_libs && \ ${MAKE} -f Makefile.inc1 _startup_libs && \ ${MAKE} -f Makefile.inc1 _prebuild_libs && \ ${MAKE} -f Makefile.inc1 _generic_libs # # static libgcc.a prerequisite for shared libc # _prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc lib/libcompiler_rt # These dependencies are not automatically generated: # # gnu/lib/csu, gnu/lib/libgcc, lib/csu and lib/libc must be built before # all shared libraries for ELF. # _startup_libs= gnu/lib/csu .if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) _startup_libs+= lib/csu/${MACHINE_ARCH}-elf .elif exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) _startup_libs+= lib/csu/${MACHINE_ARCH} .else _startup_libs+= lib/csu/${MACHINE_CPUARCH} .endif _startup_libs+= gnu/lib/libgcc _startup_libs+= lib/libcompiler_rt _startup_libs+= lib/libc _startup_libs+= lib/libc_nonshared .if ${MK_LIBCPLUSPLUS} != "no" _startup_libs+= lib/libcxxrt .endif gnu/lib/libgcc__L: lib/libc__L gnu/lib/libgcc__L: lib/libc_nonshared__L .if ${MK_LIBCPLUSPLUS} != "no" lib/libcxxrt__L: gnu/lib/libgcc__L .endif _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_kerberos5_lib_libhdb} \ ${_kerberos5_lib_libheimbase} \ ${_kerberos5_lib_libheimntlm} \ ${_kerberos5_lib_libheimsqlite} \ ${_kerberos5_lib_libheimipcc} \ ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ ${_kerberos5_lib_libwind} \ ${_lib_atf} \ lib/libbz2 ${_libcom_err} lib/libcrypt \ lib/libelf lib/libexpat \ ${_lib_libgssapi} \ lib/libkiconv lib/libkvm lib/liblzma lib/libmd lib/libnv \ ${_lib_libcapsicum} \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libavl} \ ${_cddl_lib_libzfs_core} \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_GNUCXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/lib/libstdc++__L: lib/msun__L gnu/lib/libsupc++__L: gnu/lib/libstdc++__L .endif .if defined(WITH_ATF) || ${MK_TESTS} != "no" .if !defined(WITH_ATF) # Ensure that the ATF libraries will be built during make libraries, even # though they will have WITHOUT_TESTS MAKE+= -DWITH_ATF .endif _lib_atf= lib/atf .endif .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr .endif .if ${MK_OFED} != "no" _ofed_lib= contrib/ofed/usr.lib/ .endif .if ${MK_CASPER} != "no" _lib_libcapsicum=lib/libcapsicum .endif lib/libcapsicum__L: lib/libnv__L lib/libpjdlog__L: lib/libutil__L _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib} .for _DIR in ${LOCAL_LIB_DIRS} .if exists(${.CURDIR}/${_DIR}/Makefile) _generic_libs+= ${_DIR} .endif .endfor lib/libopie__L lib/libtacplus__L: lib/libmd__L .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair _cddl_lib_libavl= cddl/lib/libavl _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib= cddl/lib cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L .endif .if ${MK_CRYPT} != "no" .if ${MK_OPENSSL} != "no" _secure_lib_libcrypto= secure/lib/libcrypto _secure_lib_libssl= secure/lib/libssl lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L .if ${MK_LDNS} != "no" _lib_libldns= lib/libldns lib/libldns__L: secure/lib/libcrypto__L .endif .if ${MK_OPENSSH} != "no" _secure_lib_libssh= secure/lib/libssh secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if ${MK_LDNS} != "no" secure/lib/libssh__L: lib/libldns__L .endif .if ${MK_KERBEROS_SUPPORT} != "no" secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libmd__L kerberos5/lib/libroken__L .endif .endif .endif _secure_lib= secure/lib .endif .if ${MK_KERBEROS} != "no" kerberos5/lib/libasn1__L: lib/libcom_err__L kerberos5/lib/libroken__L kerberos5/lib/libhdb__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ kerberos5/lib/libkrb5__L kerberos5/lib/libroken__L \ kerberos5/lib/libwind__L kerberos5/lib/libheimsqlite__L kerberos5/lib/libheimntlm__L: secure/lib/libcrypto__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libhx509__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ secure/lib/libcrypto__L kerberos5/lib/libroken__L kerberos5/lib/libwind__L kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \ kerberos5/lib/libroken__L kerberos5/lib/libwind__L \ kerberos5/lib/libheimbase__L kerberos5/lib/libheimipcc__L kerberos5/lib/libroken__L: lib/libcrypt__L kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libheimbase__L: lib/libthr__L kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L kerberos5/lib/libheimsqlite__L: lib/libthr__L .endif .if ${MK_GSSAPI} != "no" _lib_libgssapi= lib/libgssapi .endif .if ${MK_KERBEROS} != "no" _kerberos5_lib= kerberos5/lib _kerberos5_lib_libasn1= kerberos5/lib/libasn1 _kerberos5_lib_libhdb= kerberos5/lib/libhdb _kerberos5_lib_libheimbase= kerberos5/lib/libheimbase _kerberos5_lib_libkrb5= kerberos5/lib/libkrb5 _kerberos5_lib_libhx509= kerberos5/lib/libhx509 _kerberos5_lib_libroken= kerberos5/lib/libroken _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm _kerberos5_lib_libheimsqlite= kerberos5/lib/libheimsqlite _kerberos5_lib_libheimipcc= kerberos5/lib/libheimipcc _kerberos5_lib_libwind= kerberos5/lib/libwind _libcom_err= lib/libcom_err .endif .if ${MK_NIS} != "no" _lib_libypclnt= lib/libypclnt .endif .if ${MK_OPENSSL} == "no" lib/libradius__L: lib/libmd__L .endif .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib} && \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj && \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend && \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ DIRPRFX=${_lib}/ all && \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ DIRPRFX=${_lib}/ install .endif .endfor .for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs} ${_lib}__L: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib} && \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj && \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend && \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all && \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install .endif .endfor # libpam is special: we need to build static PAM modules before # static PAM library, and dynamic PAM library before dynamic PAM # modules. lib/libpam__L: .PHONY .MAKE ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \ cd ${.CURDIR}/lib/libpam && \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj && \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ depend && \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \ -D_NO_LIBPAM_SO_YET all && \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \ -D_NO_LIBPAM_SO_YET install _prereq_libs: ${_prereq_libs:S/$/__PL/} _startup_libs: ${_startup_libs:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} _generic_libs: ${_generic_libs:S/$/__L/} .for __target in all clean cleandepend cleandir depend includes obj .for entry in ${SUBDIR} ${entry}.${__target}__D: .PHONY .MAKE ${_+_}@set -e; if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \ edir=${entry}.${MACHINE_ARCH}; \ cd ${.CURDIR}/$${edir}; \ else \ ${ECHODIR} "===> ${DIRPRFX}${entry} (${__target})"; \ edir=${entry}; \ cd ${.CURDIR}/$${edir}; \ fi; \ ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ .endfor par-${__target}: ${SUBDIR:S/$/.${__target}__D/} .endfor .include .if make(check-old) || make(check-old-dirs) || \ make(check-old-files) || make(check-old-libs) || \ make(delete-old) || make(delete-old-dirs) || \ make(delete-old-files) || make(delete-old-libs) # # check for / delete old files section # .include "ObsoleteFiles.inc" OLD_LIBS_MESSAGE="Please be sure no application still uses those libraries, \ else you can not start such an application. Consult UPDATING for more \ information regarding how to cope with the removal/revision bump of a \ specific library." .if !defined(BATCH_DELETE_OLD_FILES) RM_I=-i .else RM_I=-v .endif delete-old-files: @echo ">>> Removing old files (only deletes safe to delete libs)" # Ask for every old file if the user really wants to remove it. # It's annoying, but better safe than sorry. # NB: We cannot pass the list of OLD_FILES as a parameter because the # argument list will get too long. Using .for/.endfor make "loops" will make # the Makefile parser segfault. @exec 3<&0; \ cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ while read file; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ rm ${RM_I} "${DESTDIR}/$${file}" <&3; \ fi; \ done # Remove catpages without corresponding manpages. @exec 3<&0; \ find ${DESTDIR}/usr/share/man/cat* ! -type d | \ sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ while read catpage; do \ read manpage; \ if [ ! -e "$${manpage}" ]; then \ rm ${RM_I} $${catpage} <&3; \ fi; \ done @echo ">>> Old files removed" check-old-files: @echo ">>> Checking for old files" @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ while read file; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ echo "${DESTDIR}/$${file}"; \ fi; \ done # Check for catpages without corresponding manpages. @find ${DESTDIR}/usr/share/man/cat* ! -type d | \ sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ while read catpage; do \ read manpage; \ if [ ! -e "$${manpage}" ]; then \ echo $${catpage}; \ fi; \ done delete-old-libs: @echo ">>> Removing old libraries" @echo "${OLD_LIBS_MESSAGE}" | fmt @exec 3<&0; \ cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_LIBS | xargs -n1 | \ while read file; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ rm ${RM_I} "${DESTDIR}/$${file}" <&3; \ fi; \ for ext in debug symbols; do \ if ! [ -e "${DESTDIR}/$${file}" ] && [ -f \ "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \ rm ${RM_I} "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" \ <&3; \ fi; \ done; \ done @echo ">>> Old libraries removed" check-old-libs: @echo ">>> Checking for old libraries" @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_LIBS | xargs -n1 | \ while read file; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ echo "${DESTDIR}/$${file}"; \ fi; \ for ext in debug symbols; do \ if [ -f "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \ echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \ fi; \ done; \ done delete-old-dirs: @echo ">>> Removing old directories" @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_DIRS | xargs -n1 | sort -r | \ while read dir; do \ if [ -d "${DESTDIR}/$${dir}" ]; then \ rmdir -v "${DESTDIR}/$${dir}" || true; \ elif [ -L "${DESTDIR}/$${dir}" ]; then \ echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \ fi; \ done @echo ">>> Old directories removed" check-old-dirs: @echo ">>> Checking for old directories" @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_DIRS | xargs -n1 | \ while read dir; do \ if [ -d "${DESTDIR}/$${dir}" ]; then \ echo "${DESTDIR}/$${dir}"; \ elif [ -L "${DESTDIR}/$${dir}" ]; then \ echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \ fi; \ done delete-old: delete-old-files delete-old-dirs @echo "To remove old libraries run '${MAKE} delete-old-libs'." check-old: check-old-files check-old-libs check-old-dirs @echo "To remove old files and directories run '${MAKE} delete-old'." @echo "To remove old libraries run '${MAKE} delete-old-libs'." .endif # # showconfig - show build configuration. # showconfig: @${MAKE} -n -f src.opts.mk -V dummy -dg1 2>&1 | grep ^MK_ | sort .if !empty(KRNLOBJDIR) && !empty(KERNCONF) DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) .if exists(${KERNCONFDIR}/${KERNCONF}) FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ '${KERNCONFDIR}/${KERNCONF}' ; echo .endif .endif .endif .if !defined(DTBOUTPUTPATH) || !exists(${DTBOUTPUTPATH}) DTBOUTPUTPATH= ${.CURDIR} .endif # # Build 'standalone' Device Tree Blob # builddtb: @PATH=${TMPPATH} MACHINE=${TARGET} \ ${.CURDIR}/sys/tools/fdt/make_dtb.sh ${.CURDIR}/sys \ "${FDT_DTS_FILE}" ${DTBOUTPUTPATH} ############### .if defined(TARGET) && defined(TARGET_ARCH) .if ${TARGET} == ${MACHINE} && ${TARGET_ARCH} == ${MACHINE_ARCH} XDEV_CPUTYPE?=${CPUTYPE} .else XDEV_CPUTYPE?=${TARGET_CPUTYPE} .endif NOFUN=-DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT \ MK_MAN=no MK_NLS=no MK_PROFILE=no \ MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no MK_WARNS=no \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ CPUTYPE=${XDEV_CPUTYPE} XDDIR=${TARGET_ARCH}-freebsd XDTP?=/usr/${XDDIR} .if ${XDTP:N/*} .error XDTP variable should be an absolute path .endif CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \ INSTALL="sh ${.CURDIR}/tools/install.sh" CDENV= ${CDBENV} \ _SHLIBDIRPREFIX=${XDDESTDIR} \ TOOLS_PREFIX=${XDTP} CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \ --sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \ -B${XDDESTDIR}/usr/bin -B${XDDESTDIR}/usr/lib CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CFLAGS}" \ CPP="${CPP} ${CD2CFLAGS}" \ MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN} CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} ${NOFUN} XDDESTDIR=${DESTDIR}/${XDTP} .if !defined(OSREL) OSREL!= uname -r | sed -e 's/[-(].*//' .endif .ORDER: xdev-build xdev-install xdev-links xdev: xdev-build xdev-install .ORDER: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools xdev-build: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools _xb-worldtmp: mkdir -p ${CDTMP}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${CDTMP}/usr >/dev/null _xb-bootstrap-tools: .for _tool in \ ${_clang_tblgen} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${CDMAKE} DIRPRFX=${_tool}/ obj && \ ${CDMAKE} DIRPRFX=${_tool}/ depend && \ ${CDMAKE} DIRPRFX=${_tool}/ all && \ ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install .endfor _xb-build-tools: ${_+_}@cd ${.CURDIR}; \ ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools _xb-cross-tools: .for _tool in \ ${_binutils} \ usr.bin/ar \ ${_clang_libs} \ ${_clang} \ ${_cc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool} && \ ${CDMAKE} DIRPRFX=${_tool}/ obj && \ ${CDMAKE} DIRPRFX=${_tool}/ depend && \ ${CDMAKE} DIRPRFX=${_tool}/ all .endfor _xi-mtree: ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}" mkdir -p ${XDDESTDIR} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ -p ${XDDESTDIR} >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${XDDESTDIR}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null .if ${MK_TESTS} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${XDDESTDIR}/usr >/dev/null .endif .ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-cross-tools: @echo "_xi-cross-tools" .for _tool in \ ${_binutils} \ usr.bin/ar \ ${_clang_libs} \ ${_clang} \ ${_cc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR} .endfor _xi-includes: ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes \ DESTDIR=${XDDESTDIR} _xi-libraries: ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \ DESTDIR=${XDDESTDIR} xdev-links: ${_+_}cd ${XDDESTDIR}/usr/bin; \ mkdir -p ../../../../usr/bin; \ for i in *; do \ ln -sf ../../${XDTP}/usr/bin/$$i \ ../../../../usr/bin/${XDDIR}-$$i; \ ln -sf ../../${XDTP}/usr/bin/$$i \ ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \ done .else xdev xdev-build xdev-install xdev-links: @echo "*** Error: Both TARGET and TARGET_ARCH must be defined for \"${.TARGET}\" target" .endif Index: head/gnu/lib/csu/Makefile =================================================================== --- head/gnu/lib/csu/Makefile (revision 272349) +++ head/gnu/lib/csu/Makefile (revision 272350) @@ -1,77 +1,77 @@ # $FreeBSD$ .include MK_SSP= no GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs CCDIR= ${.CURDIR}/../../usr.bin/cc .include "${CCDIR}/Makefile.tgt" .PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR} SRCS= crtstuff.c tconfig.h tm.h options.h OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbeginS.o crtendS.o CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 CFLAGS.gcc+= -finhibit-size-directive -fno-toplevel-reorder CFLAGS+= -fno-inline-functions -fno-exceptions \ -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \ -fno-omit-frame-pointer CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif .if ${MACHINE_CPUARCH} == "powerpc" TGTOBJS= crtsavres.o SRCS+= crtsavres.asm .endif .if ${MACHINE_CPUARCH} == "sparc64" TGTOBJS= crtfastmath.o SRCS+= crtfastmath.c .endif BEGINSRC?= crtstuff.c ENDSRC?= crtstuff.c all: ${OBJS} ${SOBJS} ${TGTOBJS} ${OBJS} ${SOBJS}: ${SRCS:M*.h} CLEANFILES= ${OBJS} ${SOBJS} ${TGTOBJS} crtbegin.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ -c -o ${.TARGET} ${.ALLSRC:N*.h} crtbeginT.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFT_O \ -c -o ${.TARGET} ${.ALLSRC:N*.h} crtbeginS.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ -c -o ${.TARGET} ${.ALLSRC:N*.h} crtend.o: ${ENDSRC} ${CC} ${CFLAGS} -g0 -DCRT_END \ -c -o ${.TARGET} ${.ALLSRC:N*.h} crtendS.o: ${ENDSRC} ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ -c -o ${.TARGET} ${.ALLSRC:N*.h} CLEANFILES+= tm.h tconfig.h options.h optionlist cs-tconfig.h cs-tm.h tm.h tconfig.h options.h: ${CCDIR}/cc_tools/Makefile (cd ${.CURDIR}; ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}) realinstall: .for file in ${OBJS} ${SOBJS} ${TGTOBJS} ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${file} ${DESTDIR}${LIBDIR}/${file} .endfor .include Index: head/gnu/lib/libgcc/Makefile =================================================================== --- head/gnu/lib/libgcc/Makefile (revision 272349) +++ head/gnu/lib/libgcc/Makefile (revision 272350) @@ -1,374 +1,370 @@ # $FreeBSD$ GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs SHLIB_NAME= libgcc_s.so.1 SHLIBDIR?= /lib .include # # libgcc is linked in last and thus cannot depend on ssp symbols coming # from earlier libraries. Disable stack protection for this library. # MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif .PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}/config ${GCCDIR} CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ -DHAVE_GTHR_DEFAULT \ -I${GCCLIB}/include \ -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${.CURDIR}/../../usr.bin/cc/cc_tools LDFLAGS+= -nodefaultlibs DPADD+= ${LIBC} LDADD+= -lc OBJS= # added to below in various ways depending on TARGET_CPUARCH #--------------------------------------------------------------------------- # # Library members defined in libgcc2.c. # When upgrading GCC, obtain the following list from mklibgcc.in # LIB2FUNCS= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \ _cmpdi2 _ucmpdi2 \ _enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \ _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors \ _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab \ _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \ _powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 \ _divxc3 _divtc3 _bswapsi2 _bswapdi2 .if ${COMPILER_TYPE} != "clang" || ${TARGET_CPUARCH} != "arm" LIB2FUNCS+= _clear_cache .endif # The floating-point conversion routines that involve a single-word integer. .for mode in sf df xf LIB2FUNCS+= _fixuns${mode}si .endfor # Likewise double-word routines. -.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no" +.if ${TARGET_CPUARCH} != "arm" # These are implemented in an ARM specific file but will not be filtered out .for mode in sf df xf tf LIB2FUNCS+= _fix${mode}di _fixuns${mode}di LIB2FUNCS+= _floatdi${mode} _floatundi${mode} .endfor .endif LIB2ADD = $(LIB2FUNCS_EXTRA) LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) # Additional sources to handle exceptions; overridden by targets as needed. LIB2ADDEH = unwind-dw2.c unwind-dw2-fde-glibc.c unwind-sjlj.c gthr-gnat.c \ unwind-c.c LIB2ADDEHSTATIC = $(LIB2ADDEH) LIB2ADDEHSHARED = $(LIB2ADDEH) # List of extra C and assembler files to add to static and shared libgcc2. # Assembler files should have names ending in `.asm'. LIB2FUNCS_EXTRA = # List of extra C and assembler files to add to static libgcc2. # Assembler files should have names ending in `.asm'. LIB2FUNCS_STATIC_EXTRA = # Defined in libgcc2.c, included only in the static library. # KAN: Excluded _sf_to_tf and _df_to_tf as TPBIT_FUNCS are not # built on any of our platforms. LIB2FUNCS_ST = _eprintf __gcc_bcmp FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \ _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \ _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \ _sf_to_df _thenan_sf _sf_to_usi _usi_to_sf DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \ _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \ _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \ _df_to_sf _thenan_df _df_to_usi _usi_to_df TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \ _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \ _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \ _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf # These might cause a divide overflow trap and so are compiled with # unwinder info. LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 #----------------------------------------------------------------------- # # Platform specific bits. # When upgrading GCC, get the following definitions from config//t-* # .if ${TARGET_CPUARCH} == "arm" # from config/arm/t-strongarm-elf CFLAGS+= -Dinhibit_libc -fno-inline CFLAGS.clang+= -fheinous-gnu-extensions LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func -.if ${MK_ARM_EABI} != "no" LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c # Some compilers generate __aeabi_ functions libgcc_s is missing DPADD+= ${LIBCOMPILER_RT} LDADD+= -lcompiler_rt -.else -LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c .endif -.endif .if ${TARGET_CPUARCH} == mips LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c # ABIs other than o32 need this .if ${TARGET_ARCH} != "mips" && ${TARGET_ARCH} != "mipsel" LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c LIB2FUNCS_EXTRA+= fixdfdi.c fixunssfsi.c .endif .endif .if ${TARGET_ARCH} == "powerpc" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm LIB2FUNCS_STATIC_EXTRA = eabi.asm .endif .if ${TARGET_ARCH} == "powerpc64" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm .endif .if ${TARGET_CPUARCH} == "sparc64" # from config/sparc/t-elf LIB1ASMSRC = lb1spc.asm LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 .endif #----------------------------------------------------------------------- # Remove any objects from LIB2FUNCS and LIB2_DIVMOD_FUNCS that are # defined as optimized assembly code in LIB1ASMFUNCS. .if defined(LIB1ASMFUNCS) .for sym in ${LIB1ASMFUNCS} LIB2FUNCS:= ${LIB2FUNCS:S/${sym}//g} LIB2_DIVMOD_FUNCS:= ${LIB2_DIVMOD_FUNCS:S/${sym}//g} .endfor .endif COMMONHDRS= tm.h tconfig.h options.h unwind.h gthr-default.h #----------------------------------------------------------------------- # # Helpful shortcuts for compiler invocations. # HIDE = -fvisibility=hidden -DHIDE_EXPORTS CC_T = ${CC} -c ${CFLAGS} ${HIDE} -fPIC CC_P = ${CC} -c ${CFLAGS} ${HIDE} -p -fPIC CC_S = ${CC} -c ${CFLAGS} ${PICFLAG} -DSHARED #----------------------------------------------------------------------- # # Functions from libgcc2.c # STD_CFLAGS = DIV_CFLAGS = -fexceptions -fnon-call-exceptions STD_FUNCS = ${LIB2FUNCS} DIV_FUNCS = ${LIB2_DIVMOD_FUNCS} STD_CFILE = libgcc2.c DIV_CFILE = libgcc2.c OBJ_GRPS = STD DIV #----------------------------------------------------------------------- # # Floating point emulation functions # .if ${TARGET_CPUARCH} == "armNOT_YET" || \ ${TARGET_CPUARCH} == "powerpc" || ${TARGET_CPUARCH} == "sparc64" FPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES -DFLOAT DPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES FPBIT_CFILE = config/fp-bit.c DPBIT_CFILE = config/fp-bit.c OBJ_GRPS += FPBIT DPBIT .endif #----------------------------------------------------------------------- # # Generic build rules for object groups defined above # .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/} OBJS += ${${T}_FUNCS:S/$/.o/} ${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS} ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} ${${T}_OBJS_P}: ${${T}_CFILE} ${COMMONHDRS} ${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHDRS} ${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} .endfor #----------------------------------------------------------------------- # # Extra objects coming from separate files # .if !empty(LIB2ADD) OBJS += ${LIB2ADD:R:S/$/.o/} SOBJS += ${LIB2ADD:R:S/$/.So/} POBJS += ${LIB2ADD:R:S/$/.po/} .endif #----------------------------------------------------------------------- # # Objects that should be in static library only. # SYMS_ST = ${LIB2FUNCS_ST} ${LIB2ADD_ST} STAT_OBJS_T = ${SYMS_ST:S/$/.o/} STAT_OBJS_P = ${SYMS_ST:S/$/.po/} STATICOBJS = ${SYMS_ST:S/$/.o/} ${STAT_OBJS_T}: ${STD_CFILE} ${COMMONHDRS} ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} ${STAT_OBJS_P}: ${STD_CFILE} ${COMMONHDRS} ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} #----------------------------------------------------------------------- # # Assembler files. # .if defined(LIB1ASMSRC) ASM_T = ${LIB1ASMFUNCS:S/$/.o/} ASM_P = ${LIB1ASMFUNCS:S/$/.po/} ASM_S = ${LIB1ASMFUNCS:S/$/.So/} ASM_V = ${LIB1ASMFUNCS:S/$/.vis/} OBJS += ${LIB1ASMFUNCS:S/$/.o/} ${ASM_T}: ${LIB1ASMSRC} ${.PREFIX}.vis ${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \ -o ${.TARGET} -include ${.PREFIX}.vis ${.ALLSRC:N*.h:N*.vis} ${ASM_P}: ${LIB1ASMSRC} ${.PREFIX}.vis ${CC} -x assembler-with-cpp -p -c ${CFLAGS} -DL${.PREFIX} \ -o ${.TARGET} -include ${.PREFIX}.vis ${.ALLSRC:N*.h:N*.vis} ${ASM_S}: ${LIB1ASMSRC} ${CC} -x assembler-with-cpp -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} \ -o ${.TARGET} ${.ALLSRC:N*.h} ${ASM_V}: ${LIB1ASMSRC} ${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \ -o ${.PREFIX}.vo ${.ALLSRC:N*.h} ( ${NM} -pg ${.PREFIX}.vo | \ awk 'NF == 3 && $$2 !~ /^[UN]$$/ { print "\t.hidden ", $$3 }'\ ) > ${.TARGET} CLEANFILES += ${ASM_V} ${ASM_V:R:S/$/.vo/} .endif #----------------------------------------------------------------------- # # Exception handling / unwinding support. # EH_OBJS_T = ${LIB2ADDEHSTATIC:R:S/$/.o/} EH_OBJS_P = ${LIB2ADDEHSTATIC:R:S/$/.po/} EH_OBJS_S = ${LIB2ADDEHSHARED:R:S/$/.So/} EH_CFLAGS = -fexceptions -D__GLIBC__=3 -DElfW=__ElfN SOBJS += ${EH_OBJS_S} .for _src in ${LIB2ADDEHSTATIC} ${_src:R:S/$/.o/}: ${_src} ${COMMONHDRS} ${CC_T} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC} ${_src:R:S/$/.po/}: ${_src} ${COMMONHDRS} ${CC_P} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC} .endfor .for _src in ${LIB2ADDEHSHARED} ${_src:R:S/$/.So/}: ${_src} ${COMMONHDRS} ${CC_S} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC} .endfor #----------------------------------------------------------------------- # # Generated headers # ${COMMONHDRS}: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile (cd ${.CURDIR}; ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}) CLEANFILES += ${COMMONHDRS} CLEANFILES += cs-*.h option* #----------------------------------------------------------------------- # # Build symbol version map # SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk SHLIB_MKMAP_OPTS = SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" SHLIB_MAPFILES += ${GCCDIR}/config/arm/libgcc-bpabi.ver .endif VERSION_MAP = libgcc.map libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ${OBJS:R:S/$/.So/} ( ${NM} -pg ${SOBJS};echo %% ; \ cat ${SHLIB_MAPFILES} \ | sed -e '/^[ ]*#/d' \ -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' \ | ${CC} ${CFLAGS} -E -xassembler-with-cpp -; \ ) | awk -f ${SHLIB_MKMAP} ${SHLIB_MKMAP_OPTS} > ${.TARGET} CLEANFILES += libgcc.map #----------------------------------------------------------------------- # # Build additional static libgcc_eh[_p].a libraries. # libgcc_eh.a: ${EH_OBJS_T} @${ECHO} building static gcc_eh library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q` ${RANLIB} ${RANLIBFLAGS} ${.TARGET} all: libgcc_eh.a .if ${MK_PROFILE} != "no" libgcc_eh_p.a: ${EH_OBJS_P} @${ECHO} building profiled gcc_eh library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q` ${RANLIB} ${RANLIBFLAGS} ${.TARGET} all: libgcc_eh_p.a .endif _libinstall: _lib-eh-install _lib-eh-install: .if ${MK_INSTALLLIB} != "no" ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} libgcc_eh.a ${DESTDIR}${LIBDIR} .endif .if ${MK_PROFILE} != "no" ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} libgcc_eh_p.a ${DESTDIR}${LIBDIR} .endif CLEANFILES+= libgcc_eh.a libgcc_eh_p.a ${EH_OBJS_T} ${EH_OBJS_P} .include .SUFFIXES: .vis .vo Index: head/gnu/lib/libgcov/Makefile =================================================================== --- head/gnu/lib/libgcov/Makefile (revision 272349) +++ head/gnu/lib/libgcov/Makefile (revision 272350) @@ -1,66 +1,66 @@ # $FreeBSD$ MK_PROFILE= no MK_SSP= no .include .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs .PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR} LIB= gcov CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \ -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif # # Library members defined in libgcov.c. # Defined in libgcov.c, included only in gcov library SYMS = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \ _gcov_fork _gcov_execl _gcov_execlp _gcov_execle \ _gcov_execv _gcov_execvp _gcov_execve \ _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler OBJS= ${SYMS:S/$/.o/} OBJS_T= ${SYMS:S/$/.o/} OBJS_P= ${SYMS:S/$/.po/} OBJS_S= ${SYMS:S/$/.So/} #----------------------------------------------------------------------- # # Helpful shortcuts for compiler invocations. # CC_T = ${CC} -c ${CFLAGS} -fPIC CC_P = ${CC} -c ${CFLAGS} -p -fPIC CC_S = ${CC} -c ${CFLAGS} ${PICFLAG} -DSHARED COMMONHDRS= tm.h tconfig.h gcov-iov.h options.h CLEANFILES+= ${COMMONHDRS} cs-tm.h cs-tconfig.h options.h optionlist ${COMMONHDRS}: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile (cd ${.CURDIR}; ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}) ${OBJS} beforedepend: ${COMMONHDRS} ${OBJS_T}: libgcov.c ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} .if !defined(NO_PIC) ${OBJS_S}: libgcov.c ${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} .endif .if ${MK_PROFILE} != "no" ${OBJS_P}: libgcov.c ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} .endif .include Index: head/gnu/lib/libstdc++/Makefile =================================================================== --- head/gnu/lib/libstdc++/Makefile (revision 272349) +++ head/gnu/lib/libstdc++/Makefile (revision 272350) @@ -1,640 +1,637 @@ # $FreeBSD$ .include GCCVER= 4.2 GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs SRCDIR= ${.CURDIR}/../../../contrib/libstdc++ SUPDIR= ${SRCDIR}/libsupc++ .PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io \ ${SRCDIR}/config/locale/darwin ${SRCDIR}/config/locale/generic \ ${SRCDIR}/include ${SUPDIR} ${GCCDIR} ${GCCLIB}/libiberty LIB= stdc++ SHLIB_MAJOR= 6 CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no" -CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 -.endif CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} DPADD= ${LIBM} LDADD= -lm -Wl,-f,libsupc++.so.1 # libstdc++ sources SRCS+= bitmap_allocator.cc pool_allocator.cc \ mt_allocator.cc codecvt.cc compatibility.cc complex_io.cc \ ctype.cc debug.cc debug_list.cc functexcept.cc globals_io.cc \ ios.cc ios_failure.cc ios_init.cc ios_locale.cc limits.cc \ list.cc locale.cc locale_init.cc locale_facets.cc \ localename.cc stdexcept.cc strstream.cc tree.cc \ allocator-inst.cc concept-inst.cc fstream-inst.cc ext-inst.cc \ ios-inst.cc iostream-inst.cc istream-inst.cc istream.cc \ locale-inst.cc misc-inst.cc ostream-inst.cc sstream-inst.cc \ streambuf-inst.cc streambuf.cc string-inst.cc valarray-inst.cc \ wlocale-inst.cc wstring-inst.cc atomicity.cc \ codecvt_members.cc collate_members.cc ctype_members.cc \ messages_members.cc monetary_members.cc numeric_members.cc \ time_members.cc basic_file_stdio.cc c_locale.cc \ # compatibility-ldbl.cc # target sources SRCS+= atomicity.cc codecvt_members.cc collate_members.cc ctype_members.cc \ messages_members.cc monetary_members.cc numeric_members.cc \ time_members.cc # target sources extra SRCS+= basic_file_stdio.cc c_locale.cc # C parts of math SRCS+= stubs.c # Embedded copy of libsupc++ SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \ eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \ eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc \ eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc new_op.cc \ new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc \ vec.cc vterminate.cc # from libiberty: SRCS+= cp-demangle.c # MD headers location .if ${MACHINE_CPUARCH} == "sparc64" MARCHDIR= sparc .elif ${MACHINE_CPUARCH} == "i386" && ${MACHINE_CPU} != 'i386' MARCHDIR= i486 .elif ${MACHINE_CPUARCH} == "amd64" MARCHDIR= i486 .else MARCHDIR= ${MACHINE_CPUARCH} .endif .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h) ATOMICITY_H= ${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h .else ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_mutex/atomicity.h .endif .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" .if exists(${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h) ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h .endif .endif atomicity.cc: ${ATOMICITY_H} ln -sf ${.ALLSRC} ${.TARGET} CLEANFILES+= atomicity.cc INCSGROUPS= BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \ TARGETHDRS THRHDRS DEBUGHDRS TR1HDRS PBHDRS0 PBHDRS1 CXXINCLUDEDIR= ${INCLUDEDIR}/c++/${GCCVER} STDHDRS= std_algorithm.h std_bitset.h std_complex.h std_deque.h \ std_fstream.h std_functional.h std_iomanip.h std_ios.h \ std_iosfwd.h std_iostream.h std_istream.h std_iterator.h \ std_limits.h std_list.h std_locale.h std_map.h std_memory.h \ std_numeric.h std_ostream.h std_queue.h std_set.h \ std_sstream.h std_stack.h std_stdexcept.h std_streambuf.h \ std_string.h std_utility.h std_valarray.h std_vector.h .for h in ${STDHDRS} STDHDRSNAME_$h=${h:R:S;^std_;;} .endfor STDHDRS:= ${STDHDRS:S;^;${SRCDIR}/include/std/;} STDHDRSDIR= ${CXXINCLUDEDIR} BITSHDRS= allocator.h basic_ios.h basic_ios.tcc basic_string.h \ basic_string.tcc boost_concept_check.h char_traits.h codecvt.h \ concept_check.h cpp_type_traits.h deque.tcc fstream.tcc \ functexcept.h gslice.h gslice_array.h indirect_array.h \ ios_base.h istream.tcc list.tcc locale_classes.h \ locale_facets.h locale_facets.tcc localefwd.h mask_array.h \ ostream.tcc ostream_insert.h postypes.h stream_iterator.h \ streambuf_iterator.h slice_array.h sstream.tcc stl_algo.h \ stl_algobase.h stl_bvector.h stl_construct.h stl_deque.h \ stl_function.h stl_heap.h stl_iterator.h \ stl_iterator_base_funcs.h stl_iterator_base_types.h stl_list.h \ stl_map.h stl_multimap.h stl_multiset.h stl_numeric.h \ stl_pair.h stl_queue.h stl_raw_storage_iter.h stl_relops.h \ stl_set.h stl_stack.h stl_tempbuf.h stl_tree.h \ stl_uninitialized.h stl_vector.h streambuf.tcc stringfwd.h \ valarray_array.h valarray_array.tcc valarray_before.h \ valarray_after.h vector.tcc BITSHDRS:= ${BITSHDRS:S;^;${SRCDIR}/include/bits/;} BITSHDRSDIR= ${CXXINCLUDEDIR}/bits BKWHDRS= complex.h iomanip.h istream.h ostream.h stream.h streambuf.h \ algo.h algobase.h alloc.h bvector.h defalloc.h deque.h \ function.h hash_map.h hash_set.h hashtable.h heap.h iostream.h \ iterator.h list.h map.h multimap.h new.h multiset.h pair.h \ queue.h rope.h set.h slist.h stack.h tempbuf.h tree.h \ vector.h fstream.h strstream backward_warning.h BKWHDRS:= ${BKWHDRS:S;^;${SRCDIR}/include/backward/;} BKWHDRSDIR= ${CXXINCLUDEDIR}/backward EXTHDRS= algorithm atomicity.h array_allocator.h bitmap_allocator.h \ codecvt_specializations.h concurrence.h debug_allocator.h \ stdio_filebuf.h stdio_sync_filebuf.h functional \ hash_map hash_set hash_fun.h hashtable.h iterator \ malloc_allocator.h memory mt_allocator.h new_allocator.h \ numeric numeric_traits.h pod_char_traits.h pool_allocator.h \ rb_tree rope ropeimpl.h slist throw_allocator.h typelist.h \ type_traits.h rc_string_base.h sso_string_base.h vstring.h \ vstring.tcc vstring_fwd.h vstring_util.h EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;} EXTHDRSDIR= ${CXXINCLUDEDIR}/ext TR1HDRS= array bind_repeat.h bind_iterate.h boost_shared_ptr.h cctype \ cfenv cfloat cinttypes climits cmath common.h complex cstdarg \ cstdbool cstdint cstdio cstdlib ctgmath ctime ctype.h cwchar \ cwctype fenv.h float.h functional functional_hash.h \ functional_iterate.h hashtable hashtable_policy.h inttypes.h \ limits.h math.h memory mu_iterate.h random random.tcc \ ref_fwd.h ref_wrap_iterate.h repeat.h stdarg.h stdbool.h \ stdint.h stdio.h stdlib.h tgmath.h tuple tuple_defs.h \ tuple_iterate.h type_traits type_traits_fwd.h unordered_set \ unordered_map utility wchar.h wctype.h TR1HDRS:= ${TR1HDRS:S;^;${SRCDIR}/include/tr1/;} TR1HDRSDIR= ${CXXINCLUDEDIR}/tr1 # This is the common subset of files that all three "C" header models use. BASEHDRS= std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h \ std_ciso646.h std_climits.h std_clocale.h std_cmath.h \ std_csetjmp.h std_csignal.h std_cstdarg.h std_cstddef.h \ std_cstdio.h std_cstdlib.h std_cstring.h std_ctime.h \ std_cwchar.h std_cwctype.h .for h in ${BASEHDRS} BASEHDRSNAME_$h=${h:R:S;^std_;;} .endfor BASEHDRS:= ${BASEHDRS:S;^;${SRCDIR}/include/c_std/;} BASEHDRSDIR= ${CXXINCLUDEDIR} # Some of the different "C" header models need extra files. BASEXHDRS= ${SRCDIR}/include/c_std/cmath.tcc BASEXHDRSDIR= ${CXXINCLUDEDIR}/bits DEBUGHDRS= bitset debug.h deque formatter.h functions.h hash_map \ hash_map.h hash_multimap.h hash_multiset.h hash_set hash_set.h \ list macros.h map map.h multimap.h multiset.h safe_base.h \ safe_iterator.h safe_iterator.tcc safe_sequence.h set set.h \ string vector DEBUGHDRS:= ${DEBUGHDRS:S;^;${SRCDIR}/include/debug/;} DEBUGHDRSDIR= ${CXXINCLUDEDIR}/debug # Not installed, but kept here for completeness COMPATHDRS= assert.h ctype.h errno.h float.h iso646.h limits.h locale.h \ math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h \ string.h time.h wchar.h wctype.h COMPATHDRS:= ${COMPATHDRS:S;^;${SRCDIR}/include/debug/;} COMPATHDRSDIR= ${CXXINCLUDEDIR}/c_compatibility PBHDRS0 = \ assoc_container.hpp \ exception.hpp \ hash_policy.hpp \ list_update_policy.hpp \ priority_queue.hpp \ tag_and_trait.hpp \ tree_policy.hpp \ trie_policy.hpp PBHDRS0:= ${PBHDRS0:S;^;${SRCDIR}/include/ext/pb_ds/;} PBHDRS0DIR= ${CXXINCLUDEDIR}/ext/pb_ds PBHDRS1 = \ basic_types.hpp \ cond_dealtor.hpp \ constructors_destructor_fn_imps.hpp \ container_base_dispatch.hpp \ map_debug_base.hpp \ priority_queue_base_dispatch.hpp \ standard_policies.hpp \ tree_trace_base.hpp \ type_utils.hpp \ types_traits.hpp PBHDRS1:= ${PBHDRS1:S;^;${SRCDIR}/include/ext/pb_ds/detail/;} PBHDRS1DIR= ${CXXINCLUDEDIR}/ext/pb_ds/detail PBHDRS+= \ basic_tree_policy/basic_tree_policy_base.hpp \ basic_tree_policy/null_node_metadata.hpp \ basic_tree_policy/traits.hpp \ basic_types.hpp \ binary_heap_/binary_heap_.hpp \ binary_heap_/const_iterator.hpp \ binary_heap_/const_point_iterator.hpp \ binary_heap_/constructors_destructor_fn_imps.hpp \ binary_heap_/debug_fn_imps.hpp \ binary_heap_/entry_cmp.hpp \ binary_heap_/entry_pred.hpp \ binary_heap_/erase_fn_imps.hpp \ binary_heap_/find_fn_imps.hpp \ binary_heap_/info_fn_imps.hpp \ binary_heap_/insert_fn_imps.hpp \ binary_heap_/iterators_fn_imps.hpp \ binary_heap_/policy_access_fn_imps.hpp \ binary_heap_/resize_policy.hpp \ binary_heap_/split_join_fn_imps.hpp \ binary_heap_/trace_fn_imps.hpp \ binomial_heap_base_/binomial_heap_base_.hpp \ binomial_heap_base_/constructors_destructor_fn_imps.hpp \ binomial_heap_base_/debug_fn_imps.hpp \ binomial_heap_base_/erase_fn_imps.hpp \ binomial_heap_base_/find_fn_imps.hpp \ binomial_heap_base_/insert_fn_imps.hpp \ binomial_heap_base_/split_join_fn_imps.hpp \ binomial_heap_/binomial_heap_.hpp \ binomial_heap_/constructors_destructor_fn_imps.hpp \ binomial_heap_/debug_fn_imps.hpp \ bin_search_tree_/bin_search_tree_.hpp \ bin_search_tree_/cond_dtor_entry_dealtor.hpp \ bin_search_tree_/cond_key_dtor_entry_dealtor.hpp PBHDRS+= \ bin_search_tree_/constructors_destructor_fn_imps.hpp \ bin_search_tree_/debug_fn_imps.hpp \ bin_search_tree_/erase_fn_imps.hpp \ bin_search_tree_/find_fn_imps.hpp \ bin_search_tree_/info_fn_imps.hpp \ bin_search_tree_/insert_fn_imps.hpp \ bin_search_tree_/iterators_fn_imps.hpp \ bin_search_tree_/node_iterators.hpp \ bin_search_tree_/point_iterators.hpp \ bin_search_tree_/policy_access_fn_imps.hpp \ bin_search_tree_/r_erase_fn_imps.hpp \ bin_search_tree_/rotate_fn_imps.hpp \ bin_search_tree_/split_join_fn_imps.hpp \ bin_search_tree_/traits.hpp \ cc_hash_table_map_/cc_ht_map_.hpp \ cc_hash_table_map_/cmp_fn_imps.hpp \ cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp \ cc_hash_table_map_/constructor_destructor_fn_imps.hpp \ cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp \ cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp \ cc_hash_table_map_/debug_fn_imps.hpp \ cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp \ cc_hash_table_map_/debug_store_hash_fn_imps.hpp \ cc_hash_table_map_/entry_list_fn_imps.hpp \ cc_hash_table_map_/erase_fn_imps.hpp \ cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp \ cc_hash_table_map_/erase_store_hash_fn_imps.hpp \ cc_hash_table_map_/find_fn_imps.hpp \ cc_hash_table_map_/find_store_hash_fn_imps.hpp \ cc_hash_table_map_/info_fn_imps.hpp \ cc_hash_table_map_/insert_fn_imps.hpp \ cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp \ cc_hash_table_map_/insert_store_hash_fn_imps.hpp \ cc_hash_table_map_/iterators_fn_imps.hpp \ cc_hash_table_map_/policy_access_fn_imps.hpp \ cc_hash_table_map_/resize_fn_imps.hpp \ cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp \ cc_hash_table_map_/resize_store_hash_fn_imps.hpp \ cc_hash_table_map_/size_fn_imps.hpp \ cc_hash_table_map_/standard_policies.hpp PBHDRS+= \ cc_hash_table_map_/trace_fn_imps.hpp \ cond_dealtor.hpp \ constructors_destructor_fn_imps.hpp \ container_base_dispatch.hpp \ eq_fn/eq_by_less.hpp \ eq_fn/hash_eq_fn.hpp \ gp_hash_table_map_/constructor_destructor_fn_imps.hpp \ gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp \ gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp \ gp_hash_table_map_/debug_fn_imps.hpp \ gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp \ gp_hash_table_map_/debug_store_hash_fn_imps.hpp \ gp_hash_table_map_/erase_fn_imps.hpp \ gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp \ gp_hash_table_map_/erase_store_hash_fn_imps.hpp \ gp_hash_table_map_/find_fn_imps.hpp \ gp_hash_table_map_/find_no_store_hash_fn_imps.hpp \ gp_hash_table_map_/find_store_hash_fn_imps.hpp \ gp_hash_table_map_/gp_ht_map_.hpp \ gp_hash_table_map_/info_fn_imps.hpp \ gp_hash_table_map_/insert_fn_imps.hpp \ gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp \ gp_hash_table_map_/insert_store_hash_fn_imps.hpp \ gp_hash_table_map_/iterator_fn_imps.hpp \ gp_hash_table_map_/policy_access_fn_imps.hpp \ gp_hash_table_map_/resize_fn_imps.hpp \ gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp \ gp_hash_table_map_/resize_store_hash_fn_imps.hpp \ gp_hash_table_map_/standard_policies.hpp \ gp_hash_table_map_/trace_fn_imps.hpp \ hash_fn/direct_mask_range_hashing_imp.hpp \ hash_fn/direct_mod_range_hashing_imp.hpp \ hash_fn/linear_probe_fn_imp.hpp \ hash_fn/mask_based_range_hashing.hpp \ hash_fn/mod_based_range_hashing.hpp \ hash_fn/probe_fn_base.hpp \ hash_fn/quadratic_probe_fn_imp.hpp \ hash_fn/ranged_hash_fn.hpp \ hash_fn/ranged_probe_fn.hpp PBHDRS+= \ hash_fn/sample_probe_fn.hpp \ hash_fn/sample_ranged_hash_fn.hpp \ hash_fn/sample_ranged_probe_fn.hpp \ hash_fn/sample_range_hashing.hpp \ left_child_next_sibling_heap_/const_iterator.hpp \ left_child_next_sibling_heap_/const_point_iterator.hpp \ left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp \ left_child_next_sibling_heap_/debug_fn_imps.hpp \ left_child_next_sibling_heap_/erase_fn_imps.hpp \ left_child_next_sibling_heap_/info_fn_imps.hpp \ left_child_next_sibling_heap_/insert_fn_imps.hpp \ left_child_next_sibling_heap_/iterators_fn_imps.hpp \ left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp \ left_child_next_sibling_heap_/node.hpp \ left_child_next_sibling_heap_/null_metadata.hpp \ left_child_next_sibling_heap_/policy_access_fn_imps.hpp \ left_child_next_sibling_heap_/trace_fn_imps.hpp \ list_update_map_/constructor_destructor_fn_imps.hpp \ list_update_map_/debug_fn_imps.hpp \ list_update_map_/entry_metadata_base.hpp \ list_update_map_/erase_fn_imps.hpp \ list_update_map_/find_fn_imps.hpp \ list_update_map_/info_fn_imps.hpp \ list_update_map_/insert_fn_imps.hpp \ list_update_map_/iterators_fn_imps.hpp \ list_update_map_/lu_map_.hpp \ list_update_map_/trace_fn_imps.hpp \ list_update_policy/counter_lu_metadata.hpp \ list_update_policy/counter_lu_policy_imp.hpp \ list_update_policy/mtf_lu_policy_imp.hpp \ list_update_policy/sample_update_policy.hpp \ map_debug_base.hpp \ ov_tree_map_/cond_dtor.hpp \ ov_tree_map_/constructors_destructor_fn_imps.hpp \ ov_tree_map_/debug_fn_imps.hpp \ ov_tree_map_/erase_fn_imps.hpp \ ov_tree_map_/info_fn_imps.hpp \ ov_tree_map_/insert_fn_imps.hpp \ ov_tree_map_/iterators_fn_imps.hpp \ ov_tree_map_/node_iterators.hpp \ ov_tree_map_/ov_tree_map_.hpp PBHDRS+= \ ov_tree_map_/policy_access_fn_imps.hpp \ ov_tree_map_/split_join_fn_imps.hpp \ ov_tree_map_/traits.hpp \ pairing_heap_/constructors_destructor_fn_imps.hpp \ pairing_heap_/debug_fn_imps.hpp \ pairing_heap_/erase_fn_imps.hpp \ pairing_heap_/find_fn_imps.hpp \ pairing_heap_/insert_fn_imps.hpp \ pairing_heap_/pairing_heap_.hpp \ pairing_heap_/split_join_fn_imps.hpp \ pat_trie_/child_iterator.hpp \ pat_trie_/cond_dtor_entry_dealtor.hpp \ pat_trie_/const_child_iterator.hpp \ pat_trie_/constructors_destructor_fn_imps.hpp \ pat_trie_/debug_fn_imps.hpp \ pat_trie_/erase_fn_imps.hpp \ pat_trie_/find_fn_imps.hpp \ pat_trie_/head.hpp \ pat_trie_/info_fn_imps.hpp \ pat_trie_/insert_join_fn_imps.hpp \ pat_trie_/internal_node.hpp \ pat_trie_/iterators_fn_imps.hpp \ pat_trie_/leaf.hpp \ pat_trie_/node_base.hpp \ pat_trie_/node_iterators.hpp \ pat_trie_/node_metadata_base.hpp \ pat_trie_/pat_trie_.hpp \ pat_trie_/point_iterators.hpp \ pat_trie_/policy_access_fn_imps.hpp \ pat_trie_/r_erase_fn_imps.hpp \ pat_trie_/rotate_fn_imps.hpp \ pat_trie_/split_fn_imps.hpp \ pat_trie_/split_join_branch_bag.hpp \ pat_trie_/synth_e_access_traits.hpp \ pat_trie_/trace_fn_imps.hpp \ pat_trie_/traits.hpp \ pat_trie_/update_fn_imps.hpp \ priority_queue_base_dispatch.hpp \ rb_tree_map_/constructors_destructor_fn_imps.hpp \ rb_tree_map_/debug_fn_imps.hpp PBHDRS+= \ rb_tree_map_/erase_fn_imps.hpp \ rb_tree_map_/find_fn_imps.hpp \ rb_tree_map_/info_fn_imps.hpp \ rb_tree_map_/insert_fn_imps.hpp \ rb_tree_map_/node.hpp \ rb_tree_map_/rb_tree_.hpp \ rb_tree_map_/split_join_fn_imps.hpp \ rb_tree_map_/traits.hpp \ rc_binomial_heap_/constructors_destructor_fn_imps.hpp \ rc_binomial_heap_/debug_fn_imps.hpp \ rc_binomial_heap_/erase_fn_imps.hpp \ rc_binomial_heap_/insert_fn_imps.hpp \ rc_binomial_heap_/rc_binomial_heap_.hpp \ rc_binomial_heap_/rc.hpp \ rc_binomial_heap_/split_join_fn_imps.hpp \ rc_binomial_heap_/trace_fn_imps.hpp \ resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp \ resize_policy/hash_exponential_size_policy_imp.hpp \ resize_policy/hash_load_check_resize_trigger_imp.hpp \ resize_policy/hash_load_check_resize_trigger_size_base.hpp \ resize_policy/hash_prime_size_policy_imp.hpp \ resize_policy/hash_standard_resize_policy_imp.hpp \ resize_policy/sample_resize_policy.hpp \ resize_policy/sample_resize_trigger.hpp \ resize_policy/sample_size_policy.hpp \ splay_tree_/constructors_destructor_fn_imps.hpp \ splay_tree_/debug_fn_imps.hpp \ splay_tree_/erase_fn_imps.hpp \ splay_tree_/find_fn_imps.hpp \ splay_tree_/info_fn_imps.hpp \ splay_tree_/insert_fn_imps.hpp \ splay_tree_/node.hpp \ splay_tree_/splay_fn_imps.hpp \ splay_tree_/splay_tree_.hpp \ splay_tree_/split_join_fn_imps.hpp \ splay_tree_/traits.hpp \ standard_policies.hpp \ thin_heap_/constructors_destructor_fn_imps.hpp \ thin_heap_/debug_fn_imps.hpp \ thin_heap_/erase_fn_imps.hpp PBHDRS+= \ thin_heap_/find_fn_imps.hpp \ thin_heap_/insert_fn_imps.hpp \ thin_heap_/split_join_fn_imps.hpp \ thin_heap_/thin_heap_.hpp \ thin_heap_/trace_fn_imps.hpp \ tree_policy/node_metadata_selector.hpp \ tree_policy/null_node_update_imp.hpp \ tree_policy/order_statistics_imp.hpp \ tree_policy/sample_tree_node_update.hpp \ tree_trace_base.hpp \ trie_policy/node_metadata_selector.hpp \ trie_policy/null_node_update_imp.hpp \ trie_policy/order_statistics_imp.hpp \ trie_policy/prefix_search_node_update_imp.hpp \ trie_policy/sample_trie_e_access_traits.hpp \ trie_policy/sample_trie_node_update.hpp \ trie_policy/string_trie_e_access_traits_imp.hpp \ trie_policy/trie_policy_base.hpp \ types_traits.hpp \ type_utils.hpp \ unordered_iterator/const_iterator.hpp \ unordered_iterator/const_point_iterator.hpp \ unordered_iterator/iterator.hpp \ unordered_iterator/point_iterator.hpp PBHDRSDIRS= \ pairing_heap_ \ splay_tree_ \ list_update_map_ \ basic_tree_policy \ trie_policy \ gp_hash_table_map_ \ tree_policy \ binomial_heap_base_ \ resize_policy \ bin_search_tree_ \ binomial_heap_ \ thin_heap_ \ pat_trie_ \ cc_hash_table_map_ \ rc_binomial_heap_ \ left_child_next_sibling_heap_ \ unordered_iterator \ binary_heap_ \ ov_tree_map_ \ hash_fn \ eq_fn \ rb_tree_map_ \ list_update_policy .for D in ${PBHDRSDIRS} PHDRGRP$D:= ${PBHDRS:M$D/*:S;^;${SRCDIR}/include/ext/pb_ds/detail/;} PHDRGRP$DDIR= ${CXXINCLUDEDIR}/ext/pb_ds/detail/$D INCSGROUPS+= PHDRGRP$D .endfor TARGETHDRS= abi/compatibility.h \ allocator/new_allocator_base.h \ io/basic_file_stdio.h \ io/c_io_stdio.h \ locale/generic/c_locale.h \ locale/generic/c++locale_internal.h \ locale/generic/messages_members.h \ locale/generic/time_members.h \ os/bsd/freebsd/ctype_base.h \ os/bsd/freebsd/ctype_inline.h \ os/bsd/freebsd/ctype_noninline.h \ os/bsd/freebsd/os_defines.h TARGETHDRS:= ${TARGETHDRS:S;^;${SRCDIR}/config/;} TARGETHDRS+= c++config.h TARGETHDRSNAME_basic_file_stdio.h= basic_file.h TARGETHDRSNAME_c_io_stdio.h= c++io.h TARGETHDRSNAME_c_locale.h= c++locale.h TARGETHDRSNAME_new_allocator_base.h= c++allocator.h TARGETHDRSDIR= ${CXXINCLUDEDIR}/bits MARCHHDRS= atomic_word.h cpu_defines.h cxxabi_tweaks.h .for h in ${MARCHHDRS} .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h}) TARGETHDRS+= ${SRCDIR}/config/cpu/${MARCHDIR}/${h} .else TARGETHDRS+= ${SRCDIR}/config/cpu/generic/${h} .endif .endfor THRHDRS= gthr.h gthr-single.h gthr-posix.h gthr-tpf.h gthr-default.h THRHDRSDIR= ${CXXINCLUDEDIR}/bits uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_] gthr.h: ${GCCDIR}/gthr.h sed -e '/^#pragma/b' \ -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \ -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \ -e 's,^#include "\(.*\)",#include ,g' \ < ${.ALLSRC} > ${.TARGET} gthr-single.h: ${GCCDIR}/gthr-single.h sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ < ${.ALLSRC} > ${.TARGET} gthr-posix.h: ${GCCDIR}/gthr-posix.h sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \ -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \ < ${.ALLSRC} > ${.TARGET} gthr-tpf.h: ${GCCDIR}/gthr-posix.h sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \ -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \ < ${.ALLSRC} > ${.TARGET} gthr-default.h: ${GCCDIR}/gthr-posix.h sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \ -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \ -e 's,^#include "\(.*\)",#include ,g' \ < ${.ALLSRC} > ${.TARGET} CLEANFILES+= ${THRHDRS} -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h .endif unwind.h: ln -sf ${.ALLSRC} ${.TARGET} SRCS+= unwind.h CLEANFILES+= unwind.h DATESTAMP!= cat ${GCCDIR}/DATESTAMP c++config.h: ${.CURDIR}/config.h ${SRCDIR}/include/bits/c++config sed -e "s/\\(define __GLIBCXX__\\)/\1 ${DATESTAMP}/" \ -e 's/\(define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY\)/\1 1/' \ -e 's/\(define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION\)/\1 0/' \ < ${SRCDIR}/include/bits/c++config > ${.TARGET} && \ sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \ -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \ -e 's/VERSION/_GLIBCXX_VERSION/g' \ -e 's/WORDS_/_GLIBCXX_WORDS_/g' \ < ${.CURDIR}/config.h >> ${.TARGET} && \ echo "#endif // _CXXCONFIG_" >> ${.TARGET} CLEANFILES+= c++config.h # Symbol versioning. VERSION_MAP= libstdc++.map ${VERSION_MAP}: ${SRCDIR}/config/abi/pre/gnu.ver ln -sf ${.ALLSRC} ${.TARGET} CLEANFILES+= ${VERSION_MAP} CXXFLAGS.clang+= -stdlib=libstdc++ .include # Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} Index: head/gnu/lib/libsupc++/Makefile =================================================================== --- head/gnu/lib/libsupc++/Makefile (revision 272349) +++ head/gnu/lib/libsupc++/Makefile (revision 272350) @@ -1,59 +1,56 @@ # $FreeBSD$ .include GCCVER= 4.2 GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs SRCDIR= ${.CURDIR}/../../../contrib/libstdc++/libsupc++ .PATH: ${SRCDIR} ${GCCLIB}/libiberty LIB= supc++ SHLIB_MAJOR=1 SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \ eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \ eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc \ eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc new_op.cc \ new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc \ vec.cc vterminate.cc # from libiberty: SRCS+= cp-demangle.c CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no" -CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 -.endif CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h INCS= ${HDRS:S;^;${SRCDIR}/;} INCSDIR=${INCLUDEDIR}/c++/${GCCVER} -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h .endif unwind.h: ln -sf ${.ALLSRC} ${.TARGET} SRCS+= unwind.h CLEANFILES+= unwind.h # Symbol versioning VERSION_MAP= ${.CURDIR}/Version.map CXXFLAGS.clang+= -stdlib=libstdc++ .include # Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} Index: head/gnu/usr.bin/cc/Makefile.inc =================================================================== --- head/gnu/usr.bin/cc/Makefile.inc (revision 272349) +++ head/gnu/usr.bin/cc/Makefile.inc (revision 272350) @@ -1,111 +1,111 @@ # $FreeBSD$ .include .include "../Makefile.inc" # Sometimes this is .include'd several times... .if !defined(__CC_MAKEFILE_INC__) __CC_MAKEFILE_INC__= ${MFILE} GCCVER= 4.2 GCCDIR= ${.CURDIR}/../../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../../contrib/gcclibs .include "Makefile.tgt" # Machine description. MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md GCC_TARGET= ${TARGET_ARCH}-undermydesk-freebsd CFLAGS+= -DGCCVER=\"${GCCVER}\" CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" #CFLAGS+= -DWANT_COMPILER_INVARIANTS CSTD?= gnu89 .if ${TARGET_ARCH} != ${MACHINE_ARCH} CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE .endif -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif .if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END .endif .if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb" CFLAGS += -DFREEBSD_ARCH_armv6 .endif .if ${TARGET_CPUARCH} == "mips" .if ${TARGET_ARCH:Mmips*el} != "" CFLAGS += -DTARGET_ENDIAN_DEFAULT=0 .endif .if ${TARGET_ARCH:Mmips64*} != "" MIPS_ABI_DEFAULT=ABI_64 .elif ${TARGET_ARCH:Mmipsn32*} != "" MIPS_ABI_DEFAULT=ABI_N32 .else MIPS_ABI_DEFAULT=ABI_32 .endif CFLAGS += -DMIPS_ABI_DEFAULT=${MIPS_ABI_DEFAULT} # If we are compiling for the O32 ABI, we need to default to MIPS-III rather # than taking the ISA from the ABI requirements, since FreeBSD is built with # a number of MIPS-III features/instructions and that is the minimum ISA we # support, not the O32 default MIPS-I. .if ${MIPS_ABI_DEFAULT} == "ABI_32" TARGET_CPUTYPE?=mips3 .endif # GCC by default takes the ISA from the ABI's requirements. If world is built # with a superior ISA, since we lack multilib, we have to set the right # default ISA to be able to link against what's in /usr/lib. Terrible stuff. .if defined(TARGET_CPUTYPE) CFLAGS += -DMIPS_CPU_STRING_DEFAULT=\"${TARGET_CPUTYPE}\" .endif .endif .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE) CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE} .endif .if exists(${.OBJDIR}/../cc_tools) CFLAGS+= -I${.OBJDIR}/../cc_tools .endif CFLAGS+= -I${.CURDIR}/../cc_tools # This must go after the -I for cc_tools to resolve ambiguities for hash.h # correctly. CFLAGS+= -I${GCCDIR} -I${GCCDIR}/config CFLAGS+= -I${GCCLIB}/include CFLAGS+= -I${GCCLIB}/libcpp/include CFLAGS+= -I${GCCLIB}/libdecnumber .if exists(${.OBJDIR}/../cc_int) LIBBACKEND= ${.OBJDIR}/../cc_int/libbackend.a .else LIBBACKEND= ${.CURDIR}/../cc_int/libbackend.a .endif .if exists(${.OBJDIR}/../libiberty) LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a .else LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a .endif .if exists(${.OBJDIR}/../libcpp) LIBCPP= ${.OBJDIR}/../libcpp/libcpp.a .else LIBCPP= ${.CURDIR}/../libcpp/libcpp.a .endif .if exists(${.OBJDIR}/../libdecnumber) LIBDECNUMBER= ${.OBJDIR}/../libdecnumber/libdecnumber.a .else LIBDECNUMBER= ${.CURDIR}/../libdecnumber/libdecnumber.a .endif .endif # !__CC_MAKEFILE_INC__ Index: head/gnu/usr.bin/cc/cc_tools/Makefile =================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile (revision 272349) +++ head/gnu/usr.bin/cc/cc_tools/Makefile (revision 272350) @@ -1,555 +1,553 @@ # $FreeBSD$ .include CFLAGS+= -I. .include "../Makefile.inc" CFLAGS+= -g CFLAGS+= -DGENERATOR_FILE -DHAVE_CONFIG_H # Override LIBIBERTY set by Makefile.inc, We use our own for # build tools. LIBIBERTY= libiberty.a .PATH: ${GCCDIR} ${GCCLIB}/libiberty #----------------------------------------------------------------------- # Determine content of variables used by the target/host config files # # The list of headers to go into tm.h # TARGET_INC+= options.h .if ${TARGET_CPUARCH} == "amd64" TARGET_INC+= i386/biarch64.h .endif .if ${TARGET_CPUARCH} != "arm" TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h .endif .if ${TARGET_CPUARCH} == "i386" || ${TARGET_CPUARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/unix.h TARGET_INC+= ${GCC_CPU}/att.h .endif TARGET_INC+= dbxelf.h TARGET_INC+= elfos-undef.h TARGET_INC+= elfos.h TARGET_INC+= freebsd-native.h TARGET_INC+= freebsd-spec.h TARGET_INC+= freebsd.h .if ${TARGET_CPUARCH} != "i386" && ${TARGET_CPUARCH} != "amd64" . if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h) TARGET_INC+= ${GCC_CPU}/sysv4.h . endif .endif .if ${TARGET_CPUARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/x86-64.h .endif .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "mips" TARGET_INC+= ${GCC_CPU}/elf.h .endif .if ${TARGET_CPUARCH} == "arm" TARGET_INC+= ${GCC_CPU}/aout.h -.if ${MK_ARM_EABI} != "no" TARGET_INC+= ${GCC_CPU}/bpabi.h .endif -.endif .if ${TARGET_ARCH} == "powerpc64" TARGET_INC+= ${GCC_CPU}/biarch64.h TARGET_INC+= ${GCC_CPU}/default64.h .endif TARGET_INC+= ${GCC_CPU}/freebsd.h .if ${TARGET_CPUARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/freebsd64.h .endif .if ${TARGET_CPUARCH} == "arm" TARGET_INC+= ${GCC_CPU}/arm.h .endif TARGET_INC+= defaults.h .for H in ${TARGET_INC} .for D in ${GCCDIR}/config ${GCCDIR} ${.CURDIR} .if exists($D/$H) TARGET_INC_FILES+= $D/$H .endif .endfor .endfor # # gtyp includes. # srcdir= ${GCCDIR} CPPLIB_H= ${GCCLIB}/libcpp/include/line-map.h \ ${GCCLIB}/libcpp/include/cpplib.h SYMTAB_H= ${GCCLIB}/libcpp/include/symtab.h CPP_ID_DATA_H= ${CPPLIB_H} ${GCCLIB}/libcpp/include/cpp-id-data.h HASHTAB_H= ${GCCLIB}/include/hashtab.h SPLAY_TREE_H= ${GCCLIB}/include/splay-tree.h out_file= ${srcdir}/config/${GCC_CPU}/${GCC_CPU}.c tm_file_list= ${TARGET_INC_FILES} host_xm_file_list= ${.CURDIR}/auto-host.h ${GCCLIB}/include/ansidecl.h GTFILES_SRCDIR= ${srcdir} # Copied unchanged from gcc/Makefile.in GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \ $(CPP_ID_DATA_H) $(host_xm_file_list) \ $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \ $(srcdir)/coverage.c $(srcdir)/rtl.h \ $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/function.h $(srcdir)/libfuncs.h $(SYMTAB_H) \ $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \ $(srcdir)/ipa-reference.h $(srcdir)/output.h \ $(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \ $(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \ $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \ $(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c \ $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \ $(srcdir)/dojump.c $(srcdir)/tree-profile.c \ $(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \ $(srcdir)/function.c $(srcdir)/except.h \ $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \ $(srcdir)/profile.c $(srcdir)/regclass.c \ $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \ $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \ $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \ $(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \ $(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parser.c \ $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \ $(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \ $(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-propagate.c \ $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \ $(srcdir)/tree-chrec.h $(srcdir)/tree-vect-generic.c \ $(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \ $(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \ $(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \ $(srcdir)/tree-ssa-structalias.c \ $(srcdir)/c-pragma.h $(srcdir)/omp-low.c \ $(srcdir)/targhooks.c $(srcdir)/cgraphunit.c $(out_file) \ # The list of frontend directories to look into GTFILES_LANG_DIR_NAMES= .if ${MK_CXX} != "no" GTFILES_LANG_DIR_NAMES+= cp .endif # The list of language specific files for gengtype .for L in ${GTFILES_LANG_DIR_NAMES} c .if exists(${GCCDIR}/$L-config-lang.in) # Source the language config file L_GTFILES!= sh -c '. ${GCCDIR}/$L-config-lang.in; echo $$gtfiles' .else L_GTFILES!= sh -c '. ${GCCDIR}/$L/config-lang.in; echo $$gtfiles' .endif .for F in ${L_GTFILES} GTFILES_FILES+= $F GTFILES_LANGS+= $L .endfor .endfor GTFILES+= ${GTFILES_FILES} # # Tree definition files. # TREE_DEF_FILES= .if ${MK_CXX} != "no" TREE_DEF_FILES+= cp/cp-tree.def .endif # # Option files. # OPT_FILES= c.opt common.opt .if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt) OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt .endif .if exists(${.CURDIR}/${GCC_CPU}-freebsd.opt) OPT_FILES+= ${.CURDIR}/${GCC_CPU}-freebsd.opt .endif .if ${TARGET_CPUARCH} == "powerpc" OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/sysv4.opt .endif .if ${TARGET_CPUARCH} == "sparc64" OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/long-double-switch.opt .endif .if exists(${.CURDIR}/freebsd.opt) OPT_FILES+= ${.CURDIR}/freebsd.opt .endif #----------------------------------------------------------------------- # Build rules for header files and generator tools # Host config config.h: TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \ HEADERS="auto-host.h ansidecl.h" \ DEFINES="" \ /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET} GENSRCS+= config.h CLEANFILES+= cs-config.h # Build config bconfig.h: TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \ HEADERS="auto-host.h ansidecl.h" \ DEFINES="" \ /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET} .if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def) echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET} .endif GENSRCS+= bconfig.h CLEANFILES+= cs-bconfig.h # tconfig.h tconfig.h: TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \ HEADERS="auto-host.h ansidecl.h" \ DEFINES="USED_FOR_TARGET" \ /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET} GENSRCS+= tconfig.h CLEANFILES+= cs-tconfig.h # Options optionlist: ${OPT_FILES} LC_ALL=C awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.TARGET} options.h: optionlist LC_ALL=C awk -f ${GCCDIR}/opt-functions.awk \ -f ${GCCDIR}/opth-gen.awk \ < ${.ALLSRC} > ${.TARGET} options.c: optionlist LC_ALL=C awk -f ${GCCDIR}/opt-functions.awk \ -f ${GCCDIR}/optc-gen.awk \ -v header_name="config.h system.h coretypes.h tm.h" \ < ${.ALLSRC} > ${.TARGET} GENONLY+= optionlist options.h options.c # Target machine config tm.h: TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \ HEADERS="${TARGET_INC}" \ DEFINES="" \ /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET} .if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def) echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET} .endif GENSRCS+= tm.h CLEANFILES+= cs-tm.h # Target machine protos/preds. tm_p.h: TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \ HEADERS="${GCC_CPU}/${GCC_CPU}-protos.h tm-preds.h" \ DEFINES="" \ /bin/sh ${GCCDIR}/mkconfig.sh tm_p.h GENSRCS+= tm_p.h CLEANFILES+= cs-tm_p.h # gencheck gencheck.h: ${TREE_DEF_FILES} .for F in ${TREE_DEF_FILES} echo "#include \"$F\"" >> ${.TARGET} .endfor touch ${.TARGET} GENSRCS+= gencheck.h # Source header for gtyp generator. gtyp-gen.h: ${GTFILES} echo "/* This file is machine generated. Do not edit. */" > ${.TARGET} echo "static const char * const srcdir = " >> ${.TARGET} echo "\"$(GTFILES_SRCDIR)\";" >> ${.TARGET} echo "static const char * const lang_files[] = {" >> ${.TARGET} .for F in ${GTFILES_FILES} echo "\"$F\", " >> ${.TARGET} .endfor echo "NULL};" >> ${.TARGET} echo "static const char * const langs_for_lang_files[] = {">> ${.TARGET} .for F in ${GTFILES_LANGS} echo "\"$F\", " >> ${.TARGET} .endfor echo "NULL};" >> ${.TARGET} echo "static const char * const all_files[] = {" >> ${.TARGET} .for F in ${GTFILES} echo "\"$F\", " >> ${.TARGET} .endfor echo "NULL};" >> ${.TARGET} echo "static const char * const lang_dir_names[] = {" >> ${.TARGET} .for F in c ${GTFILES_LANG_DIR_NAMES} echo "\"$F\", " >> ${.TARGET} .endfor echo "NULL};" >> ${.TARGET} GENSRCS+= gtyp-gen.h # Version header for gcov gcov-iov.h: echo "#define GCOV_VERSION ((gcov_unsigned_t)0x34303270)" >> ${.TARGET} GENSRCS+= gcov-iov.h # Multilib config file multilib.h: .if ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH} == "amd64" echo 'static const char *const multilib_raw[] = { \ ". !m64 !m32;", \ "64:../lib m64 !m32;", \ "32:../lib32 !m64 m32;", NULL };' > ${.TARGET} echo 'static const char *multilib_options = "m64/m32";' >> ${.TARGET} echo 'static const char *const multilib_matches_raw[] = { \ "m64 m64;", "m32 m32;", NULL };' >> ${.TARGET} .else echo 'static const char *const multilib_raw[] = { \ ". ;", NULL };' > ${.TARGET} echo 'static const char *multilib_options = "";' >> ${.TARGET} echo 'static const char *const multilib_matches_raw[] = { \ NULL };' >> ${.TARGET} .endif echo 'static const char *multilib_extra = "";' >> ${.TARGET} echo 'static const char *const multilib_exclusions_raw[] = { \ NULL };' >> ${.TARGET} GENSRCS+= multilib.h configargs.h: echo 'static const char configuration_arguments[] =' > ${.TARGET} echo ' "FreeBSD/${TARGET_ARCH} system compiler";' >> ${.TARGET} echo 'static const char thread_model[] = "posix";' >> ${.TARGET} echo 'static const struct {' >> ${.TARGET} echo ' const char *name, *value;' >> ${.TARGET} echo '} configure_default_options[] = {' >> ${.TARGET} echo ' { "NULL", "NULL" } };' >> ${.TARGET} GENSRCS+= configargs.h # Language spec files specs.h: echo '#include "cp/lang-specs.h"' > ${.TARGET} GENSRCS+= specs.h gstdint.h: echo '#include "sys/types.h"' > ${.TARGET} echo '#include "sys/stdint.h"' >> ${.TARGET} GENSRCS+= gstdint.h # Linked headers gthr-default.h: ${GCCDIR}/gthr-posix.h ln -sf ${.ALLSRC} ${.TARGET} GENSRCS+= gthr-default.h -.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${TARGET_CPUARCH} == "arm" unwind.h: ${GCCDIR}/config/arm/unwind-arm.h .else unwind.h: ${GCCDIR}/unwind-generic.h .endif unwind.h: ln -sf ${.ALLSRC} ${.TARGET} GENSRCS+= unwind.h # # gtype gunk # gengtype-lex.c: gengtype-lex.l flex -ogengtype-lex.c ${.ALLSRC} gengtype-yacc.h: gengtype-yacc.y yacc -d -o gengtype-yacc.c ${.ALLSRC} gengtype-yacc.c: gengtype-yacc.h gengtype-yacc+%DIKED.c: gengtype-yacc.c cat ${.ALLSRC} > ${.TARGET} sed -e "s/xmalloc/malloc/g" \ -e "s/xrealloc/realloc/g" \ -e "s/malloc/xmalloc/g" \ -e "s/realloc/xrealloc/g" \ ${.ALLSRC} > ${.TARGET} GENSRCS+= gengtype-lex.c gengtype-yacc.h gengtype-yacc+%DIKED.c CLEANFILES+= gengtype-yacc.c gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o \ ${LIBIBERTY} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} gtype-desc.h: gengtype ./gengtype touch ${.TARGET} gtype-desc.c: gtype-desc.h GENONLY+= gtype-desc.c gtype-desc.h CLEANFILES+= gt-*.h gtype-*.h # # Generator tools. # .for F in check checksum genrtl modes gen$F: gen$F.o errors.o ${LIBIBERTY} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} .endfor .for F in attr attrtab automata codes conditions config constants emit \ extract flags opinit output peep preds recog gen$F: gen$F.o rtl.o read-rtl.o ggc-none.o vec.o min-insn-modes.o \ gensupport.o print-rtl.o errors.o ${LIBIBERTY} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm .endfor gencondmd: gencondmd.o ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} # # Generated .md files. # insn-conditions.md: gencondmd ./gencondmd > ${.TARGET} GENSRCS+= insn-conditions.md # # Generated header files. # .for F in constants insn-$F.h: gen$F ${MD_FILE} ./gen$F ${MD_FILE} > ${.TARGET} GENSRCS+= insn-$F.h .endfor .for F in attr codes config flags insn-$F.h: gen$F ${MD_FILE} insn-conditions.md ./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET} GENSRCS+= insn-$F.h .endfor # Header files with irregular names. genrtl.h: gengenrtl ./gengenrtl -h > ${.TARGET} GENSRCS+= genrtl.h tm-preds.h: genpreds ./genpreds -h ${MD_FILE} > ${.TARGET} GENSRCS+= tm-preds.h tm-constrs.h: genpreds ./genpreds -c ${MD_FILE} > ${.TARGET} GENSRCS+= tm-constrs.h tree-check.h: gencheck ./gencheck > ${.TARGET} GENSRCS+= tree-check.h insn-modes.h: genmodes ./genmodes -h > ${.TARGET} GENSRCS+= insn-modes.h # # Generated source files. # .for F in attrtab automata emit extract opinit output peep preds recog insn-$F.c: gen$F ${MD_FILE} insn-conditions.md ./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET} GENONLY+= insn-$F.c .endfor .for F in conditions insn-$F.c: gen$F ${MD_FILE} ./gen$F ${MD_FILE} > ${.TARGET} GENSRCS+= insn-$F.c .endfor # Source files with irregular names. insn-modes.c: genmodes ./genmodes > ${.TARGET} GENONLY+= insn-modes.c min-insn-modes.c: genmodes ./genmodes -m > ${.TARGET} GENSRCS+= min-insn-modes.c genrtl.c: gengenrtl ./gengenrtl > ${.TARGET} GENONLY+= genrtl.c gencondmd.c: genconditions ${MD_FILE} ./genconditions ${MD_FILE} > ${.TARGET} GENSRCS+= gencondmd.c #----------------------------------------------------------------------- # Build tools. GNTOOLS+= genattr genattrtab genautomata gencodes gencheck genchecksum \ genconditions gencondmd genconfig genconstants genemit \ genextract genflags gengenrtl gengtype genmodes genopinit \ genoutput genpeep genpreds genrecog all: ${GNTOOLS} ${GENSRCS} ${GENONLY} beforedepend: ${GENONLY} # #----------------------------------------------------------------------- # Build 'pocket' libiberty exclusively for build tools use. LIBIBERTY_SRCS= choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \ dyn-string.c fibheap.c fopen_unlocked.c getpwd.c getruntime.c \ hashtab.c hex.c lbasename.c make-temp-file.c md5.c obstack.c \ partition.c pex-unix.c physmem.c safe-ctype.c splay-tree.c xexit.c \ xmalloc.c xmemdup.c xstrdup.c xstrerror.c LIBIBERTY_OBJS= ${LIBIBERTY_SRCS:R:S/$/.o/g} .for _src in ${LIBIBERTY_SRCS} ${_src:R:S/$/.o/}: ${_src} ${CC} -c -I ${.CURDIR}/../libiberty ${CFLAGS} -o ${.TARGET} ${.IMPSRC} .endfor ${LIBIBERTY}: ${LIBIBERTY_OBJS} @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q` ${RANLIB} ${.TARGET} CLEANFILES+= ${LIBIBERTY} ${LIBIBERTY_OBJS} #----------------------------------------------------------------------- # Fixups. # Set OBJS the same as bsd.prog.mk would do if we defined PROG. We can't # define PROG because we have multiple programs. # SRCS= errors.c genattr.c genattrtab.c \ genautomata.c gencheck.c genchecksum.c gencodes.c \ genconditions.c genconfig.c genconstants.c genemit.c \ genextract.c genflags.c gengenrtl.c gengtype.c genmodes.c \ genopinit.c genoutput.c genpeep.c genpreds.c genrecog.c \ gensupport.c ggc-none.c print-rtl.c read-rtl.c rtl.c \ vec.c SRCS+= ${GENSRCS} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} GENOBJS+= ${GENSRCS:N*.h:R:S/$/.o/g} CLEANFILES+= ${GENSRCS} ${GENONLY} ${GENOBJS} ${GNTOOLS} #----------------------------------------------------------------------- # Manual dependencies. .if !exists(${DEPENDFILE}) .include "Makefile.dep" .endif .include # DO NOT DELETE Index: head/lib/clang/clang.build.mk =================================================================== --- head/lib/clang/clang.build.mk (revision 272349) +++ head/lib/clang/clang.build.mk (revision 272350) @@ -1,241 +1,240 @@ # $FreeBSD$ .include CLANG_SRCS= ${LLVM_SRCS}/tools/clang CFLAGS+= -I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \ -I${LLVM_SRCS}/${SRCDIR} ${INCDIR:C/^/-I${LLVM_SRCS}\//} -I. \ -I${LLVM_SRCS}/../../lib/clang/include \ -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG .if ${MK_CLANG_FULL} != "no" CFLAGS+= -DCLANG_ENABLE_ARCMT \ -DCLANG_ENABLE_REWRITER \ -DCLANG_ENABLE_STATIC_ANALYZER .endif # MK_CLANG_FULL # LLVM is not strict aliasing safe as of 12/31/2011 CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \ - ${MK_ARM_EABI} != "no" +.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") TARGET_ABI= gnueabi .elif ${TARGET_ARCH} == "armv6hf" TARGET_ABI= gnueabihf .else TARGET_ABI= unknown .endif TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-${TARGET_ABI}-freebsd11.0 BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-unknown-freebsd11.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" CXXFLAGS+= -fno-exceptions -fno-rtti .PATH: ${LLVM_SRCS}/${SRCDIR} TBLGEN?= tblgen CLANG_TBLGEN?= clang-tblgen Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td ${TBLGEN} -gen-intrinsic \ -I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td .for arch in \ ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 . for hdr in \ AsmMatcher/-gen-asm-matcher \ AsmWriter1/-gen-asm-writer,-asmwriternum=1 \ AsmWriter/-gen-asm-writer \ CallingConv/-gen-callingconv \ CodeEmitter/-gen-emitter \ DAGISel/-gen-dag-isel \ DisassemblerTables/-gen-disassembler \ FastISel/-gen-fast-isel \ InstrInfo/-gen-instr-info \ MCCodeEmitter/-gen-emitter,-mc-emitter \ MCPseudoLowering/-gen-pseudo-lowering \ RegisterInfo/-gen-register-info \ SubtargetInfo/-gen-subtarget ${arch:T}Gen${hdr:H:C/$/.inc.h/}: ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td ${TBLGEN} ${hdr:T:C/,/ /g} \ -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td . endfor .endfor Attrs.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-classes \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrDump.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-dump \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrIdentifierArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-identifier-arg-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-impl \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrLateParsed.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-late-parsed-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-impl \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrKinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-kinds \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrParsedAttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrPCHRead.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-pch-read \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrPCHWrite.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-pch-write \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrSpellings.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-spelling-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrSpellingListIndex.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-spelling-index \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-template-instantiate \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td AttrTypeArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-type-arg-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td CommentCommandInfo.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td ${CLANG_TBLGEN} -gen-clang-comment-command-info \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/AST/CommentCommands.td CommentCommandList.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td ${CLANG_TBLGEN} -gen-clang-comment-command-list \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/AST/CommentCommands.td CommentHTMLNamedCharacterReferences.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td ${CLANG_TBLGEN} -gen-clang-comment-html-named-character-references \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td CommentHTMLTags.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td ${CLANG_TBLGEN} -gen-clang-comment-html-tags \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td CommentHTMLTagsProperties.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td ${CLANG_TBLGEN} -gen-clang-comment-html-tags-properties \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td CommentNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td ${CLANG_TBLGEN} -gen-clang-comment-nodes \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td DeclNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td ${CLANG_TBLGEN} -gen-clang-decl-nodes \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td StmtNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td ${CLANG_TBLGEN} -gen-clang-stmt-nodes \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td ${CLANG_TBLGEN} -gen-arm-neon \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/arm_neon.td arm_neon.inc.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td ${CLANG_TBLGEN} -gen-arm-neon-sema \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/arm_neon.td DiagnosticGroups.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diag-groups \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td DiagnosticIndexName.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diags-index-name \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td .for hdr in AST Analysis Comment Common Driver Frontend Lex Parse Sema Serialization Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td ${CLANG_TBLGEN} -gen-clang-diags-defs -clang-component=${hdr} \ -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td .endfor Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td ${TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Driver/Options.td CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td ${TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td ${CLANG_TBLGEN} -gen-clang-sa-checkers \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td .for dep in ${TGHDRS:C/$/.inc.d/} . sinclude "${dep}" .endfor SRCS+= ${TGHDRS:C/$/.inc.h/} DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} Index: head/lib/libc/arm/Symbol_oabi.map =================================================================== --- head/lib/libc/arm/Symbol_oabi.map (revision 272349) +++ head/lib/libc/arm/Symbol_oabi.map (nonexistent) @@ -1,16 +0,0 @@ -/* - * $FreeBSD$ - */ - -/* - * This only needs to contain symbols that are not listed in - * symbol maps from other parts of libc (i.e., not found in - * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...) - * and are not used in the ARM EABI. - */ -FBSDprivate_1.0 { - __umodsi3; - __modsi3; - __udivsi3; - __divsi3; -}; Property changes on: head/lib/libc/arm/Symbol_oabi.map ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/lib/libc/arm/Makefile.inc =================================================================== --- head/lib/libc/arm/Makefile.inc (revision 272349) +++ head/lib/libc/arm/Makefile.inc (revision 272350) @@ -1,22 +1,17 @@ # $FreeBSD$ # # Machine dependent definitions for the arm architecture. # SOFTFLOAT_BITS=32 # Long double is just double precision. MDSRCS+=machdep_ldisd.c SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol.map -.if ${MK_ARM_EABI} == "no" -# This contains the symbols that were removed when moving to the ARM EABI -SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_oabi.map -.else .include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc" -.endif .if ${MACHINE_ARCH} == "armv6hf" SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map .endif Index: head/lib/libc/arm/gen/Makefile.inc =================================================================== --- head/lib/libc/arm/gen/Makefile.inc (revision 272349) +++ head/lib/libc/arm/gen/Makefile.inc (revision 272350) @@ -1,16 +1,12 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # $FreeBSD$ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ getcontextx.c infinity.c ldexp.c makecontext.c \ __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c \ arm_initfini.c -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.endif - .if ${MACHINE_ARCH} == "armv6hf" SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \ fpsetround_vfp.c fpsetsticky_vfp.c .endif Index: head/lib/libc/quad/Makefile.inc =================================================================== --- head/lib/libc/quad/Makefile.inc (revision 272349) +++ head/lib/libc/quad/Makefile.inc (revision 272350) @@ -1,25 +1,25 @@ # from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # $FreeBSD$ # Quad support, if needed .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/quad ${LIBC_SRCTOP}/quad .if ${LIBC_ARCH} == "i386" SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c -.elif ${LIBC_ARCH} == "arm" && ${MK_ARM_EABI} != "no" +.elif ${LIBC_ARCH} == "arm" SRCS+= adddi3.c anddi3.c floatunsdidf.c iordi3.c lshldi3.c notdi2.c \ qdivrem.c subdi3.c xordi3.c .else SRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c fixdfdi.c \ fixsfdi.c fixunsdfdi.c fixunssfdi.c floatdidf.c floatdisf.c \ floatunsdidf.c iordi3.c lshldi3.c lshrdi3.c moddi3.c muldi3.c \ negdi2.c notdi2.c qdivrem.c subdi3.c ucmpdi2.c udivdi3.c umoddi3.c \ xordi3.c .endif SYM_MAPS+=${LIBC_SRCTOP}/quad/Symbol.map Index: head/lib/libcompiler_rt/Makefile =================================================================== --- head/lib/libcompiler_rt/Makefile (revision 272349) +++ head/lib/libcompiler_rt/Makefile (revision 272350) @@ -1,202 +1,201 @@ # $FreeBSD$ .include LIB= compiler_rt NO_PIC= WARNS?= 2 CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN .if ${MACHINE_CPUARCH} == "amd64" CRTARCH=x86_64 .else CRTARCH=${MACHINE_CPUARCH} .endif CRTSRC=${.CURDIR}/../../contrib/compiler-rt/lib .PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC} SRCF= absvdi2 \ absvsi2 \ absvti2 \ addvdi3 \ addvsi3 \ addvti3 \ ashldi3 \ ashlti3 \ ashrdi3 \ ashrti3 \ clear_cache \ clzdi2 \ clzsi2 \ clzti2 \ cmpdi2 \ cmpti2 \ comparedf2 \ comparesf2 \ ctzdi2 \ ctzsi2 \ ctzti2 \ divdc3 \ divdi3 \ divmoddi4 \ divmodsi4 \ divsc3 \ divti3 \ divxc3 \ enable_execute_stack \ eprintf \ ffsdi2 \ ffsti2 \ fixdfdi \ fixdfti \ fixsfdi \ fixsfti \ fixunsdfdi \ fixunsdfsi \ fixunsdfti \ fixunssfdi \ fixunssfsi \ fixunssfti \ fixunsxfdi \ fixunsxfsi \ fixunsxfti \ fixxfdi \ fixxfti \ floatdidf \ floatdisf \ floatdixf \ floattidf \ floattisf \ floattixf \ floatundidf \ floatundisf \ floatundixf \ floatunsidf \ floatunsisf \ floatuntidf \ floatuntisf \ floatuntixf \ int_util \ lshrdi3 \ lshrti3 \ moddi3 \ modti3 \ muldc3 \ muldi3 \ mulodi4 \ mulosi4 \ muloti4 \ mulsc3 \ multi3 \ mulvdi3 \ mulvsi3 \ mulvti3 \ mulxc3 \ negdf2 \ negdi2 \ negsf2 \ negti2 \ negvdi2 \ negvsi2 \ negvti2 \ paritydi2 \ paritysi2 \ parityti2 \ popcountdi2 \ popcountsi2 \ popcountti2 \ powidf2 \ powisf2 \ powitf2 \ powixf2 \ subvdi3 \ subvsi3 \ subvti3 \ trampoline_setup \ ucmpdi2 \ ucmpti2 \ udivdi3 \ udivmoddi4 \ udivmodsi4 \ udivmodti4 \ udivti3 \ umoddi3 \ umodti3 # These are already shipped by libc.a on arm and mips .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" SRCF+= adddf3 \ addsf3 \ divdf3 \ divsf3 \ extendsfdf2 \ fixdfsi \ fixsfsi \ floatsidf \ floatsisf \ muldf3 \ mulsf3 \ subdf3 \ subsf3 \ truncdfsf2 .endif -.if ${MACHINE_CPUARCH} != "mips" && \ - (${MACHINE_CPUARCH} != "arm" || ${MK_ARM_EABI} != "no") +.if ${MACHINE_CPUARCH} != "mips" SRCF+= divsi3 \ modsi3 \ udivsi3 \ umodsi3 .endif # FreeBSD-specific atomic intrinsics. .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6" .PATH: ${.CURDIR}/../../sys/arm/arm SRCF+= stdatomic CFLAGS+= -DEMIT_SYNC_ATOMICS .elif ${MACHINE_CPUARCH} == "mips" .PATH: ${.CURDIR}/../../sys/mips/mips SRCF+= stdatomic .endif .for file in ${SRCF} . if ${MACHINE_ARCH} == "armv6hf" && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) SRCS+= ${file}vfp.S . elif (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH} == "armv6hf") && exists(${CRTSRC}/${CRTARCH}/${file}.S) SRCS+= ${file}.S . else SRCS+= ${file}.c . endif .endfor -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" SRCS+= aeabi_idivmod.S \ aeabi_ldivmod.S \ aeabi_memcmp.S \ aeabi_memcpy.S \ aeabi_memmove.S \ aeabi_memset.S \ aeabi_uidivmod.S \ aeabi_uldivmod.S .endif .if ${MK_INSTALLLIB} != "no" SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a .endif .if ${MK_PROFILE} != "no" SYMLINKS+=libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a .endif .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ ${MACHINE_CPUARCH} == "powerpc" AFLAGS+=--noexecstack ACFLAGS+=-Wa,--noexecstack .endif .include Index: head/lib/libstand/Makefile =================================================================== --- head/lib/libstand/Makefile (revision 272349) +++ head/lib/libstand/Makefile (revision 272350) @@ -1,170 +1,166 @@ # $FreeBSD$ # Originally from $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $ # # Notes: # - We don't use the libc strerror/sys_errlist because the string table is # quite large. # MK_PROFILE= no MK_SSP= no .include LIB= stand NO_PIC= INCS= stand.h MAN= libstand.3 WARNS?= 0 CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${.CURDIR} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE_CPUARCH} == "i386" CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -fPIC .endif .if ${MACHINE} == "pc98" CFLAGS+= -Os .endif .if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG .endif .if ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float -D_STANDALONE .endif .if ${MACHINE_CPUARCH} == "mips" CFLAGS+= -G0 -fno-pic -mno-abicalls .endif # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ sbrk.c twiddle.c zalloc.c zalloc_malloc.c # private (pruned) versions of libc string functions SRCS+= strcasecmp.c .PATH: ${.CURDIR}/../libc/net SRCS+= ntoh.c # string functions from libc .PATH: ${.CURDIR}/../libc/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \ memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \ strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \ strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .if ${MACHINE_CPUARCH} == "arm" .PATH: ${.CURDIR}/../libc/arm/gen -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.else # Compiler support functions .PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/ # __clzsi2 and ctzsi2 for various builtin functions SRCS+= clzsi2.c ctzsi2.c # Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c .PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S -.endif .endif .if ${MACHINE_CPUARCH} == "powerpc" .PATH: ${.CURDIR}/../libc/quad SRCS+= ashldi3.c ashrdi3.c .PATH: ${.CURDIR}/../libc/powerpc/gen SRCS+= syncicache.c .endif # uuid functions from libc .PATH: ${.CURDIR}/../libc/uuid SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp .if ${MACHINE_ARCH} == "powerpc64" .PATH: ${.CURDIR}/powerpc .else .PATH: ${.CURDIR}/${MACHINE_CPUARCH} .endif SRCS+= _setjmp.S # decompression functionality from libbz2 # NOTE: to actually test this functionality after libbz2 upgrade compile # loader(8) with LOADER_BZIP2_SUPPORT defined .PATH: ${.CURDIR}/../../contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS SRCS+= libstand_bzlib_private.h .for file in bzlib.c crctable.c decompress.c huffman.c randtable.c SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= libstand_bzlib_private.h libstand_bzlib_private.h: bzlib_private.h sed -e 's||"stand.h"|' \ ${.ALLSRC} > ${.TARGET} # decompression functionality from libz .PATH: ${.CURDIR}/../libz CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../libz SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} sed -e "s|zutil\.h|libstand_zutil.h|" \ -e "s|gzguts\.h|libstand_gzguts.h|" \ ${.ALLSRC} > ${.TARGET} .endfor # depend on stand.h being able to be included multiple times .for file in zutil.h gzguts.h CLEANFILES+= libstand_${file} libstand_${file}: ${file} sed -e 's||"stand.h"|' \ -e 's||"stand.h"|' \ -e 's||"stand.h"|' \ -e 's||"stand.h"|' \ -e 's||"stand.h"|' \ ${.ALLSRC} > ${.TARGET} .endfor # io routines SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \ fstat.c close.c lseek.c open.c read.c write.c readdir.c # network routines SRCS+= arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c # network info services: SRCS+= bootp.c rarp.c bootparam.c # boot filesystems SRCS+= ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c SRCS+= dosfs.c ext2fs.c SRCS+= splitfs.c SRCS+= pkgfs.c .if ${MK_NAND} != "no" SRCS+= nandfs.c .endif .include Index: head/libexec/rtld-elf/Makefile =================================================================== --- head/libexec/rtld-elf/Makefile (revision 272349) +++ head/libexec/rtld-elf/Makefile (revision 272350) @@ -1,90 +1,90 @@ # $FreeBSD$ # Use the following command to build local debug version of dynamic # linker: # make DEBUG_FLAGS=-g DEBUG=-DDEBUG MK_TESTS=no all .include MK_SSP= no PROG?= ld-elf.so.1 SRCS= rtld_start.S \ reloc.c rtld.c rtld_lock.c rtld_printf.c map_object.c \ malloc.c xmalloc.c debug.c libmap.c MAN= rtld.1 CSTD?= gnu99 TOPSRCDIR= ${.CURDIR}/../.. CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD CFLAGS+= -I${TOPSRCDIR}/lib/csu/common .if exists(${.CURDIR}/${MACHINE_ARCH}) RTLD_ARCH= ${MACHINE_ARCH} .else RTLD_ARCH= ${MACHINE_CPUARCH} .endif CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -mcall-aixdesc LDFLAGS+= -nostdlib -e _rtld_start .else LDFLAGS+= -nostdlib -e .rtld_start .endif WARNS?= 2 INSTALLFLAGS= -C -b PRECIOUSPROG= BINDIR= /libexec SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG} MLINKS= rtld.1 ld-elf.so.1.1 \ rtld.1 ld.so.1 .if ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -fPIC .else CFLAGS+= -fpic .endif CFLAGS+= -DPIC $(DEBUG) LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} LDADD= -lc_pic -.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +.if ${MACHINE_CPUARCH} == "arm" # Some of the required math functions (div & mod) are implemented in # libcompiler_rt on ARM. The library also needs to be placed first to be # correctly linked. As some of the functions are used before we have # shared libraries. DPADD+= ${LIBCOMPILER_RT} LDADD+= -lcompiler_rt .endif .if ${MK_SYMVER} == "yes" LIBCDIR= ${TOPSRCDIR}/lib/libc VERSION_DEF= ${LIBCDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_MAP= Version.map LDFLAGS+= -Wl,--version-script=${VERSION_MAP} ${PROG}: ${VERSION_MAP} .if exists(${.CURDIR}/${RTLD_ARCH}/Symbol.map) SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map .endif .endif .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. beforeinstall: .if exists(${DESTDIR}/usr/libexec/${PROG}) -chflags -h noschg ${DESTDIR}/usr/libexec/${PROG} .endif .PATH: ${.CURDIR}/${RTLD_ARCH} .if ${MK_TESTS} != "no" SUBDIR+= tests .endif .include .include Index: head/share/mk/src.opts.mk =================================================================== --- head/share/mk/src.opts.mk (revision 272349) +++ head/share/mk/src.opts.mk (revision 272350) @@ -1,368 +1,367 @@ # $FreeBSD$ # # Option file for FreeBSD /usr/src builds. # # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf # and /etc/make.conf files. These translate in the build system to MK_FOO={yes,no} # with sensible (usually) defaults. # # Makefiles must include bsd.opts.mk after defining specific MK_FOO options that # are applicable for that Makefile (typically there are none, but sometimes there # are exceptions). Recursive makes usually add MK_FOO=no for options that they wish # to omit from that make. # # Makefiles must include bsd.srcpot.mk before they test the value of any MK_FOO # variable. # # Makefiles may also assume that this file is included by src.opts.mk should it # need variables defined there prior to the end of the Makefile where # bsd.{subdir,lib.bin}.mk is traditionally included. # # The old-style YES_FOO and NO_FOO are being phased out. No new instances of them # should be added. Old instances should be removed since they were just to # bridge the gap between FreeBSD 4 and FreeBSD 5. # # Makefiles should never test WITH_FOO or WITHOUT_FOO directly (although an # exception is made for _WITHOUT_SRCONF which turns off this mechanism # completely inside bsd.*.mk files). # .if !target(____) ____: .include # # Define MK_* variables (which are either "yes" or "no") for users # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the # make(1) environment. # These should be tested with `== "no"' or `!= "no"' in makefiles. # The NO_* variables should only be set by makefiles for variables # that haven't been converted over. # # These options are used by src the builds __DEFAULT_YES_OPTIONS = \ ACCT \ ACPI \ AMD \ APM \ - ARM_EABI \ AT \ ATM \ AUDIT \ AUTHPF \ BINUTILS \ BINUTILS_BOOTSTRAP \ BLUETOOTH \ BOOT \ BSD_CPIO \ BSNMP \ BZIP2 \ CALENDAR \ CAPSICUM \ CASPER \ CDDL \ CPP \ CROSS_COMPILER \ CRYPT \ CTM \ CUSE \ CXX \ DICT \ DMAGENT \ DYNAMICROOT \ ED_CRYPTO \ EXAMPLES \ FDT \ FLOPPY \ FMTREE \ FORTH \ FP_LIBC \ FREEBSD_UPDATE \ GAMES \ GCOV \ GDB \ GNU \ GNU_GREP_COMPAT \ GPIB \ GPIO \ GPL_DTC \ GROFF \ HTML \ ICONV \ INET \ INET6 \ IPFILTER \ IPFW \ JAIL \ KDUMP \ KVM \ LDNS \ LDNS_UTILS \ LEGACY_CONSOLE \ LIB32 \ LIBPTHREAD \ LIBTHR \ LOCALES \ LOCATE \ LPR \ LS_COLORS \ LZMA_SUPPORT \ MAIL \ MAILWRAPPER \ MAKE \ NDIS \ NETCAT \ NETGRAPH \ NLS_CATALOGS \ NS_CACHING \ NTP \ OPENSSL \ PAM \ PC_SYSINSTALL \ PF \ PKGBOOTSTRAP \ PMC \ PORTSNAP \ PPP \ QUOTAS \ RCMDS \ RCS \ RESCUE \ ROUTED \ SENDMAIL \ SETUID_LOGIN \ SHAREDOCS \ SOURCELESS \ SOURCELESS_HOST \ SOURCELESS_UCODE \ SVNLITE \ SYSCALL_COMPAT \ SYSCONS \ SYSINSTALL \ TCSH \ TELNET \ TESTS \ TEXTPROC \ UNBOUND \ USB \ UTMPX \ VI \ VT \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ ZFS \ ZONEINFO __DEFAULT_NO_OPTIONS = \ BSD_GREP \ CLANG_EXTRAS \ EISA \ FMAKE \ HESIOD \ LLDB \ NAND \ OFED \ OPENLDAP \ OPENSSH_NONE_CIPHER \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ USB_GADGET_EXAMPLES # # Default behaviour of some options depends on the architecture. Unfortunately # this means that we have to test TARGET_ARCH (the buildworld case) as well # as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not # used at all in bsd.*.mk, but we have to make an exception here if we want # to allow defaults for some things like clang to vary by target architecture. # Additional, per-target behavior should be rarely added only after much # gnashing of teeth and grinding of gears. # .if defined(TARGET_ARCH) __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif .if defined(TARGET) __TT=${TARGET} .else __TT=${MACHINE} .endif # Clang is only for x86, powerpc and little-endian arm right now, by default. .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL CLANG_BOOTSTRAP .elif ${__T} == "arm" || ${__T} == "armv6" || ${__T} == "armv6hf" __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP # GCC is unable to build the full clang on arm, disable it by default. __DEFAULT_NO_OPTIONS+=CLANG_FULL .else __DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL CLANG_BOOTSTRAP .endif # Clang the default system compiler only on little-endian arm and x86. .if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ ${__T} == "armv6hf" || ${__T} == "i386" __DEFAULT_YES_OPTIONS+=CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX .else # If clang is not cc, then build gcc by default __DEFAULT_NO_OPTIONS+=CLANG_IS_CC CLANG CLANG_BOOTSTRAP __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX .endif # HyperV is only available for x86 and amd64. .if ${__T} == "amd64" || ${__T} == "i386" __DEFAULT_YES_OPTIONS+=HYPERV .else __DEFAULT_NO_OPTIONS+=HYPERV .endif .include # # MK_* options that default to "yes" if the compiler is a C++11 compiler. # .include .for var in \ LIBCPLUSPLUS .if !defined(MK_${var}) .if ${COMPILER_FEATURES:Mc++11} .if defined(WITHOUT_${var}) MK_${var}:= no .else MK_${var}:= yes .endif .else .if defined(WITH_${var}) MK_${var}:= yes .else MK_${var}:= no .endif .endif .endif .endfor # # Force some options off if their dependencies are off. # Order is somewhat important. # .if ${MK_LIBPTHREAD} == "no" MK_LIBTHR:= no .endif .if ${MK_LDNS} == "no" MK_LDNS_UTILS:= no MK_UNBOUND:= no .endif .if ${MK_SOURCELESS} == "no" MK_SOURCELESS_HOST:= no MK_SOURCELESS_UCODE:= no .endif .if ${MK_CDDL} == "no" MK_ZFS:= no MK_CTF:= no .endif .if ${MK_CRYPT} == "no" MK_OPENSSL:= no MK_OPENSSH:= no MK_KERBEROS:= no .endif .if ${MK_CXX} == "no" MK_CLANG:= no MK_GROFF:= no MK_GNUCXX:= no .endif .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no MK_DMAGENT:= no .endif .if ${MK_NETGRAPH} == "no" MK_ATM:= no MK_BLUETOOTH:= no .endif .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no .endif .if ${MK_PF} == "no" MK_AUTHPF:= no .endif .if ${MK_TEXTPROC} == "no" MK_GROFF:= no .endif .if ${MK_CROSS_COMPILER} == "no" MK_BINUTILS_BOOTSTRAP:= no MK_CLANG_BOOTSTRAP:= no MK_GCC_BOOTSTRAP:= no .endif .if ${MK_TOOLCHAIN} == "no" MK_BINUTILS:= no MK_CLANG:= no MK_GCC:= no MK_GDB:= no .endif .if ${MK_CLANG} == "no" MK_CLANG_EXTRAS:= no MK_CLANG_FULL:= no .endif # # Set defaults for the MK_*_SUPPORT variables. # # # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # .for var in \ BZIP2 \ GNU \ INET \ INET6 \ KERBEROS \ KVM \ NETGRAPH \ PAM \ WIRELESS .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" MK_${var}_SUPPORT:= no .else MK_${var}_SUPPORT:= yes .endif .endfor # # MK_* options whose default value depends on another option. # .for vv in \ GSSAPI/KERBEROS \ MAN_UTILS/MAN .if defined(WITH_${vv:H}) MK_${vv:H}:= yes .elif defined(WITHOUT_${vv:H}) MK_${vv:H}:= no .else MK_${vv:H}:= ${MK_${vv:T}} .endif .endfor .if !${COMPILER_FEATURES:Mc++11} MK_LLDB:= no .endif .endif Index: head/sys/boot/arm/ixp425/boot2/Makefile =================================================================== --- head/sys/boot/arm/ixp425/boot2/Makefile (revision 272349) +++ head/sys/boot/arm/ixp425/boot2/Makefile (revision 272350) @@ -1,80 +1,78 @@ # $FreeBSD$ .include # We get a lot of the std lib functions from here. .PATH: ${.CURDIR}/../../at91/libat91 # Enable to get debug msgs #DEBUG=yes # Hack to search through the kernel for ufs:ad0s1a and replace it with # the correct one for the active slice/partition. FIXUP_BOOT_DRV=yes P=boot2 FILES=${P} SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:tl}_board.c SRCS+=memchr.c memcmp.c memcpy.c memmem.c memset.c printf.c strcmp.c strcpy.c SRCS+=strlen.c ashldi3.c divsi3.S muldi3.c -.if ${MK_ARM_EABI} != "no" SRCS+=aeabi_unwind.c -.endif MAN= KERNPHYSADDR=0x180000 KERNVIRTADDR=${KERNPHYSADDR} BOOT_STACK=0x200000-4 M=${MACHINE} LDFLAGS=-e ${KERNPHYSADDR} -EB -T ldscript.${M} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} S=${.CURDIR}/../../../.. CFLAGS+= \ -DBOOT_STACK=${BOOT_STACK} \ -I${.CURDIR}/../../../common \ -I${.CURDIR} .if defined(FIXUP_BOOT_DRV) CFLAGS+=-DFIXUP_BOOT_DRV .endif .if defined(DEBUG) CFLAGS+=-DDEBUG .endif ldscript.$M: $S/conf/ldscript.$M cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \ sed s/KERNVIRTADDR/${KERNVIRTADDR}/g | \ sed s/" + SIZEOF_HEADERS"// > ldscript.$M ${P}: ldscript.$M CLEANFILES+=ldscript.$M memchr.c: $S/../lib/libc/string/memchr.c sed -e 's/string\.h/lib.h/' < $S/../lib/libc/string/memchr.c > \ ${.TARGET} memmem.c: $S/../lib/libc/string/memmem.c sed -e 's/string\.h/lib.h/' < $S/../lib/libc/string/memmem.c > \ ${.TARGET} CLEANFILES+=memchr.c memmem.c ashldi3.o: $S/libkern/ashldi3.c ${CC} -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} divsi3.o: $S/libkern/${M}/divsi3.S ${CC} -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} muldi3.o: $S/libkern/${M}/muldi3.c ${CC} -c ${CFLAGS} -D_KERNEL -o ${.TARGET} ${.IMPSRC} inflate.c: $S/kern/inflate.c sed -e 's/extern void putstr (char/extern void putstr (const char/' < \ $S/kern/inflate.c > ${.TARGET} CLEANFILES+=inflate.c .include Index: head/sys/boot/libstand32/Makefile =================================================================== --- head/sys/boot/libstand32/Makefile (revision 272349) +++ head/sys/boot/libstand32/Makefile (revision 272350) @@ -1,181 +1,177 @@ # $FreeBSD$ # Originally from $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $ # # Notes: # - We don't use the libc strerror/sys_errlist because the string table is # quite large. # MAN= .include MK_SSP= no S= ${.CURDIR}/../../../lib/libstand .PATH: ${S} LIB= stand INTERNALLIB= MK_PROFILE= no NO_PIC= WARNS?= 0 CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${S} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE} == "pc98" CFLAGS+= -Os .endif .if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG .endif .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -I. .endif .if ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float -D_STANDALONE .endif .if ${MACHINE_CPUARCH} == "mips" CFLAGS+= -G0 -fno-pic -mno-abicalls .endif # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ sbrk.c twiddle.c zalloc.c zalloc_malloc.c # private (pruned) versions of libc string functions SRCS+= strcasecmp.c LIBC= ${S}/../libc .PATH: ${LIBC}/net SRCS+= ntoh.c # string functions from libc .PATH: ${LIBC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \ memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \ strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \ strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .if ${MACHINE_CPUARCH} == "arm" .PATH: ${LIBC}/arm/gen -.if ${MK_ARM_EABI} == "no" -SRCS+= divsi3.S -.else # Compiler support functions .PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/ # __clzsi2 and ctzsi2 for various builtin functions SRCS+= clzsi2.c ctzsi2.c # Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c .PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S -.endif .endif .if ${MACHINE_CPUARCH} == "powerpc" .PATH: ${LIBC}/quad SRCS+= ashldi3.c ashrdi3.c .PATH: ${LIBC}/powerpc/gen SRCS+= syncicache.c .endif # uuid functions from libc .PATH: ${LIBC}/uuid SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp .if ${MACHINE_CPUARCH} == "amd64" .PATH: ${S}/i386 .elif ${MACHINE_ARCH} == "powerpc64" .PATH: ${S}/powerpc .else .PATH: ${S}/${MACHINE_CPUARCH} .endif SRCS+= _setjmp.S # decompression functionality from libbz2 # NOTE: to actually test this functionality after libbz2 upgrade compile # loader(8) with LOADER_BZIP2_SUPPORT defined .PATH: ${.CURDIR}/../../../contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS SRCS+= libstand_bzlib_private.h .for file in bzlib.c crctable.c decompress.c huffman.c randtable.c SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= libstand_bzlib_private.h libstand_bzlib_private.h: bzlib_private.h sed -e 's||"stand.h"|' \ ${.ALLSRC} > ${.TARGET} # decompression functionality from libz .PATH: ${S}/../libz CFLAGS+=-DHAVE_MEMCPY -I${S}/../libz SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} sed -e "s|zutil\.h|libstand_zutil.h|" \ -e "s|gzguts\.h|libstand_gzguts.h|" \ ${.ALLSRC} > ${.TARGET} .endfor # depend on stand.h being able to be included multiple times .for file in zutil.h gzguts.h CLEANFILES+= libstand_${file} libstand_${file}: ${file} sed -e 's||"stand.h"|' \ -e 's||"stand.h"|' \ -e 's||"stand.h"|' \ -e 's||"stand.h"|' \ -e 's||"stand.h"|' \ ${.ALLSRC} > ${.TARGET} .endfor # io routines SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \ fstat.c close.c lseek.c open.c read.c write.c readdir.c # network routines SRCS+= arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c # network info services: SRCS+= bootp.c rarp.c bootparam.c # boot filesystems SRCS+= ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c SRCS+= dosfs.c ext2fs.c SRCS+= splitfs.c SRCS+= pkgfs.c .if ${MK_NAND} != "no" SRCS+= nandfs.c .endif .include .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine beforedepend ${OBJS}: machine machine: ln -fs ${.CURDIR}/../../i386/include machine .endif Index: head/sys/conf/Makefile.arm =================================================================== --- head/sys/conf/Makefile.arm (revision 272349) +++ head/sys/conf/Makefile.arm (revision 272350) @@ -1,149 +1,145 @@ # Makefile.arm -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # $FreeBSD$ # # Makefile for FreeBSD # # This makefile is constructed from a machine description: # config machineid # Most changes should be made in the machine description # /sys/arm/conf/``machineid'' # after which you should do # config machineid # Generic makefile changes should be made in # /sys/conf/Makefile.arm # after which config should be rerun for all machines. # # Which version of config(8) is required. %VERSREQ= 600013 STD8X16FONT?= iso .if !defined(S) .if exists(./@/.) S= ./@ .else S= ../../.. .endif .endif .include "$S/conf/kern.pre.mk" INCLUDES+= -I$S/contrib/libfdt -I$S/gnu/dts/include SYSTEM_LD:= ${SYSTEM_LD:$S/conf/ldscript.$M=ldscript.$M} SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscript.$M=ldscript.$M} .if !defined(DEBUG) && !defined(PROFLEVEL) STRIP_FLAGS = -S .endif # We don't support gcc's thump interwork stuff, so disable it CFLAGS.gcc += -mno-thumb-interwork -.if empty(DDB_ENABLED) -.if ${MK_ARM_EABI} == "no" -CFLAGS.gcc += -mno-apcs-frame -.endif -.elif ${MK_ARM_EABI} != "no" +.if !empty(DDB_ENABLED) CFLAGS += -funwind-tables # clang requires us to tell it to emit assembly with unwind information CFLAGS.clang += -mllvm -arm-enable-ehabi .endif # hack because genassym.c includes sys/bus.h which includes these. genassym.o: bus_if.h device_if.h SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${_LDFLAGS} \ -warn-common -export-dynamic -dynamic-linker /red/herring -o \ ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\ >ldscript.$M.noheader; \ ${SYSTEM_LD_}; \ ${OBJCOPY} -S -O binary ${FULLKERNEL}.noheader \ ${KERNEL_KO}.bin; \ rm ${FULLKERNEL}.noheader .if defined(MFS_IMAGE) SYSTEM_LD_TAIL += ;sh ${S}/tools/embed_mfs.sh ${KERNEL_KO}.bin ${MFS_IMAGE}; .endif FILES_CPU_FUNC = \ $S/$M/$M/cpufunc_asm_arm9.S \ $S/$M/$M/cpufunc_asm_arm10.S \ $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \ $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \ $S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S \ $S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv6.S \ $S/$M/$M/cpufunc_asm_armv7.S KERNEL_EXTRA=trampoline KERNEL_EXTRA_INSTALL=kernel.gz.tramp trampoline: ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \ ldscript.$M.tramp.noheader echo "#include " >tmphack.S echo "ENTRY(_start)" >>tmphack.S echo "bl _startC" >>tmphack.S ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \ -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp) && \ echo "#define KERNSIZE $$st_size" >>opt_kernname.h ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \ tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \ ldscript.$M.tramp.noheader \ tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.tramp.bin ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" >opt_kernname.h eval $$(stat -s ${KERNEL_KO}.tmp) && \ echo "#define KERNSIZE $$st_size" >>opt_kernname.h gzip -f9 ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \ echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h ${CC} -O2 -ffreestanding -DKZIP -I. -I$S -c $S/kern/inflate.c -o \ inflate-tramp.o ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \ -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \ ldscript.$M.tramp.noheader \ -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.gz.tramp.bin rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \ inflate-tramp.o tmphack.S %BEFORE_DEPEND %OBJS %FILES.c %FILES.s %FILES.m %CLEAN CLEAN+= ldscript.$M ${KERNEL_KO}.bin ldscript.$M.noheader CLEAN+= ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp.bin ldscript.$M.tramp \ ldscript.$M.tramp.noheader ${KERNEL_KO}.gz.tramp \ ${KERNEL_KO}.gz.tramp.bin ldscript.$M: $S/conf/ldscript.$M cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \ sed s/KERNVIRTADDR/${KERNVIRTADDR}/g > ldscript.$M %RULES .include "$S/conf/kern.post.mk" Index: head/sys/conf/kern.opts.mk =================================================================== --- head/sys/conf/kern.opts.mk (revision 272349) +++ head/sys/conf/kern.opts.mk (revision 272350) @@ -1,85 +1,84 @@ # $FreeBSD$ # Options set in the build system that affect the kernel somehow. # # Define MK_* variables (which are either "yes" or "no") for users # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the # make(1) environment. # These should be tested with `== "no"' or `!= "no"' in makefiles. # The NO_* variables should only be set by makefiles for variables # that haven't been converted over. # # Note: bsd.own.mk must be included before the rest of kern.opts.mk to make # building on 10.x and earlier work. This should be removed when that's no # longer supported since it confounds the defaults (since it uses the host's # notion of defaults rather than what's default in current when building # within sys/modules). .include # These options are used by the kernel build process (kern.mk and kmod.mk) # They have to be listed here so we can build modules outside of the # src tree. __DEFAULT_YES_OPTIONS = \ - ARM_EABI \ BLUETOOTH \ CDDL \ CRYPT \ FORMAT_EXTENSIONS \ INET \ INET6 \ IPFILTER \ KERNEL_SYMBOLS \ NETGRAPH \ PF \ SOURCELESS_HOST \ SOURCELESS_UCODE \ USB_GADGET_EXAMPLES \ ZFS __DEFAULT_NO_OPTIONS = \ EISA \ NAND \ OFED # expanded inline from bsd.mkopt.mk to avoid share/mk dependency # Those that default to yes .for var in ${__DEFAULT_YES_OPTIONS} .if !defined(MK_${var}) .if defined(WITHOUT_${var}) # WITHOUT always wins MK_${var}:= no .else MK_${var}:= yes .endif .endif .endfor .undef __DEFAULT_YES_OPTIONS # Those that default to no .for var in ${__DEFAULT_NO_OPTIONS} .if !defined(MK_${var}) .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins MK_${var}:= yes .else MK_${var}:= no .endif .endif .endfor .undef __DEFAULT_NO_OPTIONS # # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # .for var in \ INET \ INET6 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" MK_${var}_SUPPORT:= no .else MK_${var}_SUPPORT:= yes .endif .endfor