Commit Graph

13 Commits

Author SHA1 Message Date
Pedro F. Giffuni
966b6fbbae libcpp: preprocessor speedup patches from mainline.
* lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
look backward at the end of the line unless we saw a backslash.

* internal.h (struct cpp_reader): Add new fields:
nonexistent_file_hash and nonexistent_file_ob.
* files.c: Include "obstack.h".
(find_file_in_dir): Before trying to open the file, look up the
path name in the hash table of nonexistent files.  After failing
to open the file, add the path name to the hash table.
(_cpp_find_file): Cache the results of looking up the file name
starting with the quote and bracket chain heads, if we can.
(nonexistent_file_hash_eq): New static function.
(_cpp_init_files): Initialize pfile->nonexistent_file_hash and
pfile->nonexistent_file_ob.
(_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
pfile->nonexistent_file_ob.

Obtained from:	gcc 4.3 (rev. 120263, 124929 ; GPLv2)
MFC after:	3 weeks
2013-11-16 01:07:02 +00:00
Pedro F. Giffuni
0944614655 cxxfilt: small changes from Apple's developer tools
From Apple's Developer Tools 4.0 [1]:

demangle.patch
2007-05-05  Geoffrey Keating
	(d_name): Detect local-source-name.
	(d_prefix): Likewise.
	(d_unqualified_name): Implement local-source-name.

libiberty-printf.patch

MFC after:	1 month

[1] http://opensource.apple.com/source/cxxfilt/cxxfilt-9/patches/
2013-11-11 21:18:02 +00:00
Sean Bruno
b01ec0d4e7 Quiesce warning by including appropriate header file 2013-10-29 20:36:04 +00:00
Sean Bruno
4971c4adad Resolve clang warning about a use of syslog. By using a proper enforcement
of string format in a call so syslog

/usr/src/gnu/lib/libssp/../../../contrib/gcclibs/libssp/ssp.c:137:23:
warning: format string is not a string literal (potentially insecure)
      [-Wformat-security]
    syslog (LOG_CRIT, msg1);
                      ^~~~

Reviewed by:	dim@
2013-10-21 22:55:56 +00:00
Pedro F. Giffuni
e639f25706 Add support for the GCC binary integer constants extension.
This is required to build the i965 backend with newer versions of mesa.

Original patch from Joerg Wunsch in GCC Bug 23479, under the GPLv2;
also taken from there in OpenBSD.

Obtained from:	gcc 4.3 (rev. 125346; GPLv2)
MFC after:	5 days
2013-08-31 20:33:37 +00:00
Pedro F. Giffuni
691f7fadcd Add support for "d" floating-point suffix, as defined by draft N1312
of TR 24732. Emit pedantic warning if the feature is being used.

Should solve GCC bug 39027.

Obtained from:	OpenBSD
MFC after:	2 weeks
2013-05-12 15:29:35 +00:00
Eitan Adler
37a6031461 Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in
share/mk/sys.mk instead.

This is part of a medium term project to permit deterministic builds of
FreeBSD.

Submitted by:	Erik Cederstrand <erik@cederstrand.dk>
Reviewed by:	imp, toolchain@
Approved by:	cperciva
MFC after:	2 weeks
2012-12-06 01:31:25 +00:00
Ed Schouten
bdc971eb19 Add support for __COUNTER__.
__COUNTER__ allows one to obtain incrementing (read: unique) numbers
from the C preprocesor. This is useful when implementing things like a
robust implementation of CTASSERT(), which currently fails when using
it more than once on a single line of code. Probably not likely to cause
any breakage, but still.

__COUNTER__ was also added to GCC 4.3, but since that implementation is
GPLv3 licensed, I took the liberty of implementing it without looking at
any upstream sources. Therefore, this version is licensed under the same
license as the rest of the code; GPLv2.
2011-12-13 17:34:47 +00:00
Ben Laurie
7d214dd4e2 Fix clang compile warnings.
Approved by:	philip (mentor)
2011-05-22 22:14:15 +00:00
Alexander Kabaev
2bdb3bd910 This commit was generated by cvs2svn to compensate for changes in r171831,
which included commits to RCS files with non-trunk default branches.
2007-08-14 02:52:47 +00:00
Alexander Kabaev
df954420dd GCC 4.2.1 release miscellaneous support libraries. 2007-08-14 02:52:47 +00:00
Alexander Kabaev
9f4623d21f Re-add local FreeBSD change: prefer /tmp to /var/tmp and /usr/tmp
for temporary files.
2007-05-19 03:17:00 +00:00
Alexander Kabaev
c7ca977ef2 GCC 4.2.0 release miscellaneous support libraries. 2007-05-19 01:27:20 +00:00