Commit Graph

5830 Commits

Author SHA1 Message Date
hselasky
5309e52c3c MFC r276238:
Add proper Makefiles to build some infiniband example utilities.

Sponsored by:	Mellanox Technologies
2015-01-02 08:32:45 +00:00
ngie
d4c625976a MFC r264400,r265836:
r264400:

  NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
  and finish the job. ncurses is now the only Makefile in the tree that
  uses it since it wasn't a simple mechanical change, and will be
  addressed in a future commit.

r265836:

  Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
  what is needed.
2014-12-31 23:25:37 +00:00
ngie
b429a2bfd1 MFC r272343,r272458,r272890,r272891,r272901,r272902,r272903,r272905,r272908,r272909,r272910,r272914,r272915,r272979,r272980,r273010,r273011,r273012,r273015,r273017,r273019,r273020,r273021,r273022,r273023,r273024,r273025,r273389,r273390,r273391,r273393,r273395,r273396,r273397,r273410,r273516,r273517,r273520,r273521,r273522,r273523,r273524,r273525,r273526,r273527,r273528,r273529,r273530,r273533,r273534,r273535,r273536,r273537,r273538,r273539,r273540,r273572,r273574,r273578,r273579,r273591,r273592,r273928,r273933,r273935,r273936,r273937,r273938,r273942,r273943,r273945,r273946,r273947,r273948,r273949,r273950,r273951,r273952,r274061,r274062,r274066,r274067,r274072,r274074,r274079,r274090,r274142,r274143,r274571,r274572,r274573,r274574,r274575,r274576,r274577,r274579,r274597,r274598,r274599,r274600,r274601,r274626,r275033,r276046,r276430:
r272343:
r272458:

  Import the NetBSD test suite from ^/vendor/NetBSD/tests/09.30.2014_20.45 ,
  minus the vendor Makefiles

  Provide directions for how to bootstrap the vendor sources in
  FREEBSD-upgrade

  MFC after 2 weeks
  Discussed with: rpaulo
  Sponsored by: EMC / Isilon Storage Division

r272890:

  Only build/run hsearch_basic and hsearch_r_basic on NetBSD

  hdestroy1 is not present on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r272891:

  Expect SIGSEGV in lib/libc/stdlib/t_getenv:setenv_basic

  See bin/189805 for more details

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272901:

  Disable tests that don't pass on FreeBSD due to missing support in
  humanize_number(3). Bringing in additional revisions from NetBSD's
  humanize_number(3) will fix the tests

  Account for the fact that util.h on NetBSD is libutil.h on FreeBSD

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r272902:

  Add missing #include <sys/time.h> for gettimeofday

  Sponsored by: EMC / Isilon Storage Division

r272903:

  FreeBSD returns ENOTTY instead of EBADF in ttyname_r; mark it as an expected
  failure

  PR: 191936

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272905:

  FreeBSD doesn't support strings greater than MAXHOSTNAMELEN-1 in
  {get,set}{domain,host}name. Adjust the tests to not exceed that
  value when testing out the code

  Add a positive and negative test for MAXHOSTNAMELEN-1 and
  MAXHOSTNAMELEN, respectively

  PR: 181127
  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272908:

  Disable the invalid pointer test on FreeBSD

  FreeBSD segfaults on invalid pointers passed to getcwd because it throbs the
  address passed in in libc, whereas NetBSD just passes the information off to
  the syscall, which allows the kernel to return EFAULT on bad pointers.

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272909:

  Handle getting/setting niceness/priority correctly on FreeBSD vs NetBSD

  This might be fallout from PR: 189821

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r272910:

  SIGPWR does not exist on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r272914:

  Skip over t_spawn_open_nonexistent_diag because it requires NetBSD specific
  additions to posix_spawn

  Sponsored by: EMC / Isilon Storage Division

r272915:

  Port the testcase to FreeBSD

  - Make #include path to h_macros.h a non-relative path
  - __gl_stat_t is synonymous with struct stat on FreeBSD
  - FreeBSD doesn't have _DIRENT_RECLEN
  - Skip over glob_star on FreeBSD (testcase doesn't pass)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272979:

  Only #include <sys/tls.h> on NetBSD

  Sponsored by: EMC / Isilon Storage Division

r272980:

  #include libutil.h for fparseln on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273010:

  Implement 64MB memory limit for test to ensure that it fails reliably in
  600 seconds; it would previously fail inconsistently when run in some virtual
  machine configurations

  This patch might need to be reverted or revisited later (see the attached PR
  for more details)

  PR: 169302

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273011:

  Fix compilation errors with missing wide-type headers and fix compilation
  warnings with -Wformat

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273012:

  - Add libutil #include for fparseln
  - Change ATF_REQUIRE_EQ_MSG to ATF_CHECK_EQ_MSG to gather all failing results
    possible (currently 12 with leftassoc)
  - Mark leftassoc "atf_tc_expect_fail" on FreeBSD (PR coming soon after further
    analysis is done on the code)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273015:

  Expect nice_err to fail on FreeBSD with unprivileged users

  PR: 189821
  Sponsored by: EMC / Isilon Storage Division

r273017:

  Add #include <stdio.h> for printf

  Sponsored by: EMC / Isilon Storage Division

r273019:

  Do initial port of contrib/netbsd-tests/lib/libc/locale

  t_io:
  - Expect failures potentially related to implementation-specific knowledge of
  the zh_TW.Big5 locale [*]

  t_mbrtowc:
  - Handle unknown locales more gracefully (do not test if the locale doesn't
  exist)
  - Expect failure with mbrtowc_internal dealing with Japanese locales
  (potentially related to implementation detail knowledge of the ja_* locales) [*].

  t_mbstowcs, t_mbtowc, t_wctomb:
  - Handle unknown locales more gracefully (do not test if the locale doesn't
  exist)

  t_wcstod:
  - Treat FreeBSD like NetBSD and Linux in the XXX: FIXME section

  [*] More investigation is required to determine the root cause of the failures

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273020:

  memmem with NUL length "needle" (aka small) strings on FreeBSD/OSX returns
  NULL instead of the "haystack" value (aka big)

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273021:

  Use 1 as a random seed, as recommended in srandom(3). Adjust the random values
  accordingly

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273022:

  Add #include <stdio.h> to get sys_nerr definition

  Sponsored by: EMC / Isilon Storage Division

r273023:

  __isnanl is automatically picked according to data type in <math.h>. There
  isn't a need for the explicit __isnanl test

  Sponsored by: EMC / Isilon Storage Division

r273024:

  Only test the return value in mktime_negyear

  Testing for the errno is an optional requirement according to POSIX, and
  FreeBSD doesn't document that errno would be set on failure with mktime

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273025:

  Change ATF_REQUIRE_MSG calls to ATF_CHECK_MSG to get as many errors as possible

  t_strptime:common..
  - Expect the testcase body as a whole to fail. Multiple PRs will be filed to
  track the issues (there are 18 check failures)

  t_strptime:day..
  - %EA and %OA seem to be case insensitive on FreeBSD

r273389:

  Port lib/libc/gen/t_siginfo to FreeBSD

  - mcontext_t on FreeBSD doesn't have a __gregs field (it's split out on FreeBSD
  into separate fields). In order to avoid muddying the test code with MD code,
  the debugging trace info has not been implemented
  - FreeBSD does not implement the si_stime and si_utime fields in siginfo_t, so
  omit the debugging code that dumps the values
  - sys/inttypes.h doesn't exist on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273390:

  libutil.h is required for fparseln on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273391:

  Add missing #include for sys/stat.h for fchmod

  Sponsored by: EMC / Isilon Storage Division

r273393:

  Port t_write to FreeBSD

  - Mark the signo variable for the signal handle __unused
  - Use limits.h instead of sys/syslimits.h (the latter does not
  exist on FreeBSD)

  Sponsored by: EMC / Isilon Storage Division

r273395:

  Mark osi __unused so this compiles cleanly on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273396:

  unlink("/") fails with EISDIR instead of EBUSY on FreeBSD; test for that
  instead

  Sponsored by: EMC / Isilon Storage Division

r273397:

  Port t_chroot to FreeBSD

  - Add missing #include sys/stat.h for mkdir(2)
  - Omit the fchroot(2) tests because the support is not present on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273410:

  Add sys/socket.h #include for bind(2), et al

  Sponsored by: EMC / Isilon Storage Division

r273516:

  Add netinet/in.h for struct sockaddr_in

  Sponsored by: EMC / Isilon Storage Division

r273517:

  Expect getgroups_err to fail on FreeBSD

  PR: 189941
  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273520:

  Port t_pipe2.c to FreeBSD

  - Omit the pipe2_nosigpipe testcase on FreeBSD (FreeBSD doesn't have
    O_NOSIGPIPE).
  - Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)".
  - Save and restore the resource limit on the number of files (RLIMIT_NOFILE).

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273521:

  Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)"

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273522:

  - Mark unused parameters __unused in handler
  - Call sigqueue with getpid() instead of 0 -- the latter idiom appears to only
  be valid on NetBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273523:

  Add limits.h #include for LINE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273524:

  Add sys/socket.h #include for struct sockaddr_in

  Sponsored by: EMC / Isilon Storage Division

r273525:

  Port t_mmap.c to FreeBSD

  - Add needed headers for the testcases
  - Omit mmap_block on non-NetBSD OSes
  - Use "security.bsd.map_at_zero" instead of "vm.user_va0_disable"

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273526:

  Omit the pollts testcases on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273527:

  Omit all of the testcases as revoke(2) is only implemented on devfs(5)

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273528:

  Mark signo __unused in handler(..)

  Sponsored by: EMC / Isilon Storage Division

r273529:

  - Omit the poll testcases on FreeBSD (they require pollts)
  - Add necessary headers for the testcases

  Sponsored by: EMC / Isilon Storage Division

r273530:

  Add limits.h #include for INT_MAX

  Sponsored by: EMC / Isilon Storage Division

r273533:

  Use <atf_srcdir>/truncate_test.root_owned instead of /usr/bin/fpr as fpr does
  not exist on FreeBSD

  truncate_test.root_owned will be generated at build time and owned by root

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273534:

  - Mark sig/signo __unused
  - Do not provide a relative path via #include "h_macros.h"

  Sponsored by: EMC / Isilon Storage Division

r273535:

  - Omit setrlimit_nthr testcase on FreeBSD (requires lwp.h, et al)
  - Expect overflow with rlim_max at INT64_MAX, not UINT64_MAX (rlim_t is int64_t
  on FreeBSD)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273536:

  Add limits.h #include for SSIZE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273537:

  Add limits.h #include for SSIZE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273538:

  Fix a typo (__FreeBSD__ -> __NetBSD__ when omitting setrlimit_nthr)

r273539:

  Mark signum __unused

  Sponsored by: EMC / Isilon Storage Division

r273540:

  Omit the mprotect_exec testcase on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273572:

  - Ignore EINVAL check with mknod(path, S_IFCHR, -1) as the testcase is always
    executed on a non-devfs filesystem
  - Expect mknod(path, S_IFREG, 0) to fail on FreeBSD

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273574:

  - Test for EINVAL requirement when passing an invalid flag in to msync(2)
  - Expect ENOMEM instead of EFAULT when msync'ing a previously munmap'ed region
    on FreeBSD

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273578:

  - Add inttypes.h and stdint.h in lieu of int_limits.h from NetBSD
  - Use #include "h_macros.h" instead of relative path analog

  Sponsored by: EMC / Isilon Storage Division

r273579:

  - Mark signo __unused in the signal handler function
  - Effectively #if 0 out some code that does not fail on FreeBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273591:

  Correct my previous commit:

  - getrusage_utime_back succeeds reliably on FreeBSD
  - getrusage_utime_zero passes/fails in a seemingly non-deterministic manner.
    Skip it for now (and fix it later)

  In the initial port of this testcase to FreeBSD, the results failed reliably
  in the same manner as it does on NetBSD

  Sponsored by: EMC / Isilon Storage Division

r273592:

  - Add sys/types.h for the APIs in sys/sysctl.h
  - Poke at VM_MIN_ADDRESS in machine/vmparam.h because FreeBSD doesn't have a
    vm.minaddress sysctl analog
  - Expect ENOMEM instead of EAGAIN in mlock_limits
  - Provide mlock an mmap'ed page twice to simulate MAP_WIRED on NetBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273928:

  Put mtree test files into a subdirectory.

  Kyua 0.11 points TMPDIR to the test's work directory, and atf_check creates
  auxiliary files in TMPDIR.  This confuses a couple of mtree tests that were
  using the work directory's root to validate the contents of the directory.

  Fix the two affected tests by creating an auxiliary directory to use for
  the mtree tests.  (Kyua should probably do this on its own; filed bug #133
  upstream to take a look at this.)

r273933:

  Don't prune duplicate services in the expected output from /etc/services on
  FreeBSD

  Submitted by: pho

r273935:

  Port tests to FreeBSD/Linux

  Some of the testcases don't work outside of NetBSD, and the behavior of
  ether_aton_r differs between FreeBSD, Linux, and NetBSD, and the calls to the
  API need to be massaged for FreeBSD and Linux.

  Submitted by: pho

r273936:

  Port lib/libc/net/h_dns_server to FreeBSD

  Submitted by: pho

r273937:

  Port lib/libc/sys/t_dup to FreeBSD/Linux

  - The requirements differ between FreeBSD/Linux when dealing with oldd/newd
    being equal (both fail with EINVAL, not EBADF)
  - Add an EBADF testcase
  - Fix compilation issues on clang

  In collaboration with: pho

r273938:

  getitimer on FreeBSD returns the last set time instead of the remaining time;
  test for that instead

  Submitted by: pho

r273942:

  Skip :sethostname_basic because it messes up the test host's hostname

  Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__

r273943:

  Port t_kevent to FreeBSD

  Submitted by: pho

r273945:

  Port t_mincore to FreeBSD

  Mark :mincore_resid as atf_tc_expect_fail on FreeBSD because of new bug
  discovered in running the tests (it succeeded from earlier on in the year to
  September/October on FreeBSD, at least)

  Submitted by: pho

r273946:

  Port h_atexit to FreeBSD

  __cxa_atexit varies between FreeBSD and NetBSD, and thus we must use pointers
  instead of static fields in the BSS. More extensive discussion is included in
  the source code

  In collaboration with: kib
  Submitted by: pho

r273947:

  Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes

r273948:

  Disable testcases 12 and 15-22 on FreeBSD

  Submitted by: pho

r273949:

  Add new atf_tc_expect_fail to fflush_err; this is a new (within the past couple months) bug

r273950:

  Skip :fopen_regular on !NetBSD because it's a NetBSD specific test

  Submitted by: pho

r273951:

  Expect :sscanf_whitespace to fail on !NetBSD OSes

  Submitted by: pho

r273952:

  Port h_hash and t_sha2 to FreeBSD

  t_sha2 contains dirty copy-paste hacks that need to be fixed with the openssh
  OpenBSD compat layer

  Submitted by: pho

r274061:

  Port t_db.sh to FreeBSD

  - The blocksize on FreeBSD is 32kB, not 64kB
  - Add some detection for MK_DICT == no; /nonexistent is echoed along with
    atf_skip to ensure that the test will fail if dict(..) is called in the
    non-final stage of the pipeline

  Submitted by: pho

r274062:

  inet_network on FreeBSD returns NULL when provided "0x" to inet_network

  Submitted by: pho

r274066:

  Port lib/libc/ssp to FreeBSD

  In most cases, the buffers and data were resized, but when dealing with the
  helpers, some of the code was adjusted to fail more reliably

  Submitted by: pho

r274067:

  rpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
  like NetBSD

  Submitted by: pho

r274072:

  Finish off lib/libc/stdlib/t_strtod.c port by checking for "y" twice on
  FreeBSD, and always assume long long double exists on FreeBSD

  Submitted by: pho

r274074:

  Add Makefile snippet to ease porting NetBSD testcases to FreeBSD from
  contrib/netbsd-tests

  This Makefile snippet handles polluting testcases with -lnetbsd, specific
  headers for ATF version differences, and does necessary rewriting for the
  testcases to match the format discussed on the TestSuite wiki page
  (t_<foo> -> <foo>_test)

  One must define SRCTOP (inspired by projects/bmake), OBJTOP, and TESTSRC
  (e.g. contrib/netbsd-tests/lib/libc/gen) to use the Makefile snippet

  Test programs are specific either via NETBSD_ATF_TESTS_C or NETBSD_ATF_TESTS_SH

  C++ analogs aren't currently implemented.

  The imported testcases will be cleaned up to use this Makefile snippet pseudo
  "API".

r274079:

  Import proper fix for misc/49356 (/usr/include/atf-c/config.h) after atf-c/config.h
  was removed from the build

  Pointyhat to: me (again, for not running make delete-old after running test builds)

r274090:

  Fix the Jenkins test run by skipping the negative testcases earlier

  The problem is that lib.libc.locale.t_io:bad_big5_wprintf was printing out
  illegal Unicode characters, which causes XML parsers to bail immediately, e.g.

  % kyua report-junit > ~/report.junit
  % python2 -c 'import xml.dom.minidom as md; md.parse("/home/ngie/report.junit")'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
      return expatbuilder.parse(file)
    File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
      result = builder.parseFile(fp)
    File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
      parser.Parse(buffer, 0)
  xml.parsers.expat.ExpatError: not well-formed (invalid token): line 27137, column 13

r274142:

  Remove expected failure from lib.libc.sys.t_mincore:mincore_resid

  The failure was added based on observation seen on 11.0-CURRENT @ r273153, not
  based on internal testing at EMC/Isilon

  PR: 194829
  Tested with the following configuration:
  - amd64/i386
  - 11.0-CURRENT @ r273153
  - 100 times in a tight loop as root with the following commands...
  -- kyua test lib/libc
  -- kyua test lib/libc/sys
  -- kyua test lib/libc/sys/mincore_test

r274143:

  Expect lib.libc.sys.getcontext_test.setcontext_link to fail on amd64; add
  additional debugging to make the underlying problem more visible

  Calling setcontext(2) on amd64 as shown in the test program is failing on
  amd64, not i386, with a return code of -1 and an errno of EINVAL

  Further investigation is being done in the PR to determine the root cause for
  the failure

  PR: 194828
  Tested with the following configuration:
  - amd64/i386
  - 11.0-CURRENT @ r273153
  - 100 times in a tight loop as root with the following commands...
  -- kyua test lib/libc
  -- kyua test lib/libc/sys
  -- kyua test lib/libc/sys/getcontext_test

r274571:

  Use _exit instead of exit so the file descriptors aren't flushed twice in the
  child processes

  Submitted by: pho

r274572:

  Only expect timeouts on powerpc with NetBSD

  Submitted by: pho

r274573:

  Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD

  PR: 191906
  In collaboration with: pho

r274574:

  Add pthread_np.h #include and initialize the pthread attribute on FreeBSD

  Submitted by: pho

r274575:

  #ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
  the output from the helper program

  Submitted by: pho

r274576:

  Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c

  Submitted by: pho
  In collaboration with: kib

r274577:

  Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h

r274579:

  Call sem_unlink on semaphores before attempting to create them

  Due to the lack of uniqueness in the semaphore name, and the fact that the
  tests don't have cleanup routines, an interrupted test can leave a semaphore
  "laying around", causing all subsequent attempts to run the test to fail

  I will file a NetBSD PR for this issue soon

r274597:

  Skip the long-double epsilon checks on FreeBSD/i386

  Sponsored by: EMC / Isilon Storage Division

r274598:

  Reset errno to 0 before running scalbn to be sure that the tested errno is
  valid

  Sponsored by: EMC / Isilon Storage Division

r274599:

  Alias isinff to isinf on FreeBSD

  isinf on FreeBSD automatically picks the appropriate type per math.h

  Sponsored by: EMC / Isilon Storage Division

r274600:

  - Expect exp2_powers to fail on FreeBSD/i386
  - Expect exp2_values to fail on FreeBSD due to the small epsilon

  Sponsored by: EMC / Isilon Storage Division

r274601:

  - Skip over the testcases that call cbrtl on platforms where LDBL_PREC == 53
  (arm, mips, powerpc). This fixes the build on these platforms, based on some
  ad hoc tinderbox runs I did a while ago
  - Skip cast the arguments to powl as long double so powl properly interprets
  those arugments at compile-time when picking the type

  Sponsored by: EMC / Isilon Storage Division

r274626:

  Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) with
  their #ifdef equivalents for everything changed in contrib/netbsd-tests. There
  are some items from the vendor tree that use #if defined(__FreeBSD__) or
  #if defined(__NetBSD__) which are being left alone

  Requested by: bde, rpaulo
  Sponsored by: EMC / Isilon Storage Division

r275033:

  Only pass 6 arguments to the 'run' function on amd64.  amd64's
  makecontext on FreeBSD only supports a maximum of 6 arguments.  This
  fixes the setcontext_link test on amd64.

  PR:		194828

r276046:

  Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to
  stable/10

  It was added when __FreeBSD_version was ~1100027

r276430:

  Expect access_test:access_inval to fail before __FreeBSD_version == 1100033

  This will allow me to MFC the test, as jilles@ requested that I don't MFC the
  access(2) KBI change to 10-STABLE in r271655
2014-12-31 20:13:31 +00:00
dim
155ee9c2f7 MFC r276346:
In contrib/binutils/gas/config/tc-ppc.c, fix a few -Wformat-security
warnings.
2014-12-31 16:28:16 +00:00
pfg
a8909671a4 MFC r276229:
Backport fix for binutils 11867: .quad directive not assembled correctly

Alan Modra (and Alan's employer) graciously permitted use of his patch
under GPLv2.

Obtained from:	OpenBSD
2014-12-31 04:51:09 +00:00
delphij
48f640fb39 MFC r275698: MFV r275696: file 5.21. 2014-12-30 19:39:31 +00:00
pfg
80b8a49df4 MFC r276228:
gas: use memmove instead of bogus memcpy.

partial_where points into the buffer that begins with buffer_start
so we need to use memmove() to handle the overlap.
Fixes Sourceware-PR 11456.

Obtained from:	OpenBSD (CVS rev. 1.2)
2014-12-29 22:54:28 +00:00
ngie
8add61763b MFC bmake changes to stable/10 (r255285,r255916,r258113,r258114,r261212,r266760,r268437)
Discussed with: sjg

r255285:

  If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
  into the job queue.
  This avoids closing down an entire build on failure of one branch.
  Probably has no use outside the context of universe/tinderbox.

  Reviewed by:	obrien

r255916:

  Fix Fx syntax.

  PR: 182269
  Approved by: re@

r258113:

  Avoid SEGV when passed NULL for list

r258114:

  Don't SEGV when Hash_Table is uninitialized

r261212:

  Merge bmake-20140101 from vendor

r266760:

  Portmgr no longer need the UL hack.

  Reviewed by: obrien

r268437:

  Update to bmake-20140620
  Main change is detection of malformed variable references.

  Reviewed by:	obrien
2014-12-27 16:43:22 +00:00
ian
47ae056841 MFC r276045:
Allow -march=armv7a on the gcc command line, for compatibility with clang.
2014-12-27 05:24:18 +00:00
delphij
77f68eb34a MFC r276071:
Fix multiple ntp vulnerabilities.

Reviewed by:	roberto (earlier revision), philip
Security:	CVE-2014-9293, CVE-2014-9294
Security:	CVE-2014-9295, CVE-2014-9296
Security:	FreeBSD-SA-14:31.ntp
2014-12-22 19:07:16 +00:00
ngie
dc3ad5131f MFC r273929:
r273929 (by jmmv):

  MFV: Import atf-0.21.
2014-12-21 08:30:18 +00:00
dim
4e01cb7539 MFC r275759:
Pull in r221170 from upstream clang trunk (by Roman Divacky):

  Implement vaarg lowering for ppc32. Lowering of scalars and
  aggregates is supported. Complex numbers are not.

This adds va_args support for PowerPC (32 bit) to clang.

Reviewed by:	jhibbits
Differential Revision: https://reviews.freebsd.org/D1308
2014-12-17 21:36:45 +00:00
delphij
18a8a69694 MFC r275852: MFV r275844:
Fix unbound remote denial of service vulnerability.

Security:	FreeBSD-SA-14:30.unbound
Security:	CVE-2014-8602
Approved by:	so
2014-12-17 06:58:00 +00:00
andrew
8889da9263 MFC 275337:
There is no need to use FUNC_END with aeabi_ldiv0 or aeabi_idiv0 as they
are aliases.

Sponsored by:	ABT Systems Ltd

MFC 275380:

Use the floating-point instruction on ARMv7 as the clang 3.5 integrated
assembler doesn't allow these two instructions to use co-processor 11.

Sponsored by:	ABT Systems Ltd
2014-12-14 18:01:09 +00:00
andrew
ab2a78a144 MFC 275415:
Allow the UAL APSR_nzcv format for the mrc and mrc2 instructions. The clang
integrated assembler only allows these forms so binutils will need to
support them.

Sponsored by:	ABT Systems Ltd

MFC 275584:

Fix mrc and mrc2 with APSR_nzcv. Binutils encodes it internally as 0 where
we need it to be set to 15 for it to be equivalent to r15.

Sponsored by:	ABT Systems Ltd
2014-12-14 17:38:43 +00:00
andrew
23e47daf28 MFC 275336:
Use llabs when getting the absolute value of a long long.

Sponsored by:	ABT Ststems Ltd
2014-12-14 17:28:02 +00:00
dim
3156db9097 MFC r275633:
Pull in r223171 from upstream llvm trunk (by Michael Zolotukhin):

  PR21302. Vectorize only bottom-tested loops.

  rdar://problem/18886083

This fixes a bug in the llvm vectorizer, which could sometimes cause
vectorized loops to perform an additional iteration, leading to possible
buffer overruns.  Symptoms of this, which are usually segfaults, were
first noticed when building gcc ports, here:

https://lists.freebsd.org/pipermail/freebsd-ports/2014-September/095466.html
https://lists.freebsd.org/pipermail/freebsd-toolchain/2014-September/001211.html

Since this fix is very important for ports, bump __FreeBSD_version to
make it easier for port maintainers to test whether the fix has been
applied.

Upstream PR:	http://llvm.org/PR21302
2014-12-13 12:14:26 +00:00
dim
76a5c6a0d7 MFC r275477:
Pull in r174303 from upstream gcc trunk (by Jason Merrill):

  PR c++/48211
  * name-lookup.h (cp_class_binding): Make base a pointer.
  * name-lookup.c (new_class_binding): Adjust.
  (poplevel_class): Adjust.

This fixes a potential segfault when compiling gold, a part of the
devel/binutils port, with gcc.  See also the upstream bug report:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48211

Thanks to Jason Merrill, Tom Callaway and Red Hat legal for approving
the use of this patch under the GNU GPL, version 2 or later.
2014-12-11 08:05:59 +00:00
delphij
b24390d7fc MFC r275666:
Fix multiple vulnerabilities in file(1) and libmagic(3).

Security:	FreeBSD-SA-14:28.file
Security:	CVE-2014-3710, CVE-2014-8116, CVE-2014-8117
2014-12-10 08:26:53 +00:00
dim
ace7dfdc9c MFC r275386:
Let GNU ld be less obscure about missing symbols and DSOs.  If the BFD
object looks like a typical shared library, suggest adding '-l<foo>',
where <foo> has the 'lib' prefix and '.so<bar>' or '.a' suffix removed.

Otherwise, suggest adding '-l:<foo>', where <foo> is the full DT_SONAME.

Submitted by:	Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by:	EMC / Isilon storage division
Reviewed by:	emaste
PR:		194296
Differential Revision: https://reviews.freebsd.org/D1152
2014-12-09 07:15:53 +00:00
ngie
dabf881564 MFC r274365:
Revert WiP to contrib/tzcode accidentally committed with r274364
2014-12-05 12:25:36 +00:00
ngie
32112cfc28 MFC r274364:
Add baud rate support to telnet(1)

  This implements part of RFC-2217

  It's based off a patch originally written by Sujal Patel at Isilon, and
  contributions from other Isilon employees.

  PR: 173728
  Phabric: D995
  Reviewed by: markj, markm
  Sponsored by: EMC / Isilon Storage Division
2014-12-05 12:23:29 +00:00
ngie
2ceba1b134 MFC r272057,r272083,r272084,r272087,r274016:
r272057:

  Import pjdfstest from ^/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91

  - Remove tools/regression/pjdfstest
  - Add upgrade directions for contrib/pjdfstest
  - Add a note to UPDATING for the move (the reachover Makefiles are coming
    soon)

  Functional differences:
  - ftruncate testcases are added from upstream (github)

  Non-functional differences:
  - The copyright for the project has been updated to 2012
  - pjd's contact information has been updated

  Discussed with: -testing, jmmv, pjd
  Sponsored by: EMC / Isilon Storage Division

r272083:

  Expect ELOOP on Darwin/Linux with "O_NOFOLLOW was specified and the target is a
  symbolic link" case. Assume EMLINK on the rest of the OSes (FreeBSD, Solaris,
  etc)

  Sponsored by: EMC / Isilon Storage Division

r272084:

  Fix the executed testplan count

  Sponsored by: EMC / Isilon Storage Division

r272087:

  Increase the memory disk size in the following testcases to avoid mount
  failures, which would cause cascade failures in the rest of the test
  run:

  link/15.t, open/19.t, mkdir/11.t, mkfifo/11.t, symlink/11.t

  Fail quickly in all of the testcases if mdconfig, mount, umount, etc
  fails to avoid issues similar to this in the future

  Submitted by: Casey Peel <cpeel@isilon.com>
  Sponsored by: EMC / Isilon Storage Division

r274016:

  Integrate pjdfstest test suite execution into kyua

  pjdfstest execution is opt-in and must be done as root due to some of the
  assumptions made by the test suite and lack of error checking in the non-root
  case

  A description of how to execute pjdfstest with kyua is provided in
  share/pjdfstest/README

  Phabric: D824 (an earlier prototype patch)
  Relnotes: yes
  Sponsored by: EMC / Isilon Storage Division
2014-12-05 11:44:18 +00:00
delphij
7fa7d519b4 MFC r274370:
Rename variable name from 'index' to 'idx' to avoid shadowing index(3).

Noticed by:	dim
2014-12-04 23:27:29 +00:00
dim
c882aa6bee MFC r275366:
Pull in r209785 from upstream libc++ trunk (by Marshall Clow):

  Fix a problem exposed by r208825, which caused bind (and other bits of
  libc++) to stop working. And tests

This fix is needed to support clang 3.5.0 and higher, which are more
strict about forming pointer-to-function types with cv-qualifiers or
ref-qualifiers.  See also the upstream PR <http://llvm.org/PR19742> and
<http://llvm.org/viewvc/llvm-project?rev=208825&view=rev>

Reported by:	amdmi3
2014-12-04 01:21:56 +00:00
hselasky
405a965719 MFC r275328 and r275330:
Add missing libraries when linking and fix building of some infiniband
utilities by updating some header file locations and compiler include
directives.

Sponsored by:	Mellanox Technologies
2014-12-03 09:08:04 +00:00
hselasky
77aefe28be MFC r275109:
Add support for 64-byte CQE size.

Sponsored by:	Mellanox Technologies
2014-11-29 04:18:56 +00:00
hselasky
f188d6b61c MFC r273774:
Make some infiniband example utilities easily buildable:
- Add new Makefiles.
- Add more include directories when building.
- Fixed a printf() formatting string.

Sponsored by:	Mellanox Technologies
2014-11-26 09:37:35 +00:00
dim
b7c69c9f14 MFC r274856:
Avoid undefined behaviour in gas's rotate_left() macro for n == 0.
Otherwise, clang can effectively remove the first iteration of the for
loops where this macro is invoked, and as a result, "cmp r0, #99" fails
to assemble.

Obtained from:	joerg at netbsd
2014-11-25 12:58:21 +00:00
dim
a37b4354f2 MFC r274846:
Fix the following -Werror warning from clang 3.5.0, while building
usr.bin/cpio on amd64 (or any arch with 64-bit time_t):

contrib/libarchive/cpio/cpio.c:1143:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
	if (abs(mtime - now) > (365/2)*86400)
	    ^
contrib/libarchive/cpio/cpio.c:1143:6: note: use function 'labs' instead
	if (abs(mtime - now) > (365/2)*86400)
	    ^~~
	    labs
1 error generated.

This is because time_t is a long on amd64. To avoid the warning, just
copy the equivalent test from a few lines before, which is used in the
Windows case, and which is type safe.

Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D1198
2014-11-25 12:19:05 +00:00
dim
a243faf2d2 MFC r274442:
Pull in r221709 from upstream llvm trunk (by Frédéric Riss):

  Totally forget deallocated SDNodes in SDDbgInfo.

  What would happen before that commit is that the SDDbgValues associated with
  a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep
  a map entry keyed by the SDNode pointer pointing to this list of invalidated
  SDDbgNodes. As the memory gets reused, the list might get wrongly associated
  with another new SDNode. As the SDDbgValues are cloned when they are transfered,
  this can lead to an exponential number of SDDbgValues being produced during
  DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893

  Note that the previous behavior wasn't really buggy as the invalidation made
  sure that the SDDbgValues won't be used. This commit can be considered a
  memory optimization and as such is really hard to validate in a unit-test.

This should fix abnormally large memory usage and resulting OOM crashes
when compiling certain ports with debug information.

Reported by:	Dmitry Marakasov <amdmi3@amdmi3.ru>
Upstream PRs:	http://llvm.org/PR19031 http://llvm.org/PR20893

MFC r274483:

The fix imported into llvm in r274442 contains some C++11 constructs,
which gcc in base cannot handle.  Replace these with C++98 equivalents.

While here, add the patch for the adapted fix.

Reported by:	bz, kib
Pointy hat to:	dim
2014-11-19 07:24:43 +00:00
edwin
7fb42ed981 MFC of 274559,tzdata2014j
Release 2014j - 2014-11-10 17:37:11 -0800

  Changes affecting current and future time stamps

    Turks & Caicos' switch from US eastern time to UTC-4 year-round
    did not occur on 2014-11-02 at 02:00.  It's currently scheduled
    for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)

  Changes affecting past time stamps

    Many pre-1989 time stamps have been corrected for Asia/Seoul and
    Asia/Pyongyang, based on sources for the Korean-language Wikipedia
    entry for time in Korea.  (Thanks to Sanghyuk Jung.)  Also, no
    longer guess that Pyongyang mimicked Seoul time after World War II,
    as this is politically implausible.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Africa/Addis_Ababa, Africa/Asmara,
    Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala,
    Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and
    Indian/Mayotte.

  Changes affecting commentary

    The commentary is less enthusiastic about Shanks as a source,
    and is more careful to distinguish UT from UTC.
2014-11-16 04:02:50 +00:00
delphij
0f3a386fcd MFC r274383:
Test errno against EEXIST as well.
2014-11-14 18:30:20 +00:00
dim
5947d7353b MFC r274286:
Pull in r201784 from upstream llvm trunk (by Benjamin Kramer):

  AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.

  There is code in the wild that relies on $0 not being expanded.

This fixes some cases of using $ signs in literals being incorrectly
assembled.

Reported by:	Richard Henderson
Upstream PR:	http://llvm.org/PR21500

MFC r274294:

Add llvm patch corresponding to r274286.
2014-11-11 08:00:49 +00:00
delphij
b671144801 MFV r273747:
Remove an extra copy of hv_kvp_daemon(8) [1].

While I'm there also correct typos in OptionalObsoleteFiles and add
information of the command line options for hv_kvp_daemon(8).

Reported by:	jmg [1]
Reviewed by:	jmg
2014-11-11 05:55:37 +00:00
delphij
1a1a1d96c4 MFC r273619: MFV r273617: netcat from OpenBSD 5.6. 2014-11-08 00:55:06 +00:00
delphij
0f8e09dd9f MFC r273498: MFV r273494: xz 5.0.7. 2014-11-08 00:49:45 +00:00
des
39bef15648 [SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2).
[SA-14:26] Fix remote command execution in ftp(1).

Approved by:	so (des)
2014-11-04 23:29:57 +00:00
brooks
7f7167d476 MFC r273796
Import in latest mtree from NetBSD to fix a bug in parsing group files
that jmg fixed upstream.

Sponsored by:	DARPA, AFRL
2014-11-04 22:47:51 +00:00
pluknet
39f6ac9066 MFC r261271:
Ressurect the local change documenting
  authpf's requirement for a mounted fdescfs(5).

PR:		docs/186250
2014-10-29 09:32:36 +00:00
edwin
b6479f2e37 MFC of 273718, tzdata2014i
Upgrade to 2014i

Lots of historical data

Pacific/Fiji will go into DST from 2014-11-02 to 2015-01-18
Pacific/Bougainville will go from UTC+10 to UTC+11.
Europe/Minsk will go from FET to MSK.
2014-10-27 06:05:40 +00:00
des
f034b440f1 MFH (r273273): Merge upstream r825: fix line continuation in whitespace 2014-10-20 08:59:30 +00:00
antoine
3da91303cf Restore ABI compatibility with 10.0-RELEASE, so that stable/10 users can use
official freebsd packages
2014-10-19 12:11:25 +00:00
emaste
9ea4006705 MFC r257302 by rea:
binutils/bfd: fix printf-like format strings for "bfd *" arguments

  There is a special format argument '%B' that directly handles values
  of type 'bfd *', they must be used instead of '%s'.  Manifestations
  of this bug can be seen in ld(1) error messages, for example,
    http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
    http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html
2014-10-17 16:23:36 +00:00
cy
2e9b5f450d MFC r271978
ipfilter bug #552 destination port not zero after parsing nat rule.

Obtained from:	netbsd CVS repo (r1.4), ipfilter CVS repo (r1.38)
2014-10-12 17:03:47 +00:00
cy
23579b38ee MFC r271977
3561691 gethost never returns an ipv6 address

Obtained from:	ipfilter CVS repo (r1.34), netbsd CVS repo (r1.4)
2014-10-12 16:58:45 +00:00
cy
60a2447c51 MFC r271974
ipfilter bug #551 ipf.conf address structure not properly zero filled.

Obtained from:	ipfilter CVS repo (r1.37), netbsd CVS repo (r1.3)
2014-10-12 16:55:26 +00:00
cy
ba88b262c3 MFC r271972
Fix ipfilter bug #536 ipnat can try to print rule as dstlist incorrectly.

Obtained from:	ipfilter CVS repo (r1.14), netbsd CVS repo (r1.3)
2014-10-12 16:51:02 +00:00
cy
e95de0dcc5 MFC r271971
Fix ipfilter bug #553 gethost needs to zero entire IP address structure.

Obtained from:	ipfilter CVS repo (r1.11)
2014-10-12 16:48:22 +00:00
cy
40f9831d42 MFC r271970
ipv6 address for test.hosts.dots in wrong byte order.

Obtained from:	ipfilter CVS repo (r1.11), netbsd CVS repo (r1.5)
2014-10-12 16:46:03 +00:00
rodrigc
b9241c62af Merge: r272769
Import byacc 20141006

PR: 193499
2014-10-11 19:38:29 +00:00
rodrigc
a4222aadd6 Merge: 272655
Import byacc 20141005 from vendor
2014-10-11 19:34:41 +00:00
rodrigc
e054537bc7 Merge: r272649
use calloc in get_line() when allocating line to ensure it is fully initialized,
 fixes a later uninitialized value in copy_param() (FreeBSD #193499).

PR: 193499
Submitted by: Thomas E. Dickey  <tom@invisible-island.net>
2014-10-11 19:28:22 +00:00
rodrigc
6fdcea3e5e Merge: r268811
Update to byacc 20140715

PR:             191020
Submitted by:   gcooper (yaneurabeya@gmail.com)
2014-10-11 19:18:00 +00:00
pfg
e384592b57 MFC r271879:
awk: Use random(3) instead of rand(3)

While none of them is considered even near to cryptographic
level, random(3) is a better random generator than rand(3).

Use random(3) for awk as is done in other systems.

PR:		193147
2014-10-10 23:18:44 +00:00
brooks
1aa654dd9c MFC r271287:
Merge from NetBSD:

PR/49185: Conrad Meyer: strvisx: Handle zero-length input strings
gracefully.  (don't abuse 0 to mean compute string length internally)

PR:		193447
Submitted by:	Conrad Meyer <conrad.meyer@isilon.com>
2014-10-08 15:44:11 +00:00
hselasky
45c3d8eadf MFC r272027:
Hardware driver update from Mellanox Technologies, including:
 - improved performance
 - better stability
 - new features
 - bugfixes

Supported HCAs:
 - ConnectX-2
 - ConnectX-3
 - ConnectX-3 Pro

NOTE:
  - TSO feature needs r271946, which is not yet merged.

Sponsored by:	Mellanox Technologies
Approved by:	re, glebius
2014-10-02 10:46:12 +00:00
delphij
ee5d204051 MFC r271493,271688-271689,271696,271854,272139-272143:
Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

Approved by:	re (gjb)
2014-09-30 17:54:57 +00:00
rodrigc
10f6e5e9cc MFC r271875, r272046, r272049, r272056
-> Reference the test case "packs" to fix warnings
 -> Delete mentions to removed manpages
 -> Minor fixes to docs

Approved by: re (gjb)
2014-09-30 16:14:02 +00:00
gjb
91dd3107b1 Properly revert r272128.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-09-26 03:03:58 +00:00
gjb
d7f7435644 Revert r272149, which introduces obscure vestiges from the
r272128 reversal.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-09-26 02:30:47 +00:00
gjb
9ffa63da8b Revert r272128:
Though this passes the buildworld test, this fails during
  installworld with:

  make[3]: "/releng/scripts-release/chroots/10/i386/release/etc/devd/Makefile"
  line 13: Malformed conditional (${MK_HYPERV} != "no")

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-09-26 01:08:31 +00:00
delphij
8e573ba7c9 MFC r271493,271688,271689,271696,271854:
Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

Approved by:	re (gjb)
2014-09-25 20:34:13 +00:00
trasz
bb5379e9a2 MFC r271259:
Make it possible to use empty user name ("-U ''") for mount_smbfs(8).
It's just like "-U guest", except that it actually works, at least
with Samba 4, which seems to return authentication failure for "-U guest".

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2014-09-25 17:59:00 +00:00
trasz
7688b8f62e MFC r271258:
Make mount_smbfs(8) preserve the "automounted" mount flag.

The issue here is that we have to pass this flag as a string,
in iov, because it doesn't fit in mntflags, which is an int.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2014-09-25 17:47:26 +00:00
des
dcca53b69e MFH (r271624): Upgrade to OpenPAM Ourouparia.
Approved by:	re (gjb)
2014-09-22 08:29:48 +00:00
pjd
39cf32414d MFC r271577:
Fix descriptors leak.

PR:		bin/191002
Reported by:	Ryan Steinmetz
Submitted by:	mjg
Approved by:	re (gjb)
2014-09-18 22:17:46 +00:00
dim
7ced298ca7 MFC r271597:
Pull in r217410 from upstream llvm trunk (by Bob Wilson):

  Set trunc store action to Expand for all X86 targets.

  When compiling without SSE2, isTruncStoreLegal(F64, F32) would return
  Legal, whereas with SSE2 it would return Expand. And since the Target
  doesn't seem to actually handle a truncstore for double -> float, it
  would just output a store of a full double in the space for a float
  hence overwriting other bits on the stack.

  Patch by Luqman Aden!

This should fix clang -O0 on i386 assigning garbage to floats, in
certain scenarios.

PR:		187437
Submitted by:	cebd@gmail.com
Approved by:	re (marius)
Obtained from:	http://llvm.org/viewvc/llvm-project?rev=217410&view=rev
2014-09-18 06:34:27 +00:00
emaste
487e77199d MFC Clang debuginfo crash fix
r271432: Merge upstream Clang rev 205331 debuginfo crash fix:

      Debug info: fix a crash when emitting IndirectFieldDecls, which were
      previously not handled at all.
      rdar://problem/16348575

r271433: Add clang patch corresponding to r271432

Approved by:	re
Sponsored by:	DARPA, AFRL
2014-09-18 01:24:40 +00:00
emaste
8081f48b5d MFC Clang debug info crash fix
r271282: Merge Clang debug info crash fix rev 200797:

      Debug info: fix a crasher when when emitting debug info for
      not-yet-completed templated types. getTypeSize() needs a complete type.

      rdar://problem/15931354

r271283: Add clang patch for r271282

  Note that r271282 contains only the src change from Clang rev 200797.
  This patch file includes two follow-on changes to the test case, which
  do not apply to the copy in the FreeBSD tree.

  Upstream Clang revisions:

  200797:

      Debug info: fix a crasher when when emitting debug info for
      not-yet-completed templated types. getTypeSize() needs a complete type.

      rdar://problem/15931354

  200798:

      Simplify testcase from r200797 some more.

  200805:

      Further simplify r200797 and add an explanatory comment.

PR:		193347
Approved by:	re
Sponsored by:	DARPA, AFRL
2014-09-11 01:53:55 +00:00
tijl
1e988094dc MFC r270757:
In r253839 the default behaviour of ld(1) was changed such that all
libraries that need to be linked into an executable or library have to be
listed on the command line explicitly.  This commit fixes a bug in ld(1)
where it would scan dependencies of the libraries on the command line and
link them if needed if they were also found in ld.so.cache.

The important bit of the patch is the initialisation of needed.by such that
libraries found by scanning dependencies are marked as such and not used in
the link.

The patch is a backport of binutils git commit
d5c8b1f8561426b41aa5330ed60f578178fe6be2

The author gave permission to use it under GPLv2 terms.

PR:		192062
2014-09-04 16:05:12 +00:00
ae
36aab21b56 MFC r270661:
Remove leading '/' from hardlink name when removing them from the
  regular file name. This fixes the problem, when bsdtar can not create
  hardlinks to extracted files.
2014-09-03 08:27:05 +00:00
ngie
b7b1b100cc MFC r266650, r267172 (both by jmmv):
r266650:

  Change libatf-c and libatf-c++ to be private libraries.

  We should not be leaking these interfaces to the outside world given
  that it's much easier for third-party components to use the devel/atf
  package from ports.

  As a side-effect, we can also drop the ATF pkgconfig and aclocal files
  from the base system.  Nothing in the base system needs these, and it
  was quite ugly to have to get them installed only so that a few ports
  could build.  The offending ports have been fixed to depend on
  devel/atf explicitly.

  Reviewed by:  bapt

r267172:

  Homogenize libatf-* version numbers with upstream.

  The libatf-* major version numbers in FreeBSD were one version ahead of
  upstream because, when atf was first imported into FreeBSD, the upstream
  numbers were not respected.  This is just confusing and bound to cause
  problems down the road.

  Fix this by taking advantage of the fact that libatf-* are now private
  and that atf is not yet built by default.  However, and unfortunately, a
  clean build is needed for tests to continue working once "make
  delete-old-libs" has been run; hence the note in UPDATING.

Phabric: D701
Approved by: jmmv (maintainer, mentor)
2014-08-31 23:09:23 +00:00
pluknet
4a093e3038 MFC r270728, tzdata2014f
- Parts of Russia will change times on 2014-10-26.
- Time zone name changes for Asia/Novokuznetsk and Xinjiang and Samoa
  and America/Metlakatla, new zones Asia/Chita and Asia/Srednekolymsk.
- Australia will now use Axxx.
- New zone tab data format.

And lots of historical changes (See
http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html
for the full details.)
2014-08-29 13:41:21 +00:00
dim
60a2369166 MFC r270416:
In r260015, I renamed several identifiers to avoid -Wsystem-header
warnings.  In r261283, I imported libc++ 3.4 release, but this contained
one identifier that had not been renamed yet, leading to a compilation
error when using -std=c++1y.  Fix the compilation error by correctly
renaming the identifier.

Reported by:	rcarter@pinyon.org
PR:		base/192139
2014-08-26 06:31:52 +00:00
ian
056154207b MFC r268994: C++ exception/unwind handling fix
Add FreeBSD to the list of environments that needs to handle R_ARM_TARGET2
  relocations in unwind data as pc-relative indirect references.

Note that the commit log for r269792 incorrectly claims that it includes
this change, but I apparently fumbled it somehow, so this is the real MFC.
2014-08-25 18:45:15 +00:00
des
bee605bad2 MFH (r263160): remove lukemftpd 2014-08-23 15:07:09 +00:00
ache
3b103d7c51 MFC: r269806,r269809,r269811,r269810
r269806:
Fix too long (seed length >12 chars) challenge handling.
1) " ext" length should be included into OPIE_CHALLENGE_MAX (as all places
of opie code expects that).
2) Overflow check in challenge.c is off by 1 even with corrected
OPIE_CHALLENGE_MAX
3) When fallback to randomchallenge() happens and rval is 0 (i.e.
challenge is too long), its value should be set to error state too.

To demonstrate the bug, run opiepasswd with valid seed:
opiepasswd -s 1234567890123456
and notice that it falls back to randomchallenge() (i.e. no
1234567890123456 in the prompt).

r269809:
When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX

r269811:
Last '/' for program name, not first one.

r269810:
Link otp-sha1 to match real challenge prompt, not otp-sha.

PR:     191511
Submitted by: mitsururike@gmail.com (partially, PR 269806)
2014-08-18 02:13:45 +00:00
dim
80ec3980a5 MFC r269948:
Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by:	Jos Chrispijn <ports@webrz.net>
2014-08-17 13:08:15 +00:00
ian
799b3dd5bf MFC r269387: Update the ARMv6 core clang targets to be an arm1176jzf-s. 2014-08-17 01:15:34 +00:00
emaste
dc9f54ca59 MFC r259088: Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix
PR:	bin/182463
2014-08-15 19:06:59 +00:00
peter
72d63a715a MFC r266728,266731,266735,266736,268135,268960,269833
Update apr 1.4.8 -> 1.5.1
 Update apr-util 1.5.2 -> 1.5.3
 Update serf 1.3.4 -> 1.3.7
 Update svnlite 1.8.8 -> 1.8.10
 Deal with svnlite.1 manpage.
2014-08-12 01:40:11 +00:00
dim
f8d542ba4f MFC r269740:
Pull in r214736 from upstream libc++ trunk (by Marshall Clow):

  Fix PR#20520 - predicate called too many times in list::remove_if.
  Add tests for list, forward_list, and the std::remove_if algorithm

This fixes an issue where std::list<>::remove_if() and remove() could
erroneously visit elements twice.

Reported by:	Dominic Fandrey <kamikaze@bsdforen.de>
PR:		192303
2014-08-11 20:37:03 +00:00
ian
8067096dad MFC r269393, r269394, r269395:
Fix parsing of arch extensions in binutils/gas.
  Use ".arch_extension sec" when compiling ARM TI code that uses the
  security extensions.
2014-08-11 01:48:00 +00:00
ian
a08c00a48a MFC r268993, r268893, r268994, plus partial r264070, r264082
Fix C++ exception handling for ARM EABI.

 Just the part of r264070 that creates the FBSD_1.4 namespace in libc
 is hand-applied, and then r264082 which creates the Versions.def entry
 is MFC'd.
2014-08-10 22:26:29 +00:00
gjb
176e58f1da MFC r269318:
Replace 'GNATS' with 'Bugzilla' in the base subversion commit
  template.

Approved by:	peter (implicit, original approver)
Sponsored by:	The FreeBSD Foundation
2014-08-07 02:26:45 +00:00
des
fe6d937978 MFH (r266114, r266138): upgrade to latest ldns and unbound
MFH (r266139-r266143, r266145, r266149, r266150): fix props
MFH (r266179, r266180, r266193, r266238, r266777): misc cleanup
MFH (r266863): create and use /var/unbound/conf.d
MFH (r268839): import unblock-lan-zones patch from upstream
MFH (r268840): fix reverse lookups on private networks
MFH (r268883): avoid spamming source tree during build

PR:		190739 (for r268883)
2014-07-29 20:57:38 +00:00
emaste
aef31c62ce MFC r268527: Remove unused readline header 2014-07-23 19:38:29 +00:00
emaste
85a76dca41 MFC r263678: lldb: Invoke PT_KILL from ProcessPosix::DoDestroy
We previously sent SIGKILL to the debuggee in DoDestroy, but did not
  actually detach or kill via ptrace.  It seems that this somehow didn't
  matter on Linux, but did on FreeBSD.

  This would happen when quitting LLDB while stopped at a breakpoint, for
  example.  The debuggee remained stopped in ptrace (with the signal
  either pending or lost).  After a timeout of a second or two LLDB exits,
  which caused the debuggee to resume and dump core from an unhandled
  SIGTRAP.

  BringProcessIntoLimbo is a poorly named wrapper for ptrace(PT_KILL)
  which is the desired behaviour from DoDestroy.

  http://llvm.org/pr18894

Sponsored by:	DARPA, AFRL
2014-07-23 19:37:24 +00:00
emaste
aa794b38fe MFC r262528: Update LLDB snapshot to upstream r202189
Highlights include (upstream revs in parens):

  - Improvements to the remote GDB protocol client
    (r196610, r197579, r197857, r200072, and others)

  - Bug fixes for big-endian targets
    (r196808)

  - Initial support for libdispatch (GCD) queues in the debuggee
    (r197190)

  - Add "step-avoid-libraries" setting
    (r199943)

  - IO subsystem improvements (including initial work on a curses gui)
    (r200263)

  - Support hardware watchpoints on FreeBSD
    (r201706)

  - Improved unwinding through hand-written assembly functions
    (r201839)

  - Handle DW_TAG_unspecified_parameters for variadic functions
    (r202061)

  - Fix Ctrl+C interrupting a running inferior process
    (r202086, r202154)

  - Various bug fixes for memory leaks, LLDB segfaults, the C++ demangler,
    ELF core files, DWARF debug info, and others.

Sponsored by:	DARPA, AFRL
2014-07-23 19:35:02 +00:00
emaste
e220614cf9 MFC r266630 by dim:
Add the clang patch for r265477.  While here, add a description to the
  patch for r263619, and unify all the URLs to point to svnweb
2014-07-23 14:27:04 +00:00
emaste
fa84953619 MFC r265477: Merge -fstandalone-debug from Clang r198655:
Implement a new -fstandalone-debug option. rdar://problem/15685848
  It controls everything that -flimit-debug-info used to, plus the
  vtable type optimization. The old -fno-limit-debug-info option is now an
  alias to -fstandalone-debug and vice versa.

  Standalone is the default on Darwin until dtrace is updated to work with
  non-standalone debug info (rdar://problem/15758808).

  Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind
  because NoStandaloneDebugInfo sounded even more confusing.
2014-07-23 14:25:47 +00:00
emaste
dc97077d62 MFC debug info for variadic functions
r264826: Merge LLVM r202188:

    Debug info: Support variadic functions.
    Variadic functions have an unspecified parameter tag after the last
    argument. In IR this is represented as an unspecified parameter in the
    subroutine type.

    Paired commit with CFE r202185.

    rdar://problem/13690847

    This re-applies r202184 + a bugfix in DwarfDebug's argument handling.

  This merge includes a change to use the LLVM 3.4 API in
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:

  DwarfUnit -> CompileUnit

r264827: Merge Clang r202185:

    Debug info: Generate debug info for variadic functions.
    Paired commit with LLVM.

    rdar://problem/13690847

  This merege includes changes to use the Clang 3.4 API (revisions
  199686 and 200082) in lib/CodeGen/CGDebugInfo.cpp:

  getParamType  -> getArgType
  getNumParams  -> getNumArgs
  getReturnType -> getResultType

r264828: Add patches corresponding to r264826 and r264827

Sponsored by:	DARPA, AFRL
2014-07-22 23:16:28 +00:00
cy
805537533a MFC r268532 and r268585. When world and kernel are built without INET6
support, the userland was still built with INET6 turned on.

PR:		190964
Approved by:	glebius (mentor, implicit)
2014-07-21 06:45:19 +00:00
bapt
73fb3c2805 MFC: r257315, r260445, r264803
Update byacc to 20140422
2014-07-20 00:21:38 +00:00
bapt
6f718e3669 MFC: r263648, r264789, r266636
This brings:
- schema validation
- xpath-like interface for ucl objects

Adapt pkg(7) to the new libucl API
2014-07-19 23:44:57 +00:00
cy
6674c38744 MFC r268286: Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
(NO_INET6) are specified.

Approved by:	glebius (mentor)
2014-07-12 05:59:19 +00:00
delphij
a8fc83ae7c MFC r267897: MFV r267843:
Update file/libmagic to 5.19.
2014-07-11 00:00:00 +00:00
dim
c4c1c28548 MFC r267981:
Pull in r211627 from upstream llvm trunk (by Bill Schmidt):

  [PPC64] Fix PR20071 (fctiduz generated for targets lacking that
  instruction)

  PR20071 identifies a problem in PowerPC's fast-isel implementation
  for floating-point conversion to integer.  The fctiduz instruction
  was added in Power ISA 2.06 (i.e., Power7 and later).  However, this
  instruction is being generated regardless of which 64-bit PowerPC
  target is selected.

  The intent is for fast-isel to punt to DAG selection when this
  instruction is not available.  This patch implements that change.
  For testing purposes, the existing fast-isel-conversion.ll test adds
  a RUN line for -mcpu=970 and tests for the expected code generation.
  Additionally, the existing test fast-isel-conversion-p5.ll was found
  to be incorrectly expecting the unavailable instruction to be
  generated.  I've removed these test variants since we have adequate
  coverage in fast-isel-conversion.ll.

This is needed to compile clang with debug+asserts on older powerpc64
and ppc970 targets.

Requested by:	jhibbits

MFC r267982:

Add the llvm patch for r267981.

MFC r268003:

Fix breakage after r267981.

Pointy hat to:	dim
2014-06-30 20:26:30 +00:00
delphij
d1fedb7971 Fix multiple vulnerabilities in file(1) and libmagic(3).
Security:	FreeBSD-SA-14:16.file
Approved by:	so
2014-06-24 19:04:55 +00:00
dim
cf140f008f MFC r267704:
Pull in r211435 from upstream llvm trunk (by Benjamin Kramer):

  Legalizer: Add support for splitting insert_subvectors.

  We handle this by spilling the whole thing to the stack and doing the
  insertion as a store.

  PR19492. This happens in real code because the vectorizer creates
  v2i128 when AVX is enabled.

This fixes a "fatal error: error in backend: Do not know how to split
the result of this operator!" message encountered during compilation of
the net-p2p/libtorrent-rasterbar port.

Reported by:	Evgeniy <iron@mail.ua>

MFC r267705:

Add the llvm patch for r267704.
2014-06-24 06:12:11 +00:00
gavin
e44b7f112f Merge r267482,r267483,r267486,r267577,r267671,r267672 from head:
Remove send-pr and fix up all references to it.  Replace it with a
  stub send-pr directing people towards the web site.
2014-06-22 16:48:21 +00:00
brueffer
6ea96d0826 MFC: r267478
MFp4: change 1191346

In print_header32_tok(), correct printing in the XML case.  This lead to
invalid XML files before.

PR:		176259
Submitted by:	zi
2014-06-17 08:56:16 +00:00
edwin
f631a2c600 MFC of 267473,tzdata2014e
Fix historical data for Egypt.
Better prediction for future Egypt / Morocco changes.
Update to Cocos / Cook islands.
Fix historical data for Russia.
2014-06-14 11:46:22 +00:00
delphij
e1c5226357 Fix incorrect error handling in PAM policy parser. [SA-14:13] 2014-06-03 19:02:18 +00:00
dim
357551c7e1 MFC r266674:
Pull in r209489 from upstream clang trunk (by Akira Hatanaka):

  Fix a bug in xmmintrin.h.

  The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function
  that reads two __m64 values and packs four 32-bit values into four 16-bit
  values.

  <rdar://problem/16873717>
2014-05-28 06:38:42 +00:00
dim
a3e27ae6a9 MFC r265925:
Upgrade our copy of llvm/clang to 3.4.1 release.  This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326
2014-05-26 20:45:44 +00:00
gshapiro
8878c3f644 MFC: Update for sendmail 8.14.9 import 2014-05-26 15:35:11 +00:00
gshapiro
c211ffddd1 MFC: Merge sendmail 8.14.9 to HEAD 2014-05-26 15:28:28 +00:00
gavin
d5a24169ed Merge r266111 from head:
Fix typo.  Note that although this file is under contrib, it has diverged
  sufficiently from upstream (including a full whitespace commit and large
  portions rewritten) that this change does not move us further from the
  upstream.

PR:		docs/186608
Submitted by:	Jamie Landeg-Jones <jamie@dyslexicfish.net>
2014-05-22 20:55:57 +00:00
delphij
b102c46490 MFC r265465:
Don't reply monlist request when it's not enabled.
2014-05-20 00:57:00 +00:00
ian
1202107523 MFC r256790:
Fix the VCVT instruction. It must round towards zero when converting from
  a floating-point to an integer value. This was not the case causing issues
  when printing certain values.
2014-05-18 19:28:15 +00:00
ian
60aa355ac4 MFC 264190:
Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct
  calling convention for __aeabi_* functions.
2014-05-17 21:35:26 +00:00
ian
1253f26158 MFC 263631, 263637, 263664, 263676, 263679, 263698, 263711,
Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores the
  current rounding mode used by the VFP unit.

  Simplify how we build MACHINE_ARCH. There are 3 options that may be set
  however only arm, armeb, armv6, and soon armv6hf will be used.

  Add the llvm/clang patch for r263619.

  Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are
  identical this allows us to build for both v6 and v7 together.

  Add code for enabling second CPU core for A20 SoC.
  Enable SMP on Cubieboard2.

  Switch to freebsd.org emal address in copyright.
2014-05-17 18:53:36 +00:00
bdrewery
7b44e09267 MFC r265249,r265250,r265251:
- Add -J command/flag to filter by jail name/jid. This will automatically
      display the JID as well (the -j command/flag).
    - Add a hint for 'u' and 'J' command that '+' displays all.
    - Add J command to help.
2014-05-17 02:39:20 +00:00
ian
99db57bb75 MFC r261215, r261257
Merge from vendor branch importing dtc git
  rev 6a15eb2350426d285130e4c9d84c0bdb6575547a

  Don't build BSDL dtc if the GPL dtc is enabled.
2014-05-15 14:37:52 +00:00
edwin
361ea06a9b MFC of tzdata2014c
- Egypt will go into DST in 15 May 2014
2014-05-13 22:35:06 +00:00
rpaulo
7e66d0998d Revert bogus change in 265804 to configparser.c 2014-05-10 07:26:49 +00:00
rpaulo
d8b1412072 MFC r252440:
Enable the second and the third I2C controllers on Beaglebone-black.
2014-05-10 07:25:26 +00:00
pfg
f628476f62 MFC r265231:
gcc: fix strict alignment.

From the OpenBSD log:

x86-64 ABI requires arrays greater than 16 bytes to be aligned to
16byte boundary.  However, GCC 16-byte aligns arrays of >=16 BITS,
not BYTES.

This diff improves bug detectability for code which has local arrays
of [16 .. 127] bits:  in those cases SSP will now detect even 1-byte
overflows.

Obtained from:	OpenBSD (CVS rev 1.4)
2014-05-09 01:30:15 +00:00
marius
02f351fb35 MFC: r265090
Merge r133175 from upstream:

2008-03-13  Dennis Czeremin  <dennis.czeremin@smiths-heimann.com>

	PR libstdc++/35566
	* include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator,
	_InputIterator)): Forward to _M_insert_equal, not _M_insert_unique.

This patch was GPL2 at the time and fixes a regression introduced with
the merge of GCC r129013 in FreeBSD r236829.

Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-05-02 10:29:54 +00:00
delphij
110f39bda3 MFC r258195+r264361:
nc from OpenBSD 5.5.
2014-04-25 04:49:27 +00:00
jmmv
9ae7565292 MFC r263989: Add atf m4 files from the vendor branch. 2014-04-17 17:20:56 +00:00
dim
7c6a94336a MFC r264345:
Amend r263891, by making clang default to DWARF2 debug info format for
all FreeBSD versions, not just 10.x and earlier.  Apparently too many
people seem to have trouble with post-1993 formats.

Also remove the related notes about messing with kernel configuration
files from UPDATING, which are now superfluous.

Requested by:	many
2014-04-14 17:54:01 +00:00
rpaulo
760b289b96 MFC r263925
Enable all cryptocaps because net80211 can do software encryption.
2014-04-12 23:48:02 +00:00
bapt
87cf2668fd MFC: r263948
Convert an unused banner from skeleton.c into a comment.
It is added to every generated files and fix build at certain warning level with clang 3.4

Submitted by:	Thomas Dickey <dickey@his.com> (byacc upstream)
Spotted by:	glebius
2014-04-12 15:13:43 +00:00
dim
4ebc67638d MFC r264238:
For GNU as, add two missing modes for each of the fcomip and fucomip
instructions.  Partially obtained from OpenBSD by Pedro Giffuni, while I
added the fcomip variants.

Apparently this should help with compiling certain variants of WebKit.
2014-04-10 07:00:24 +00:00
pfg
f0fa402e84 MFC r264121;
gcc: define __block when block support is enabled

This mimics the behaviour in clang and lets us build cleanly
the libdispatch port on platforms where the base gcc is still
the default compiler.

Bump __FreeBSD_version for ports.

Tested by:	theraven
2014-04-07 01:55:54 +00:00
dim
cc435e800f MFC r263775:
Avoid "cc1: warning: is shorter than expected" when using GNU cpp in
combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs"
shebang lines.  This is because dtrace positions the file pointer after
the shebang line, before passing the file to GNU cpp.

To fix the warning, adjust the size downwards by the current position,
after a bit of sanity checking.

Suggested by:	avg
2014-04-02 06:17:57 +00:00
dim
962d0a5759 MFC r263891:
Make clang default to DWARF2 debug info format for FreeBSD 10.x and
earlier.  For head, this commit does not change anything, but it is
purely meant to be MFC'd.
2014-04-01 08:19:30 +00:00
dim
16ced98065 MFC r263774:
Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the
remainder of the translation unit (a.k.a. -Wkeyword-compat), when using
libstdc++ in combination with -Wsystem-headers.  This will not only fix
devd, but any C++ program using libstdc++.
2014-03-29 11:33:52 +00:00
edwin
24df444399 MFC of 263901, tzdata2014b
- Update antartica.
 - Comments about historical data for Hawaii.
 - Update details for Crimea on 30 March
 - Move location data Simferopol.
2014-03-29 04:44:24 +00:00
dim
45ae227ed4 MFC r263312:
Pull in r196939 from upstream llvm trunk (by Reid Kleckner):

  Reland "Fix miscompile of MS inline assembly with stack realignment"

  This re-lands commit r196876, which was reverted in r196879.

  The tests have been fixed to pass on platforms with a stack alignment
  larger than 4.

  Update to clang side tests will land shortly.

Pull in r196986 from upstream llvm trunk (by Reid Kleckner):

  Revert the backend fatal error from r196939

  The combination of inline asm, stack realignment, and dynamic allocas
  turns out to be too common to reject out of hand.

  ASan inserts empy inline asm fragments and uses aligned allocas.
  Compiling any trivial function containing a dynamic alloca with ASan is
  enough to trigger the check.

  XFAIL the test cases that would be miscompiled and add one that uses the
  relevant functionality.

Pull in r202930 from upstream llvm trunk (by Hans Wennborg):

  Check for dynamic allocas and inline asm that clobbers sp before building
  selection dag (PR19012)

  In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
  to make sure that ESI isn't used as a base pointer register before we choose to
  emit rep movs (which clobbers esi).

  The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
  inline asm that clobbers the stack pointer until SelectionDAGBuilder has
  encountered them.

  This patch fixes the problem by checking for such things when building the
  FunctionLoweringInfo.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2954

Together, these commits fix the problem encountered in the devel/emacs
port on the i386 architecture, where a combination of stack realignment,
alloca() and memcpy() could incidentally clobber the %esi register,
leading to segfaults in the temacs build-time utility.

See also: http://llvm.org/PR18171 and http://llvm.org/PR19012

Reported by:	ashish
PR:		ports/183064

MFC r263313:

Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):

  ISel: Make VSELECT selection terminate in cases where the condition type has to
  be split and the result type widened.

  When the condition of a vselect has to be split it makes no sense widening the
  vselect and thereby widening the condition. We end up in an endless loop of
  widening (vselect result type) and splitting (condition mask type) doing this.
  Instead, split both the condition and the vselect and widen the result.

  I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

  Fixes PR18036.

With this fix the original problem case from the graphics/rawtherapee
port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS.

Reported by:	mandree

MFC r263320:

Add separate patch files for all the customizations we have currently
applied to our copy of llvm/clang.  These can be applied in alphabetical
order to a pristine llvm/clang 3.4 release source tree, to result in the
same version used in FreeBSD.

This is intended to clearly document all the changes until now, which
mostly consist of cherry pickings from the respective upstream trunks,
plus a number of hand-written FreeBSD-specific ones.  Hopefully those
can eventually be cleaned up and sent upstream too.
2014-03-26 07:42:43 +00:00
dim
fb422e6d31 MFC r262613:
Merge the projects/clang-sparc64 branch back to head.  This brings in
several updates from the llvm and clang trunks to make the sparc64
backend fully functional.

Apart from one patch to sys/sparc64/include/pcpu.h which is still under
discussion, this makes it possible to let clang fully build world and
kernel for sparc64.

Any assistance with testing this on actual sparc64 hardware is greatly
appreciated, as there will unavoidably be bugs left.

Many thanks go to Roman Divacky for his upstream work on getting the
sparc64 backend into shape.

MFC r262985:

Repair a few minor mismerges from r262261 in the clang-sparc64 project
branch.  This is also to minimize differences with upstream.
2014-03-26 07:31:57 +00:00
emaste
f9534c5185 MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD
The NetBSD Foundation states "Third parties are encouraged to change the
  license on any files which have a 4-clause license contributed to the
  NetBSD Foundation to a 2-clause license."

  This change removes clauses 3 and 4 from copyright / license blocks that
  list The NetBSD Foundation as the only copyright holder.

Sponsored by:	The FreeBSD Foundation
2014-03-24 13:48:04 +00:00
gjb
b13aa3b9f7 MFC r263434:
Update commit template to include 'Relnotes:' tag, to
  help re@ track release notes candidates.

Sponsored by:	The FreeBSD Foundation
2014-03-23 02:29:28 +00:00
dim
9cedb8bb69 MFC 261991:
Upgrade our copy of llvm/clang to 3.4 release.  This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3.  The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC 262121 (by emaste):

Update lldb for clang/llvm 3.4 import

This commit largely restores the lldb source to the upstream r196259
snapshot with the addition of threaded inferior support and a few bug
fixes.

Specific upstream lldb revisions restored include:
   SVN      git
  181387  779e6ac
  181703  7bef4e2
  182099  b31044e
  182650  f2dcf35
  182683  0d91b80
  183862  15c1774
  183929  99447a6
  184177  0b2934b
  184948  4dc3761
  184954  007e7bc
  186990  eebd175

Sponsored by:	DARPA, AFRL

MFC 262186 (by emaste):

Fix mismerge in r262121

A break statement was lost in the merge.  The error had no functional
impact, but restore it to reduce the diff against upstream.

MFC 262303:

Pull in r197521 from upstream clang trunk (by rdivacky):

  Use the integrated assembler by default on FreeBSD/ppc and ppc64.

Requested by:	jhibbits

MFC 262611:

Pull in r196874 from upstream llvm trunk:

  Fix a crash that occurs when PWD is invalid.

  MCJIT needs to be able to run in hostile environments, even when PWD
  is invalid. There's no need to crash MCJIT in this case.

  The obvious fix is to simply leave MCContext's CompilationDir empty
  when PWD can't be determined. This way, MCJIT clients,
  and other clients that link with LLVM don't need a valid working directory.

  If we do want to guarantee valid CompilationDir, that should be done
  only for clients of getCompilationDir(). This is as simple as checking
  for an empty string.

  The only current use of getCompilationDir is EmitGenDwarfInfo, which
  won't conceivably run with an invalid working dir. However, in the
  purely hypothetically and untestable case that this happens, the
  AT_comp_dir will be omitted from the compilation_unit DIE.

This should help fix assertions occurring with ports-mgmt/tinderbox,
when it is using jails, and sometimes invalidates clang's current
working directory.

Reported by:	decke

MFC 262809:

Pull in r203007 from upstream clang trunk:

  Don't produce an alias between destructors with different calling conventions.

  Fixes pr19007.

(Please note that is an LLVM PR identifier, not a FreeBSD one.)

This should fix Firefox and/or libxul crashes (due to problems with
regparm/stdcall calling conventions) on i386.

Reported by:	multiple users on freebsd-current
PR:		bin/187103

MFC 263048:

Repair recognition of "CC" as an alias for the C++ compiler, since it
was silently broken by upstream for a Windows-specific use-case.

Apparently some versions of CMake still rely on this archaic feature...

Reported by:	rakuco

MFC 263049:

Garbage collect the old way of adding the libstdc++ include directories
in clang's InitHeaderSearch.cpp.  This has been superseded by David
Chisnall's commit in r255321.

Moreover, if libc++ is used, the libstdc++ include directories should
not be in the search path at all.  These directories are now only used
if you pass -stdlib=libstdc++.
2014-03-21 17:53:59 +00:00
emaste
3b6e18f61d MFC r258005: Merge upstream LLVM r192118:
Formally added an explicit enum for DWARF TLS support. No functionality
  change.

Sponsored by:	DARPA, AFRL
2014-03-19 20:46:02 +00:00
emaste
75535b28ab MFC r258003: Merge upstream LLVM r182803:
[Mips] Add Mips specific dynamic table entry tags.

Sponsored by:	DARPA, AFRL
2014-03-19 19:31:21 +00:00
emaste
f9928d747c MFC r258897: Update LLDB to upstream r196322 snapshot
Upstream revisions of note:
  r196298 - Fix use of std::lower_bound
  r196322 - Fix log message for new invalidation checks

Sponsored by:	DARPA, AFRL
2014-03-19 13:24:47 +00:00
emaste
6bffb42503 MFC r258892: lldb: Threaded inferior support for FreeBSD
This is in the process of being submitted to the upstream LLDB
  repository.  The thread list functionality is modelled in part on
  GDBRemoteCommunicationClient.

  LLDB bug pr16696 and code review D2267

Sponsored by:	DARPA, AFRL
2014-03-19 13:19:56 +00:00
emaste
de2662087f MFC r258884: Update LLDB to upstream r196259 snapshot
Sponsored by:	DARPA, AFRL
2014-03-19 13:18:42 +00:00
emaste
7327a493ea MFC r258873: Workaround lldb issue with main module base address
On FreeBSD lldb sometimes reloads the the main module's (executable's)
  symbols at the wrong address.  Work around this for now by explicitly
  reloading at base_address=0 when it happens.

  A proper fix is needed but early testers have reported this issue so
  this workaround should allow them to make further progress.

  http://llvm.org/bugs/show_bug.cgi?id=17880

Sponsored by:	DARPA, AFRL
2014-03-19 13:16:58 +00:00
emaste
0c69499498 MFC r258098: Merge upstream LLDB r194487:
Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown

  In order to help track down llvm.org/pr17226.

Sponsored by:	DARPA, AFRL
2014-03-19 13:15:16 +00:00
emaste
a7c13fdad5 MFC r258094: lldb: Correct a standalone debug file path
For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path
  should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls.

  ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

  Upstream defect pr17903 (http://llvm.org/pr17903)

Sponsored by:	DARPA, AFRL
2014-03-19 13:13:47 +00:00
emaste
958843c32b MFC r258054: Update LLDB to upstream r194122 snapshot
Inludes minor changes relative to upstream, for compatibility with
  FreeBSD's in-tree LLVM 3.3:

  - Reverted LLDB r191806, restoring use of previous API.
  - Reverted part of LLDB r189317, restoring previous enum names.
  - Work around missing LLVM r192504, using previous registerEHFrames API
    (limited functionality).
  - Removed PlatformWindows header include and init/terminate calls.

Sponsored by:	DARPA, AFRL
2014-03-19 13:11:35 +00:00
delphij
a44a1e412b MFC r262754: MFV r253848 (mm):
Update vendor/xz from v5.0 branch to post-5.0.5
2014-03-18 00:59:49 +00:00
dim
f674f353ee MFC r263120:
Pull in r201021 from upstream libc++ trunk:

  Fix for PR18735 - self-assignment for map/multimap gives incorrect
  results in C++03

(Please note: that is an LLVM PR identifier, not a FreeBSD one.)

Reported by:	rakuco
2014-03-17 20:42:45 +00:00
dim
fc82e35795 Pull in r192123 from upstream llvm trunk (by Benjamin Kramer):
X86: Fix type check. Just because an integer type is illegal doesn't
  mean it's i64.

  Fixes PR17495, where an i24 triggered this code. It's intended to
  optimize i64 loads on 32 bit x86.

Fixes "Cannot select" fatal errors when building the audio/jack port
with ALSA support turned on.

This is a direct commit to stable/9 and stable/10, since head already
has the commit as part of an upgrade to llvm/clang 3.4.

Reported by:	Radim Kolar <hsn@sendmail.cz> via http://llvm.org/bugs/
2014-03-16 16:33:25 +00:00
jhibbits
fdeb176830 MFC r261422
Make gas accept any PowerPC instruction by default.  This is a local change,
and will not be submitted upstream.

Discussed with:       nwhitehorn,rdivacky
2014-03-14 16:42:20 +00:00