Date: Tue, 15 Feb 2011 16:09:09 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r218709 - in projects/sv: . bin/ed bin/sh contrib/top crypto/openssl/ssl etc games/fortune/datfiles gnu/usr.bin/groff/tmac include lib/libc/gen lib/libc/include lib/libdevinfo lib/libth... Message-ID: <201102151609.p1FG99ow036912@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Tue Feb 15 16:09:08 2011 New Revision: 218709 URL: http://svn.freebsd.org/changeset/base/218709 Log: MFC Added: projects/sv/bin/sh/arith_yacc.c - copied unchanged from r218708, head/bin/sh/arith_yacc.c projects/sv/bin/sh/arith_yacc.h - copied unchanged from r218708, head/bin/sh/arith_yacc.h projects/sv/bin/sh/arith_yylex.c - copied unchanged from r218708, head/bin/sh/arith_yylex.c projects/sv/lib/libthr/thread/thr_getthreadid_np.c - copied unchanged from r218708, head/lib/libthr/thread/thr_getthreadid_np.c projects/sv/share/examples/kld/khelp/ - copied from r218708, head/share/examples/kld/khelp/ projects/sv/share/man/man3/pthread_getthreadid_np.3 - copied unchanged from r218708, head/share/man/man3/pthread_getthreadid_np.3 projects/sv/sys/boot/pc98/pc98boot/ - copied from r218708, head/sys/boot/pc98/pc98boot/ projects/sv/sys/compat/linux/linux_fork.c - copied unchanged from r218708, head/sys/compat/linux/linux_fork.c projects/sv/sys/contrib/dev/acpica/compiler/aslbtypes.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/compiler/aslbtypes.c projects/sv/sys/contrib/dev/acpica/compiler/aslwalks.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/compiler/aslwalks.c projects/sv/sys/contrib/dev/acpica/compiler/dtexpress.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/compiler/dtexpress.c projects/sv/sys/contrib/dev/acpica/debugger/dbmethod.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/debugger/dbmethod.c projects/sv/sys/contrib/dev/acpica/debugger/dbnames.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/debugger/dbnames.c projects/sv/sys/contrib/dev/acpica/dispatcher/dsargs.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/dispatcher/dsargs.c projects/sv/sys/contrib/dev/acpica/dispatcher/dscontrol.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/dispatcher/dscontrol.c projects/sv/sys/contrib/dev/acpica/dispatcher/dswload2.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/dispatcher/dswload2.c projects/sv/sys/contrib/dev/acpica/utilities/utdecode.c - copied unchanged from r218708, head/sys/contrib/dev/acpica/utilities/utdecode.c projects/sv/tools/regression/bin/sh/expansion/arith10.0 - copied unchanged from r218708, head/tools/regression/bin/sh/expansion/arith10.0 projects/sv/tools/regression/bin/sh/expansion/arith11.0 - copied unchanged from r218708, head/tools/regression/bin/sh/expansion/arith11.0 projects/sv/tools/regression/bin/sh/expansion/arith9.0 - copied unchanged from r218708, head/tools/regression/bin/sh/expansion/arith9.0 Deleted: projects/sv/bin/sh/arith.y projects/sv/bin/sh/arith_lex.l Modified: projects/sv/Makefile projects/sv/Makefile.inc1 projects/sv/UPDATING projects/sv/bin/ed/ed.1 projects/sv/bin/sh/Makefile projects/sv/bin/sh/arith.h projects/sv/bin/sh/sh.1 projects/sv/bin/sh/shell.h projects/sv/crypto/openssl/ssl/t1_lib.c projects/sv/etc/termcap.small projects/sv/games/fortune/datfiles/fortunes projects/sv/games/fortune/datfiles/fortunes-o.real projects/sv/gnu/usr.bin/groff/tmac/mdoc.local projects/sv/include/pthread_np.h projects/sv/lib/libc/gen/sysconf.3 projects/sv/lib/libc/include/namespace.h projects/sv/lib/libc/include/un-namespace.h projects/sv/lib/libdevinfo/devinfo.h projects/sv/lib/libdevinfo/devinfo_var.h projects/sv/lib/libthr/pthread.map projects/sv/lib/libthr/thread/Makefile.inc projects/sv/lib/libufs/libufs.h projects/sv/lib/msun/src/e_asin.c projects/sv/lib/msun/src/e_expf.c projects/sv/lib/msun/src/s_atan.c projects/sv/lib/msun/src/s_cos.c projects/sv/lib/msun/src/s_nexttoward.c projects/sv/lib/msun/src/s_nexttowardf.c projects/sv/lib/msun/src/s_sin.c projects/sv/lib/msun/src/s_tan.c projects/sv/libexec/rtld-elf/rtld.c projects/sv/libexec/rtld-elf/rtld.h projects/sv/libexec/rtld-elf/rtld_lock.c projects/sv/release/doc/en_US.ISO8859-1/relnotes/article.sgml projects/sv/sbin/fsck_ffs/fsck.h projects/sv/sbin/fsck_ffs/setup.c projects/sv/sbin/fsck_ffs/suj.c projects/sv/sbin/hastd/proto_uds.c projects/sv/sbin/mdconfig/mdconfig.c projects/sv/sbin/mksnap_ffs/mksnap_ffs.8 projects/sv/sbin/tunefs/tunefs.c projects/sv/share/examples/kld/Makefile projects/sv/share/examples/pf/pf.conf projects/sv/share/man/man3/Makefile projects/sv/share/man/man3/pthread_self.3 projects/sv/share/man/man4/ath_hal.4 projects/sv/share/man/man4/bwn.4 projects/sv/share/man/man7/build.7 projects/sv/share/man/man7/ports.7 projects/sv/share/man/man9/rman.9 projects/sv/share/misc/committers-ports.dot projects/sv/share/mk/bsd.own.mk projects/sv/sys/amd64/linux32/linux.h projects/sv/sys/amd64/linux32/linux32_machdep.c projects/sv/sys/amd64/linux32/linux32_proto.h projects/sv/sys/amd64/linux32/linux32_syscall.h projects/sv/sys/amd64/linux32/linux32_sysent.c projects/sv/sys/amd64/linux32/linux32_sysvec.c projects/sv/sys/amd64/linux32/syscalls.master projects/sv/sys/arm/at91/at91_machdep.c projects/sv/sys/arm/econa/econa_machdep.c projects/sv/sys/arm/include/pmap.h projects/sv/sys/arm/mv/ic.c projects/sv/sys/arm/mv/timer.c projects/sv/sys/arm/sa11x0/assabet_machdep.c projects/sv/sys/arm/xscale/i80321/ep80219_machdep.c projects/sv/sys/arm/xscale/i80321/iq31244_machdep.c projects/sv/sys/arm/xscale/ixp425/avila_machdep.c projects/sv/sys/boot/pc98/Makefile projects/sv/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/sv/sys/compat/linux/linux_emul.c projects/sv/sys/compat/linux/linux_emul.h projects/sv/sys/compat/linux/linux_futex.c projects/sv/sys/compat/linux/linux_stats.c projects/sv/sys/conf/NOTES projects/sv/sys/conf/files projects/sv/sys/conf/files.amd64 projects/sv/sys/conf/files.i386 projects/sv/sys/conf/files.pc98 projects/sv/sys/conf/kern.pre.mk projects/sv/sys/conf/options projects/sv/sys/contrib/dev/acpica/changes.txt projects/sv/sys/contrib/dev/acpica/common/dmtable.c projects/sv/sys/contrib/dev/acpica/common/dmtbdump.c projects/sv/sys/contrib/dev/acpica/common/dmtbinfo.c projects/sv/sys/contrib/dev/acpica/compiler/aslanalyze.c projects/sv/sys/contrib/dev/acpica/compiler/aslcompile.c projects/sv/sys/contrib/dev/acpica/compiler/aslcompiler.h projects/sv/sys/contrib/dev/acpica/compiler/aslcompiler.l projects/sv/sys/contrib/dev/acpica/compiler/aslcompiler.y projects/sv/sys/contrib/dev/acpica/compiler/aslmessages.h projects/sv/sys/contrib/dev/acpica/compiler/aslpredef.c projects/sv/sys/contrib/dev/acpica/compiler/asltree.c projects/sv/sys/contrib/dev/acpica/compiler/dtcompile.c projects/sv/sys/contrib/dev/acpica/compiler/dtcompiler.h projects/sv/sys/contrib/dev/acpica/compiler/dtfield.c projects/sv/sys/contrib/dev/acpica/compiler/dtio.c projects/sv/sys/contrib/dev/acpica/compiler/dttable.c projects/sv/sys/contrib/dev/acpica/compiler/dtutils.c projects/sv/sys/contrib/dev/acpica/debugger/dbcmds.c projects/sv/sys/contrib/dev/acpica/debugger/dbdisply.c projects/sv/sys/contrib/dev/acpica/debugger/dbinput.c projects/sv/sys/contrib/dev/acpica/dispatcher/dsopcode.c projects/sv/sys/contrib/dev/acpica/dispatcher/dswload.c projects/sv/sys/contrib/dev/acpica/events/evgpe.c projects/sv/sys/contrib/dev/acpica/events/evregion.c projects/sv/sys/contrib/dev/acpica/events/evxfregn.c projects/sv/sys/contrib/dev/acpica/executer/exfldio.c projects/sv/sys/contrib/dev/acpica/include/acdebug.h projects/sv/sys/contrib/dev/acpica/include/acdisasm.h projects/sv/sys/contrib/dev/acpica/include/acdispat.h projects/sv/sys/contrib/dev/acpica/include/acglobal.h projects/sv/sys/contrib/dev/acpica/include/aclocal.h projects/sv/sys/contrib/dev/acpica/include/acoutput.h projects/sv/sys/contrib/dev/acpica/include/acpixf.h projects/sv/sys/contrib/dev/acpica/include/actbl.h projects/sv/sys/contrib/dev/acpica/tables/tbfadt.c projects/sv/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h projects/sv/sys/contrib/dev/acpica/utilities/utglobal.c projects/sv/sys/dev/acpica/Osd/OsdTable.c projects/sv/sys/dev/acpica/acpi_resource.c projects/sv/sys/dev/ahci/ahci.c projects/sv/sys/dev/ath/ath_hal/ah.c projects/sv/sys/dev/ath/ath_hal/ah.h projects/sv/sys/dev/ath/ath_hal/ah_eeprom_v14.c projects/sv/sys/dev/ath/ath_hal/ah_eeprom_v14.h projects/sv/sys/dev/ath/ath_hal/ah_internal.h projects/sv/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c projects/sv/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c projects/sv/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c projects/sv/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c projects/sv/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c projects/sv/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c projects/sv/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c projects/sv/sys/dev/ath/ath_hal/ar5416/ar5416phy.h projects/sv/sys/dev/ath/ath_hal/ar5416/ar5416reg.h projects/sv/sys/dev/ath/ath_hal/ar9002/ar9280.c projects/sv/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c projects/sv/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c projects/sv/sys/dev/ath/ath_rate/sample/sample.h projects/sv/sys/dev/ath/if_ath.c projects/sv/sys/dev/ath/if_ath_tx.c projects/sv/sys/dev/ath/if_ath_tx_ht.c projects/sv/sys/dev/ath/if_ath_tx_ht.h projects/sv/sys/dev/ath/if_athioctl.h projects/sv/sys/dev/ath/if_athvar.h projects/sv/sys/dev/bce/if_bce.c projects/sv/sys/dev/bce/if_bcefw.h projects/sv/sys/dev/bce/if_bcereg.h projects/sv/sys/dev/e1000/e1000_80003es2lan.c projects/sv/sys/dev/e1000/e1000_80003es2lan.h projects/sv/sys/dev/e1000/e1000_82540.c projects/sv/sys/dev/e1000/e1000_82541.c projects/sv/sys/dev/e1000/e1000_82542.c projects/sv/sys/dev/e1000/e1000_82543.c projects/sv/sys/dev/e1000/e1000_82571.c projects/sv/sys/dev/e1000/e1000_82575.c projects/sv/sys/dev/e1000/e1000_82575.h projects/sv/sys/dev/e1000/e1000_api.c projects/sv/sys/dev/e1000/e1000_api.h projects/sv/sys/dev/e1000/e1000_defines.h projects/sv/sys/dev/e1000/e1000_hw.h projects/sv/sys/dev/e1000/e1000_ich8lan.c projects/sv/sys/dev/e1000/e1000_ich8lan.h projects/sv/sys/dev/e1000/e1000_mac.c projects/sv/sys/dev/e1000/e1000_mac.h projects/sv/sys/dev/e1000/e1000_manage.c projects/sv/sys/dev/e1000/e1000_manage.h projects/sv/sys/dev/e1000/e1000_mbx.c projects/sv/sys/dev/e1000/e1000_nvm.c projects/sv/sys/dev/e1000/e1000_nvm.h projects/sv/sys/dev/e1000/e1000_osdep.c projects/sv/sys/dev/e1000/e1000_phy.c projects/sv/sys/dev/e1000/e1000_phy.h projects/sv/sys/dev/e1000/e1000_regs.h projects/sv/sys/dev/e1000/e1000_vf.c projects/sv/sys/dev/e1000/e1000_vf.h projects/sv/sys/dev/e1000/if_igb.c projects/sv/sys/dev/e1000/if_igb.h projects/sv/sys/dev/fb/splash.c projects/sv/sys/dev/isp/isp.c projects/sv/sys/dev/isp/isp_freebsd.c projects/sv/sys/dev/isp/isp_freebsd.h projects/sv/sys/dev/isp/isp_library.c projects/sv/sys/dev/isp/isp_pci.c projects/sv/sys/dev/isp/isp_sbus.c projects/sv/sys/dev/isp/ispvar.h projects/sv/sys/dev/md/md.c projects/sv/sys/dev/pci/pci.c projects/sv/sys/dev/sio/sio.c projects/sv/sys/dev/sound/pci/emu10k1.c projects/sv/sys/dev/sound/pci/emu10kx.c projects/sv/sys/dev/usb/controller/ehci_mv.c projects/sv/sys/dev/usb/controller/usb_controller.c projects/sv/sys/dev/usb/quirk/usb_quirk.c projects/sv/sys/dev/usb/template/usb_template.c projects/sv/sys/dev/usb/usb_transfer.c projects/sv/sys/dev/usb/usbdevs projects/sv/sys/dev/usb/wlan/if_run.c projects/sv/sys/dev/usb/wlan/if_runreg.h projects/sv/sys/dev/usb/wlan/if_runvar.h projects/sv/sys/fs/ext2fs/ext2_alloc.c projects/sv/sys/fs/tmpfs/tmpfs.h projects/sv/sys/fs/tmpfs/tmpfs_subr.c projects/sv/sys/geom/eli/g_eli.c projects/sv/sys/geom/part/g_part_pc98.c projects/sv/sys/geom/sched/gs_rr.c projects/sv/sys/i386/linux/imgact_linux.c projects/sv/sys/i386/linux/linux.h projects/sv/sys/i386/linux/linux_machdep.c projects/sv/sys/i386/linux/linux_proto.h projects/sv/sys/i386/linux/linux_syscall.h projects/sv/sys/i386/linux/linux_sysent.c projects/sv/sys/i386/linux/linux_sysvec.c projects/sv/sys/i386/linux/syscalls.master projects/sv/sys/kern/kern_synch.c projects/sv/sys/kern/kern_sysctl.c projects/sv/sys/kern/subr_module.c projects/sv/sys/kern/subr_smp.c projects/sv/sys/kern/subr_trap.c projects/sv/sys/kern/subr_uio.c projects/sv/sys/kern/uipc_socket.c projects/sv/sys/kern/vfs_bio.c projects/sv/sys/kern/vfs_mount.c projects/sv/sys/kern/vfs_subr.c projects/sv/sys/kern/vfs_vnops.c projects/sv/sys/mips/cavium/octe/ethernet-common.c projects/sv/sys/mips/cavium/octeon_mp.c projects/sv/sys/mips/include/hwfunc.h projects/sv/sys/mips/mips/mp_machdep.c projects/sv/sys/mips/rmi/xlr_machdep.c projects/sv/sys/mips/sibyte/sb_scd.c projects/sv/sys/modules/acpi/acpi/Makefile projects/sv/sys/modules/linux/Makefile projects/sv/sys/net/if.c projects/sv/sys/net/netisr.c projects/sv/sys/net/rtsock.c projects/sv/sys/net/vnet.h projects/sv/sys/netinet/sctp_asconf.c projects/sv/sys/netinet/sctp_input.c projects/sv/sys/netinet/sctp_output.c projects/sv/sys/netinet/sctp_pcb.c projects/sv/sys/netinet/sctp_ss_functions.c projects/sv/sys/netinet/sctp_structs.h projects/sv/sys/netinet6/sctp6_usrreq.c projects/sv/sys/pc98/cbus/sio.c projects/sv/sys/sparc64/sparc64/machdep.c projects/sv/sys/sparc64/sparc64/pmap.c projects/sv/sys/sys/linker.h projects/sv/sys/sys/mutex.h projects/sv/sys/sys/param.h projects/sv/sys/sys/proc.h projects/sv/sys/sys/uio.h projects/sv/sys/ufs/ffs/ffs_snapshot.c projects/sv/sys/ufs/ffs/ffs_softdep.c projects/sv/sys/ufs/ffs/fs.h projects/sv/sys/ufs/ufs/ufs_acl.c projects/sv/sys/ufs/ufs/ufs_vnops.c projects/sv/sys/vm/vm_kern.c projects/sv/sys/vm/vm_meter.c projects/sv/sys/vm/vm_object.c projects/sv/sys/vm/vm_page.c projects/sv/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c projects/sv/tools/tools/nanobsd/FlashDevice.sub projects/sv/usr.bin/calendar/parsedata.c projects/sv/usr.bin/calendar/paskha.c projects/sv/usr.bin/gzip/zmore.1 projects/sv/usr.bin/rs/rs.c projects/sv/usr.bin/stat/stat.c projects/sv/usr.bin/truss/setup.c projects/sv/usr.sbin/acpi/acpidb/Makefile projects/sv/usr.sbin/acpi/iasl/Makefile projects/sv/usr.sbin/config/configvers.h projects/sv/usr.sbin/config/mkmakefile.c projects/sv/usr.sbin/diskinfo/diskinfo.c Directory Properties: projects/sv/ (props changed) projects/sv/cddl/contrib/opensolaris/ (props changed) projects/sv/contrib/bind9/ (props changed) projects/sv/contrib/binutils/ (props changed) projects/sv/contrib/bzip2/ (props changed) projects/sv/contrib/dialog/ (props changed) projects/sv/contrib/ee/ (props changed) projects/sv/contrib/expat/ (props changed) projects/sv/contrib/file/ (props changed) projects/sv/contrib/gdb/ (props changed) projects/sv/contrib/gdtoa/ (props changed) projects/sv/contrib/gnu-sort/ (props changed) projects/sv/contrib/groff/ (props changed) projects/sv/contrib/less/ (props changed) projects/sv/contrib/libpcap/ (props changed) projects/sv/contrib/llvm/ (props changed) projects/sv/contrib/llvm/tools/clang/ (props changed) projects/sv/contrib/ncurses/ (props changed) projects/sv/contrib/netcat/ (props changed) projects/sv/contrib/ntp/ (props changed) projects/sv/contrib/one-true-awk/ (props changed) projects/sv/contrib/openbsm/ (props changed) projects/sv/contrib/openpam/ (props changed) projects/sv/contrib/pf/ (props changed) projects/sv/contrib/sendmail/ (props changed) projects/sv/contrib/tcpdump/ (props changed) projects/sv/contrib/tcsh/ (props changed) projects/sv/contrib/top/ (props changed) projects/sv/contrib/top/install-sh (props changed) projects/sv/contrib/tzcode/stdtime/ (props changed) projects/sv/contrib/tzcode/zic/ (props changed) projects/sv/contrib/tzdata/ (props changed) projects/sv/contrib/wpa/ (props changed) projects/sv/contrib/xz/ (props changed) projects/sv/crypto/openssh/ (props changed) projects/sv/crypto/openssl/ (props changed) projects/sv/lib/libc/ (props changed) projects/sv/lib/libc/stdtime/ (props changed) projects/sv/lib/libutil/ (props changed) projects/sv/lib/libz/ (props changed) projects/sv/sbin/ (props changed) projects/sv/sbin/ipfw/ (props changed) projects/sv/share/mk/bsd.arch.inc.mk (props changed) projects/sv/share/zoneinfo/ (props changed) projects/sv/sys/ (props changed) projects/sv/sys/amd64/include/xen/ (props changed) projects/sv/sys/cddl/contrib/opensolaris/ (props changed) projects/sv/sys/contrib/dev/acpica/ (props changed) projects/sv/sys/contrib/octeon-sdk/ (props changed) projects/sv/sys/contrib/pf/ (props changed) projects/sv/sys/contrib/x86emu/ (props changed) projects/sv/usr.bin/calendar/ (props changed) projects/sv/usr.bin/csup/ (props changed) projects/sv/usr.bin/procstat/ (props changed) projects/sv/usr.sbin/zic/ (props changed) Modified: projects/sv/Makefile ============================================================================== --- projects/sv/Makefile Tue Feb 15 13:29:52 2011 (r218708) +++ projects/sv/Makefile Tue Feb 15 16:09:08 2011 (r218709) @@ -30,6 +30,7 @@ # delete-old-libs - Delete obsolete libraries. # targets - Print a list of supported TARGET/TARGET_ARCH pairs # for world and kernel targets. +# toolchains - Build a toolchain for all world and kernel targets. # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the @@ -307,8 +308,10 @@ make: .PHONY ${MMAKE} install DESTDIR=${MAKEPATH} BINDIR= tinderbox: - @cd ${.CURDIR} && \ - DOING_TINDERBOX=YES ${MAKE} JFLAG=${JFLAG} universe + @cd ${.CURDIR} && ${MAKE} DOING_TINDERBOX=YES universe + +toolchains: + @cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=toolchain universe # # universe @@ -328,6 +331,12 @@ TARGET_ARCHES_sun4v?= sparc64 TARGET_ARCHES_${target}?= ${target} .endfor +.if defined(UNIVERSE_TARGET) +MAKE_JUST_WORLDS= YES +.else +UNIVERSE_TARGET?= buildworld +.endif + targets: @echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets" .for target in ${TARGETS} @@ -361,16 +370,16 @@ universe_${target}_prologue: .for target_arch in ${TARGET_ARCHES_${target}} universe_${target}: universe_${target}_${target_arch} universe_${target}_${target_arch}: universe_${target}_prologue - @echo ">> ${target}.${target_arch} buildworld started on `LC_ALL=C date`" + @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildworld \ + ${MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ TARGET=${target} \ TARGET_ARCH=${target_arch} \ - > _.${target}.${target_arch}.buildworld 2>&1 || \ - (echo "${target}.${target_arch} world failed," \ - "check _.${target}.${target_arch}.buildworld for details" | \ + > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ + (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \ + "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ ${MAKEFAIL})) - @echo ">> ${target}.${target_arch} buildworld completed on `LC_ALL=C date`" + @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`" .endfor .endif .if !defined(MAKE_JUST_WORLDS) Modified: projects/sv/Makefile.inc1 ============================================================================== --- projects/sv/Makefile.inc1 Tue Feb 15 13:29:52 2011 (r218708) +++ projects/sv/Makefile.inc1 Tue Feb 15 16:09:08 2011 (r218709) @@ -28,6 +28,17 @@ # /usr/share/mk. These include: # obj depend all install clean cleandepend cleanobj +# You are supposed to define both of these when calling Makefile.inc1 +# directly. However, some old scripts don't. Cope for the moment, but +# issue a new warning for a transition period. +.if defined(TARGET) && !defined(TARGET_ARCH) +.warning "You must pass both TARGET and TARGET_ARCH to Makefile.inc1. Setting TARGET_ARCH=${TARGET}." +TARGET_ARCH=${TARGET} +.endif +.if !defined(TARGET) || !defined(TARGET_ARCH) +.error "Both TARGET and TARGET_ARCH must be defined." +.endif + .include <bsd.own.mk> .include <bsd.arch.inc.mk> @@ -1378,19 +1389,63 @@ check-old: check-old-files check-old-lib showconfig: @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | 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} +.endif +.endif + +.endif + +.if !defined(DTBOUTPUTPATH) || !exists(${DTBOUTPUTPATH}) +DTBOUTPUTPATH= ${.CURDIR} +.endif + +# +# Build 'standalone' Device Tree Blob +# +builddtb: + @if [ "${FDT_DTS_FILE}" = "" ]; then \ + echo "ERROR: FDT_DTS_FILE must be specified!"; \ + exit 1; \ + fi; \ + if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \ + echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \ + exist!"; \ + exit 1; \ + fi; \ + if [ "${DTBOUTPUTPATH}" = "${.CURDIR}" ]; then \ + echo "WARNING: DTB will be placed in the current working \ + directory"; \ + fi + @PATH=${TMPPATH} \ + dtc -O dtb -o \ + ${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \ + -p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ############### .if defined(XDEV) && defined(XDEV_ARCH) +.if ${XDEV} == ${MACHINE} && ${XDEV_ARCH} == ${MACHINE_ARCH} +XDEV_CPUTYPE?=${CPUTYPE} +.else +XDEV_CPUTYPE?=${TARGET_CPUTYPE} +.endif + NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE \ - -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS + -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS \ + TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \ + CPUTYPE=${XDEV_CPUTYPE} -XDDIR=${XDEV}-freebsd +XDDIR=${XDEV_ARCH}-freebsd XDTP=/usr/${XDDIR} -CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \ - TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} +CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} CDENV= ${CDBENV} \ _SHLIBDIRPREFIX=${XDTP} \ TOOLS_PREFIX=${XDTP} @@ -1412,7 +1467,7 @@ xdev: xdev-build xdev-install xdev-build: _xb-build-tools _xb-cross-tools _xb-build-tools: - ${_+_}cd ${.CURDIR}; \ + ${_+_}@cd ${.CURDIR}; \ ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools _xb-cross-tools: @@ -1466,41 +1521,3 @@ _xi-links: ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \ done .endif - -.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} -.endif -.endif - -.endif - -.if !defined(DTBOUTPUTPATH) || !exists(${DTBOUTPUTPATH}) -DTBOUTPUTPATH= ${.CURDIR} -.endif - -# -# Build 'standalone' Device Tree Blob -# -builddtb: - @if [ "${FDT_DTS_FILE}" = "" ]; then \ - echo "ERROR: FDT_DTS_FILE must be specified!"; \ - exit 1; \ - fi; \ - if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \ - echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \ - exist!"; \ - exit 1; \ - fi; \ - if [ "${DTBOUTPUTPATH}" = "${.CURDIR}" ]; then \ - echo "WARNING: DTB will be placed in the current working \ - directory"; \ - fi - @PATH=${TMPPATH} \ - dtc -O dtb -o \ - ${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \ - -p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} Modified: projects/sv/UPDATING ============================================================================== --- projects/sv/UPDATING Tue Feb 15 13:29:52 2011 (r218708) +++ projects/sv/UPDATING Tue Feb 15 16:09:08 2011 (r218709) @@ -22,6 +22,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110207: + Remove the uio_yield prototype and symbol. This function has + been misnamed since it was introduced and should not be + globally exposed with this name. The equivalent functionality + is now available using kern_yield(curthread->td_user_pri). + The function remains undocumented. + 20110112: A SYSCTL_[ADD_]UQUAD was added for unsigned uint64_t pointers, symmetric with the existing SYSCTL_[ADD_]QUAD. Type checking Modified: projects/sv/bin/ed/ed.1 ============================================================================== --- projects/sv/bin/ed/ed.1 Tue Feb 15 13:29:52 2011 (r218708) +++ projects/sv/bin/ed/ed.1 Tue Feb 15 16:09:08 2011 (r218709) @@ -231,7 +231,7 @@ The current line (address) in the buffer The last line in the buffer. .It n The -.Em n Ns th, +.Em n Ns th line in the buffer where .Em n @@ -649,7 +649,7 @@ The mark is not cleared until the line i deleted or otherwise modified. .It (.,.)l Print the addressed lines unambiguously. -If a single line fills for than one screen (as might be the case +If a single line fills more than one screen (as might be the case when viewing a binary file, for instance), a .Dq Li --More-- prompt is printed on the last line. Modified: projects/sv/bin/sh/Makefile ============================================================================== --- projects/sv/bin/sh/Makefile Tue Feb 15 13:29:52 2011 (r218708) +++ projects/sv/bin/sh/Makefile Tue Feb 15 16:09:08 2011 (r218709) @@ -3,22 +3,22 @@ PROG= sh INSTALLFLAGS= -S -SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ +SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \ + exec.c expand.c \ histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \ mystring.c options.c output.c parser.c printf.c redir.c show.c \ test.c trap.c var.c GENSRCS= builtins.c init.c nodes.c syntax.c GENHDRS= builtins.h nodes.h syntax.h token.h -SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} y.tab.h +SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} # MLINKS for Shell built in commands for which there are no userland # utilities of the same name are handled with the associated manpage, # builtin.1 in share/man/man1/. -DPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} -LDADD= -ll -ledit -ltermcap +DPADD= ${LIBEDIT} ${LIBTERMCAP} +LDADD= -ledit -ltermcap -LFLAGS= -8 # 8-bit lex scanner for arithmetic CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline Modified: projects/sv/bin/sh/arith.h ============================================================================== --- projects/sv/bin/sh/arith.h Tue Feb 15 13:29:52 2011 (r218708) +++ projects/sv/bin/sh/arith.h Tue Feb 15 16:09:08 2011 (r218709) @@ -34,8 +34,6 @@ #define DIGITS(var) (3 + (2 + CHAR_BIT * sizeof((var))) / 3) -extern const char *arith_buf, *arith_startbuf; - arith_t arith(const char *); void arith_lex_reset(void); int expcmd(int, char **); Copied: projects/sv/bin/sh/arith_yacc.c (from r218708, head/bin/sh/arith_yacc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/sv/bin/sh/arith_yacc.c Tue Feb 15 16:09:08 2011 (r218709, copy of r218708, head/bin/sh/arith_yacc.c) @@ -0,0 +1,378 @@ +/*- + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 2007 + * Herbert Xu <herbert@gondor.apana.org.au>. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Kenneth Almquist. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <sys/limits.h> +#include <errno.h> +#include <inttypes.h> +#include <stdlib.h> +#include <stdio.h> +#include "arith.h" +#include "arith_yacc.h" +#include "expand.h" +#include "shell.h" +#include "error.h" +#include "memalloc.h" +#include "output.h" +#include "options.h" +#include "var.h" + +#if ARITH_BOR + 11 != ARITH_BORASS || ARITH_ASS + 11 != ARITH_EQ +#error Arithmetic tokens are out of order. +#endif + +static const char *arith_startbuf; + +const char *arith_buf; +union yystype yylval; + +static int last_token; + +#define ARITH_PRECEDENCE(op, prec) [op - ARITH_BINOP_MIN] = prec + +static const char prec[ARITH_BINOP_MAX - ARITH_BINOP_MIN] = { + ARITH_PRECEDENCE(ARITH_MUL, 0), + ARITH_PRECEDENCE(ARITH_DIV, 0), + ARITH_PRECEDENCE(ARITH_REM, 0), + ARITH_PRECEDENCE(ARITH_ADD, 1), + ARITH_PRECEDENCE(ARITH_SUB, 1), + ARITH_PRECEDENCE(ARITH_LSHIFT, 2), + ARITH_PRECEDENCE(ARITH_RSHIFT, 2), + ARITH_PRECEDENCE(ARITH_LT, 3), + ARITH_PRECEDENCE(ARITH_LE, 3), + ARITH_PRECEDENCE(ARITH_GT, 3), + ARITH_PRECEDENCE(ARITH_GE, 3), + ARITH_PRECEDENCE(ARITH_EQ, 4), + ARITH_PRECEDENCE(ARITH_NE, 4), + ARITH_PRECEDENCE(ARITH_BAND, 5), + ARITH_PRECEDENCE(ARITH_BXOR, 6), + ARITH_PRECEDENCE(ARITH_BOR, 7), +}; + +#define ARITH_MAX_PREC 8 + +static __dead2 void yyerror(const char *s) +{ + error("arithmetic expression: %s: \"%s\"", s, arith_startbuf); + /* NOTREACHED */ +} + +static arith_t arith_lookupvarint(char *varname) +{ + const char *str; + char *p; + arith_t result; + + str = lookupvar(varname); + if (str == NULL || *str == '\0') + str = "0"; + errno = 0; + result = strtoarith_t(str, &p, 0); + if (errno != 0 || *p != '\0') + yyerror("variable conversion error"); + return result; +} + +static inline int arith_prec(int op) +{ + return prec[op - ARITH_BINOP_MIN]; +} + +static inline int higher_prec(int op1, int op2) +{ + return arith_prec(op1) < arith_prec(op2); +} + +static arith_t do_binop(int op, arith_t a, arith_t b) +{ + + switch (op) { + default: + case ARITH_REM: + case ARITH_DIV: + if (!b) + yyerror("division by zero"); + if (a == ARITH_MIN && b == -1) + yyerror("divide error"); + return op == ARITH_REM ? a % b : a / b; + case ARITH_MUL: + return a * b; + case ARITH_ADD: + return a + b; + case ARITH_SUB: + return a - b; + case ARITH_LSHIFT: + return a << b; + case ARITH_RSHIFT: + return a >> b; + case ARITH_LT: + return a < b; + case ARITH_LE: + return a <= b; + case ARITH_GT: + return a > b; + case ARITH_GE: + return a >= b; + case ARITH_EQ: + return a == b; + case ARITH_NE: + return a != b; + case ARITH_BAND: + return a & b; + case ARITH_BXOR: + return a ^ b; + case ARITH_BOR: + return a | b; + } +} + +static arith_t assignment(int var, int noeval); + +static arith_t primary(int token, union yystype *val, int op, int noeval) +{ + arith_t result; + +again: + switch (token) { + case ARITH_LPAREN: + result = assignment(op, noeval); + if (last_token != ARITH_RPAREN) + yyerror("expecting ')'"); + last_token = yylex(); + return result; + case ARITH_NUM: + last_token = op; + return val->val; + case ARITH_VAR: + last_token = op; + return noeval ? val->val : arith_lookupvarint(val->name); + case ARITH_ADD: + token = op; + *val = yylval; + op = yylex(); + goto again; + case ARITH_SUB: + *val = yylval; + return -primary(op, val, yylex(), noeval); + case ARITH_NOT: + *val = yylval; + return !primary(op, val, yylex(), noeval); + case ARITH_BNOT: + *val = yylval; + return ~primary(op, val, yylex(), noeval); + default: + yyerror("expecting primary"); + } +} + +static arith_t binop2(arith_t a, int op, int prec, int noeval) +{ + for (;;) { + union yystype val; + arith_t b; + int op2; + int token; + + token = yylex(); + val = yylval; + + b = primary(token, &val, yylex(), noeval); + + op2 = last_token; + if (op2 >= ARITH_BINOP_MIN && op2 < ARITH_BINOP_MAX && + higher_prec(op2, op)) { + b = binop2(b, op2, arith_prec(op), noeval); + op2 = last_token; + } + + a = noeval ? b : do_binop(op, a, b); + + if (op2 < ARITH_BINOP_MIN || op2 >= ARITH_BINOP_MAX || + arith_prec(op2) >= prec) + return a; + + op = op2; + } +} + +static arith_t binop(int token, union yystype *val, int op, int noeval) +{ + arith_t a = primary(token, val, op, noeval); + + op = last_token; + if (op < ARITH_BINOP_MIN || op >= ARITH_BINOP_MAX) + return a; + + return binop2(a, op, ARITH_MAX_PREC, noeval); +} + +static arith_t and(int token, union yystype *val, int op, int noeval) +{ + arith_t a = binop(token, val, op, noeval); + arith_t b; + + op = last_token; + if (op != ARITH_AND) + return a; + + token = yylex(); + *val = yylval; + + b = and(token, val, yylex(), noeval | !a); + + return a && b; +} + +static arith_t or(int token, union yystype *val, int op, int noeval) +{ + arith_t a = and(token, val, op, noeval); + arith_t b; + + op = last_token; + if (op != ARITH_OR) + return a; + + token = yylex(); + *val = yylval; + + b = or(token, val, yylex(), noeval | !!a); + + return a || b; +} + +static arith_t cond(int token, union yystype *val, int op, int noeval) +{ + arith_t a = or(token, val, op, noeval); + arith_t b; + arith_t c; + + if (last_token != ARITH_QMARK) + return a; + + b = assignment(yylex(), noeval | !a); + + if (last_token != ARITH_COLON) + yyerror("expecting ':'"); + + token = yylex(); + *val = yylval; + + c = cond(token, val, yylex(), noeval | !!a); + + return a ? b : c; +} + +static arith_t assignment(int var, int noeval) +{ + union yystype val = yylval; + int op = yylex(); + arith_t result; + char sresult[DIGITS(result) + 1]; + + if (var != ARITH_VAR) + return cond(var, &val, op, noeval); + + if (op != ARITH_ASS && (op < ARITH_ASS_MIN || op >= ARITH_ASS_MAX)) + return cond(var, &val, op, noeval); + + result = assignment(yylex(), noeval); + if (noeval) + return result; + + if (op != ARITH_ASS) + result = do_binop(op - 11, arith_lookupvarint(val.name), result); + snprintf(sresult, sizeof(sresult), ARITH_FORMAT_STR, result); + setvar(val.name, sresult, 0); + return result; +} + +arith_t arith(const char *s) +{ + struct stackmark smark; + arith_t result; + + setstackmark(&smark); + + arith_buf = arith_startbuf = s; + + result = assignment(yylex(), 0); + + if (last_token) + yyerror("expecting EOF"); + + popstackmark(&smark); + + return result; +} + +/* + * The exp(1) builtin. + */ +int +expcmd(int argc, char **argv) +{ + const char *p; + char *concat; + char **ap; + arith_t i; + + if (argc > 1) { + p = argv[1]; + if (argc > 2) { + /* + * Concatenate arguments. + */ + STARTSTACKSTR(concat); + ap = argv + 2; + for (;;) { + while (*p) + STPUTC(*p++, concat); + if ((p = *ap++) == NULL) + break; + STPUTC(' ', concat); + } + STPUTC('\0', concat); + p = grabstackstr(concat); + } + } else + p = ""; + + i = arith(p); + + out1fmt(ARITH_FORMAT_STR "\n", i); + return !i; +} + Copied: projects/sv/bin/sh/arith_yacc.h (from r218708, head/bin/sh/arith_yacc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/sv/bin/sh/arith_yacc.h Tue Feb 15 16:09:08 2011 (r218709, copy of r218708, head/bin/sh/arith_yacc.h) @@ -0,0 +1,91 @@ +/*- + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 2007 + * Herbert Xu <herbert@gondor.apana.org.au>. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Kenneth Almquist. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define ARITH_ASS 1 + +#define ARITH_OR 2 +#define ARITH_AND 3 +#define ARITH_BAD 4 +#define ARITH_NUM 5 +#define ARITH_VAR 6 +#define ARITH_NOT 7 + +#define ARITH_BINOP_MIN 8 +#define ARITH_LE 8 +#define ARITH_GE 9 +#define ARITH_LT 10 +#define ARITH_GT 11 +#define ARITH_EQ 12 +#define ARITH_REM 13 +#define ARITH_BAND 14 +#define ARITH_LSHIFT 15 +#define ARITH_RSHIFT 16 +#define ARITH_MUL 17 +#define ARITH_ADD 18 +#define ARITH_BOR 19 +#define ARITH_SUB 20 +#define ARITH_BXOR 21 +#define ARITH_DIV 22 +#define ARITH_NE 23 +#define ARITH_BINOP_MAX 24 + +#define ARITH_ASS_MIN 24 +#define ARITH_REMASS 24 +#define ARITH_BANDASS 25 +#define ARITH_LSHIFTASS 26 +#define ARITH_RSHIFTASS 27 +#define ARITH_MULASS 28 +#define ARITH_ADDASS 29 +#define ARITH_BORASS 30 +#define ARITH_SUBASS 31 +#define ARITH_BXORASS 32 +#define ARITH_DIVASS 33 +#define ARITH_ASS_MAX 34 + +#define ARITH_LPAREN 34 +#define ARITH_RPAREN 35 +#define ARITH_BNOT 36 +#define ARITH_QMARK 37 +#define ARITH_COLON 38 + +union yystype { + arith_t val; + char *name; +}; + +extern union yystype yylval; + +int yylex(void); Copied: projects/sv/bin/sh/arith_yylex.c (from r218708, head/bin/sh/arith_yylex.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/sv/bin/sh/arith_yylex.c Tue Feb 15 16:09:08 2011 (r218709, copy of r218708, head/bin/sh/arith_yylex.c) @@ -0,0 +1,244 @@ +/*- + * Copyright (c) 2002 + * Herbert Xu. + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Kenneth Almquist. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <inttypes.h> +#include <stdlib.h> +#include <string.h> +#include "shell.h" +#include "arith_yacc.h" +#include "expand.h" +#include "error.h" +#include "memalloc.h" +#include "parser.h" +#include "syntax.h" + +#if ARITH_BOR + 11 != ARITH_BORASS || ARITH_ASS + 11 != ARITH_EQ +#error Arithmetic tokens are out of order. +#endif + +extern const char *arith_buf; + +int +yylex() +{ + int value; + const char *buf = arith_buf; + const char *p; + + for (;;) { + value = *buf; + switch (value) { + case ' ': + case '\t': + case '\n': + buf++; + continue; + default: + return ARITH_BAD; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + yylval.val = strtoarith_t(buf, (char **)&arith_buf, 0); + return ARITH_NUM; + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '_': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': + p = buf; + while (buf++, is_in_name(*buf)) + ; + yylval.name = stalloc(buf - p + 1); + memcpy(yylval.name, p, buf - p); + yylval.name[buf - p] = '\0'; + value = ARITH_VAR; + goto out; + case '=': + value += ARITH_ASS - '='; +checkeq: + buf++; +checkeqcur: + if (*buf != '=') + goto out; + value += 11; + break; + case '>': + switch (*++buf) { + case '=': + value += ARITH_GE - '>'; + break; + case '>': + value += ARITH_RSHIFT - '>'; + goto checkeq; + default: + value += ARITH_GT - '>'; + goto out; + } + break; + case '<': + switch (*++buf) { + case '=': + value += ARITH_LE - '<'; + break; + case '<': + value += ARITH_LSHIFT - '<'; + goto checkeq; + default: + value += ARITH_LT - '<'; + goto out; + } + break; + case '|': + if (*++buf != '|') { + value += ARITH_BOR - '|'; + goto checkeqcur; + } + value += ARITH_OR - '|'; + break; + case '&': + if (*++buf != '&') { + value += ARITH_BAND - '&'; + goto checkeqcur; + } + value += ARITH_AND - '&'; + break; + case '!': + if (*++buf != '=') { + value += ARITH_NOT - '!'; + goto out; + } + value += ARITH_NE - '!'; + break; + case 0: + goto out; + case '(': + value += ARITH_LPAREN - '('; + break; + case ')': + value += ARITH_RPAREN - ')'; + break; + case '*': + value += ARITH_MUL - '*'; + goto checkeq; + case '/': + value += ARITH_DIV - '/'; + goto checkeq; + case '%': + value += ARITH_REM - '%'; + goto checkeq; + case '+': + value += ARITH_ADD - '+'; + goto checkeq; + case '-': + value += ARITH_SUB - '-'; + goto checkeq; + case '~': + value += ARITH_BNOT - '~'; + break; + case '^': + value += ARITH_BXOR - '^'; + goto checkeq; + case '?': + value += ARITH_QMARK - '?'; + break; + case ':': + value += ARITH_COLON - ':'; + break; + } + break; + } + + buf++; +out: + arith_buf = buf; + return value; +} Modified: projects/sv/bin/sh/sh.1 ============================================================================== --- projects/sv/bin/sh/sh.1 Tue Feb 15 13:29:52 2011 (r218708) +++ projects/sv/bin/sh/sh.1 Tue Feb 15 16:09:08 2011 (r218709) @@ -32,7 +32,7 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102151609.p1FG99ow036912>