bsd-user: refresh freebsd system call numbers

Update FreeBSD system call numbers in freebsd/syscall_nr.h.

Reviewed-by: Ed Maste <emaste@freebsd.org>
bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code

This change adds HOST_VARIANT_DIR so the various BSD OS dependent
code can be seperated into its own directories rather than
using #ifdef's.   This may also allow an BSD variant OS to host
another BSD variant's executible as a target.
bsd-user: move strace OS/arch dependent code to host/arch dirs

This change moves host OS and arch dependent code for the sysarch
system call related to the -strace functionality into the
appropriate host OS and target arch directories.
bsd-user: move arch/OS dependent code out of main.c

This change moves the cpu initialization and main loop code from
main.c to the OS and arch dependent directories. This eliminates
many of the #ifdef's in main.c. The cpu initialization and loop
code is now located in the arch directory along with target arch
support code.
bsd-user: move arch/OS dependent code out of syscall.c

This change moves the system call handler for sysctl(2) and
sysarch(2) from syscall.c to the OS and arch dependent directories.
This eliminates many of the #ifdef's in syscall.c.  These system
call handlers are now located in the host os and target arch
directories.
bsd-user: add support for freebsd time related system calls

This change adds support or stubs for time related system calls
including nanosleep(2), clock_gettime(2), clock_settime(2),
clock_getres(2), gettimeofday(2), settimeofday(2), adjtime(2),
ntp_adjtime(2), ntp_gettime(2), utimes(2), lutimes(2), futimes(2),
futimesat(2), select(2), pselect(2), kqueue(2), kevent(2),
setitimer(2), getitimer(2), and the undocumented ktimer_*() calls.
bsd-user: add support for freebsd signal related system calls

This change adds support or stubs for signal related system calls
including sigtimedwait(2), sigaction(2), sigprocmask(2), sigpending(2),
sigsuspend(2), sigreturn(2), sigwait(2), sigwaitinfo(2), sigqueue(2),
sigaltstack(2), kill(2), killpg(2), and pdkill(2).
bsd-user: move arch/OS dependent code out of elfload.c

This change moves ELF and thread start up code from elfload.c to
the host OS and arch dependent directories.  This eliminates many
of the #ifdef's in elfload.c and moves the target arch and OS
dependent code into its own directories.
bsd-user: add support for freebsd process related system calls

This change add support or stubs for process related system calls
including fork(2), vfork(2), rfork(2), pdfork(2), execve(2),
fexecve(2), wait4(2), exit(2), getgroups(2), setgroups(2),
umask(2), setlogin(2), getlogin(2), getrusage(2), getrlimit(2),
setrlimit(2), getpid(2), getppid(2), getuid(2), geteuid(2),
getgid(2), getegid(2), setuid(2), seteuid(2), setgid(2),
setegid(2), getpgrp(2), setreuid(2), setregid(2), getresuid(2),
getresgid(2), getsid(2), setsid(2), issetugid(2), profil(2),
ktrace(2), setloginclass(2), getloginclass(2), pdgetpid(2),
jail*(2), cap_*(2), *audit*(2), utrace(2), ptrace(2),
getpriority(2), and setpriority(2).
bsd-user: add support for file system related system calls

This change adds support or stubs for file system (except stat)
related system calls including read(2), pread(2), readv(2),
write(2), pwrite(2), writev(2), pwritev(2),  open(2), openat(2),
close(2), closefrom(2), revoke(2), access(2), eaccess(2),
faccessat(2), chdir(2), fchdir(2), rename(2), renameat(2), link(2),
linkat(2), unlink(2), unlinkat(2), mkdir(2), mkdirat(2), rmdir(2),
__getcwd(), dup(2), dup2(2), truncate(2), ftruncate(2), acct(2),
sync(2), mount(2), nmount(2), symlink(2), symlinkat(2), readlink(2),
readlinkat(2), chmod(2), fchmod(2), lchmod(2), fchmodat(2), mknod(2),
mknodat(2), chown(2), fchown(2), lchown(2), fchownat(2), chflags(2),
lchflags(2), fchflags(2), chroot(2), flock(2), mkfifo(2),
mkfifoat(2), pathconf(2), lpathconf(2), fpathconf(2), undelete(2),
poll(2), lseek(2), pipe(2), swapon(2), swapoff(2),
the undocumented openbsd_poll() and freebsd6_*() system calls.
bsd-user: add support for stat, dir, and fcntl related syscalls

This change adds support or stubs for stat, directory, and file
control related system calls including stat(2), lstat(2),
fstat(2), fstatat(2), nstat(), nfstat(), nlstat(), getfh(2),
lgetfh(2), fhopen(2), fhstat(2), fhstatfs(2), statfs(2),
fstatfs(2), getfsstat(2), getdents(2), getdirentries(2), and
fcntl(2).
bsd-user: add support for memory management related syscalls

This change adds support or stubs for memory management related
system calls including mmap(2), munmap(2), mprotect(2), msync(2),
mlock(2), munlock(2), mlockall(2), munlockall(2), madvise(2),
minherit(2), mincore(2), shm_open(2), shm_unlink(2), shmget(2),
shmctl(2), shmat(2), shmdt(2), vadvise(), sbrk(), sstk(), and
freebsd6_mmap().
bsd-user: add support for socket related system calls

This change adds support or stubs for socket related system calls
including accept(2), bind(2), connect(2), getpeername(2),
getsockname(2), getsockopt(2), setsockopt(2), listen(2),
recvfrom(2), recvmsg(2), sendmsg(2), sendto(2), socket(2),
socketpair(2), shutdown(2), setfib(2), sctp_peeloff(2),
sctp_generic_sendmsg(2), sctp_generic_recvmsg(2), sendfile(2), and
freebsd4_sendfile(2).
bsd-user: add support for thread related system calls

This change adds support or stubs for thread related system calls
including thr_create(), thr_new(), thr_set_name(), thr_self(),
thr_suspend(), thr_wake(), thr_kill(), thr_kill2(),
rtprio_thread(2), getcontext(2), setcontext(2), swapcontext(2),
_umtx_lock(), _umtx_unlock(), and _umtx_op().
bsd-user: add support for the ioctl system call

This change adds support for the ioctl system call.  This uses
the generic thunking code to convert data between the host and
target CPU.
bsd-user: add support for extattr and ACL related syscalls

This change add support for extended attribute and Access
Control List (ACL) related system calls including extattrctl(),
extattr_set_file(2), extattr_delete_file(2), extattr_set_fd(2),
extattr_get_fd(2), extattr_delete_fd(2), extattr_get_link(2),
extattr_set_link(2), extattr_delete_link(2), extattr_list_fd(2),
extattr_list_file(2), extattr_list_link(2), __acl_aclcheck_fd(),
__acl_aclcheck_file(), __acl_aclcheck_link(), __acl_delete_fd(),
__acl_delete_file(), __acl_delete_link(), __acl_get_fd(),
__acl_get_file(), __acl_get_link(), __acl_get_fd(),
__acl_set_file(), and __acl_set_link().
bsd-user: add support for miscellaneous system calls

This change adds support or stubs for miscellaneous system calls
including extattr*() (extended attributes), __acl*() (access
control lists), sem*() (system V semaphores), msg*() (system V
messages), sched_*() (scheduler control), cpuset*() (CPU affinity
set management), mod*() and kld*() (kernel module), rctl_*()
(resource controls), __mac_*() (Mandatory Access Control),
posix_*() (additional posix support), and other miscellaneous
system calls.
bsd-user: add arm, mips and mips64 options to configure target-list

This change adds arm-bsd-user, mips-bsd-user, mips64-bsd-user,
mips64el-bsd-user, and mipsel-bsd-user as --target-list options to configure.
bsd-user: fix linking conflicts with FreeBSD libcrypto

FreeBSD has it's own AES_set_decrypt_key, etc. in libcrypto.  This
change fixes these conflicts and allows statically linking BSD
user mode qemu.
Merge remote-tracking branch 'remotes/sson-bsd-user/bsd-user' into bsd-user

Conflicts:
	bsd-user/main.c