Commit Graph

4359 Commits

Author SHA1 Message Date
David Chisnall
4792733bb8 Fix some symbol version mismatches between libstdc++ and libsupc++/libcxxrt
that were causing the runtime and STL libraries to see different versions of
various classes and functions when libstdc++ is used as a filter.

Note: This changes the ABI for libcxxrt, but libcxxrt is currently only in
-STABLE for testing and is not used by anything unless explicitly enabled by
the end user.  No default compiler configurations use it.

libc++ will need to be recompiled after this change.  make buildworld will do
this automatically, but make in lib/libc++ will not necessarily work unless the
new libcxxrt is installed first.

PR:		kern/171610, stand/175453
Reviewed by:	kib
MFC after:	1 week
2013-01-28 11:12:49 +00:00
Andrew Turner
4503502994 bsd.own.mk needs to be included before Makefil.inc so MK_ARM_EABI is defined 2013-01-25 06:18:49 +00:00
Brooks Davis
4282299f69 Reorder so that NO_MAN is declared before bsd.own.mk is included and thus
has an effect (not installed a g++.1 manpage over the g++.1(.gz) link
created in ../cc).
2013-01-24 15:18:41 +00:00
David Chisnall
af0dd31fc4 Import new (BSDL) device tree compiler. Now built by default, so that it can't
be used on the host system (and not installed on the device, if required).  The
GPL'd one is still available if there are any devices that need it (make
universe passes with it, including kernels that use fdt, but there may be some
out-of-tree ones).  WITH_GPL_DTC can be used to select the old one, for now.

Probably won't be MFC'd, but we'll remove the GPL'd version in head after the
new one has had a lot more testing and ship it in 10.0.
2013-01-22 17:49:51 +00:00
David Xu
87ec376216 Make "-D skip" option work with FIFO by opening file in non-blocking mode.
Reviewed by:	jhb
Tested by:	delphij
2013-01-22 03:23:14 +00:00
Adrian Chadd
23dbd4334a Add command-line support to kgdb to allow the baudrate to be set.
This allows a remote session to be specified with '-r' as well as a
non-default baudrate setting using '-b'.

TODO: add to the kgdb manpage.

MFC after:	2 weeks
2013-01-21 01:46:36 +00:00
Andrew Turner
1992e9a10c Add compiler support for the ARM EABI.
ARM EABI support is disabled by default and can be enabled by setting
WITH_ARM_EABI when building, however only the kernel-toolchain target will
work with this flag until the rest of the support is added.
2013-01-17 05:56:28 +00:00
Andrew Turner
3c35faa333 Set the correct relocation type for R_ARM_TARGET2 to R_ARM_GOT_PREL. The
TARGET2 relocation is unused in the current ABI but this change is
required for EABI support.
2013-01-06 07:14:04 +00:00
Antoine Brodin
620667435c Fix a dependency 2013-01-01 18:31:21 +00:00
Nathan Whitehorn
1971864966 Revert r241818 that updated dialog to 20120706. This turns out to horribly
break mixed form dialogs in conjunction with the FreeBSD termcap, making
the bsdinstall partition editor Add dialog, among other things, completely
nonfunctional. This restores dialog 20110707.
2012-12-30 04:22:34 +00:00
Andrew Turner
e376173cab Get libcompiler-rt and libgcc building on ARM with clang.
* Don't provide clear_cache or the __sync_* functions on ARM with clang as
  they are provided by clang as builtin functions.
* Tell clang it is aloud to compile some libgcc code using heinous GCC
  extensions.
2012-12-18 07:26:55 +00:00
Andrey A. Chernov
412fcd3f6c More correct version of prev. fix. 2012-12-18 04:44:36 +00:00
Andrey A. Chernov
89bae3c5d0 Fix:
line 11: Malformed conditional
(${TARGET} == "arm" || ${TARGET_ARCH} == "powerpc64")
2012-12-17 19:17:10 +00:00
Andrew Turner
70b6701d78 Also remove -Werror on arm with clang as there are warnings. 2012-12-15 21:33:12 +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
Simon J. Gerraty
53cafa23cd We need /backward too it seems 2012-11-08 21:34:29 +00:00
Simon J. Gerraty
7cd2dcf076 Updated/new Makefile.depend 2012-11-08 21:24:17 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Dimitry Andric
f289fa663b For building GNU libstdc++ and libsupc++, filter out libc++-specific and
-std= flags above c++98 or gnu++98 from CXXFLAGS *after* including
bsd.lib.mk, otherwise some additions to CXXFLAGS done in bsd.*.mk might
not be preserved.

MFC after:	1 week
2012-10-23 18:57:20 +00:00
Eitan Adler
56ac0dd99a Add support for the "&" character in usernames.
Charlie & finally has his last name.

PR:		gnu/37910
Submitted by:	Harry Newton <harry_newton@telinco.co.uk>
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:41:19 +00:00
Nathan Whitehorn
2a664c03e5 Update dialog to 20120706: includes minor useability enhancements and
fixes for warnings encountered with clang.
2012-10-21 18:25:12 +00:00
Gabor Kovesdan
d38ae94bce - Remove GNU sort and the WITH_GNU_SORT knob 2012-10-13 18:40:39 +00:00
Marcel Moolenaar
0815243c39 Add support for bmake. This includes:
1.  Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE,
    there's a bootstrap complication in ths respect. Avoid it. Make the
    necessary changes to have upgrade_checks work wth bmake anyway.
2.  Remove the use of -E. It's not needed in our build because we use ?= for
    the respective variables, which means that we'll take the environment
    value (if any) anyway.
3.  Properly declare phony targets as phony as bmake is a lot smarter (and
    thus agressive) about build avoidance.
4.  Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot
    smarter about build avoidance and should not find files we generate in
    the source tree. We should not have files in the repository we want to
    generate, but this is an easier way to cross this hurdle.
5.  Have behavior under bmake the same as it is under make with respect to
    halting when sub-commands fail. Add "set -e" to compound commands so
    that bmake is informed when sub-commands fail.
6.  Make sure crunchgen uses the same make as the rest of the build. This
    is important when the make utility isn't called make (but bmake for
    example).
7.  While here, add support for using MAKEOBJDIR to set the object tree
    location. It's the second alternative bmake looks for when determining
    the actual object directory (= .OBJDIR).

Submitted by:	Simon Gerraty <sjg@juniper.net>
Submitted by:	John Van Horne <jvanhorne@juniper.net>
2012-10-06 20:01:05 +00:00
Dimitry Andric
69714daa44 For building libstdc++ and libsupc++, filter out any -stdlib=libc++
option from CXXFLAGS, otherwise these libraries will not build.
Similarly, filter out any -std=xxx options that aren't supported.

Submitted by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
MFC after:	2 weeks
2012-08-25 23:08:24 +00:00
Roman Divacky
beaded8a1e Dont use -Werror when building libbfd and gnu as on powerpc64 with clang
as there are warnings.

Reviewed by:    nwhitehorn
2012-08-24 16:37:00 +00:00
Ruslan Ermilov
61fcb6bec9 A workaround in r238563 was for makes (notably bmake) without the
internal knowledge that "cd" is a shell's built-in.  Such makes
may attempt to exec() "cd" that in turn will fail on systems that
lack the "cd" executable.

Reworked this by eliminating the root cause.

Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-08-24 06:55:16 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Andreas Tobler
8a1f9d1cf5 Fix typo. Not a win in terms of functionality but in terms of completeness. 2012-08-19 19:17:54 +00:00
David E. O'Brien
6f5e32433e Catch up with the subversion conversion and apply these build-time patches. 2012-08-17 18:20:38 +00:00
Oleksandr Tymoshenko
4da573d910 Merging of projects/armv6, part 3
r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions.  In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
 * GCC to default to arm1176jz-s
 * GCC to predefine __FreeBSD_ARCH_armv6__
 * gas to default to ARM_ARCH_V6K
 * uname -p to return 'armv6'
 * make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by:	Tim Kientzle <kientzle@freebsd.org>
2012-08-15 03:21:56 +00:00
Ruslan Ermilov
a16720da65 Backed out r228904, and added libstdthreads support to mdoc(7) to where
it belongs.
2012-07-26 11:10:25 +00:00
Ruslan Ermilov
770b69c0b7 Backed out r236255, and added FreeBSD 9.1 support to mdoc(7) to where
it belongs.
2012-07-26 10:58:30 +00:00
David E. O'Brien
d6844ac5b3 a ";" tells make we want the shell to be used
Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-07-18 05:57:42 +00:00
Nathan Whitehorn
eb90003fa8 After the binutils 2.17.50 import, the assembler supports AS_REL16
relocations.
2012-07-08 17:02:14 +00:00
Gabor Kovesdan
7d26b3ee33 - Switch to BSD sort as default sort. GNU sort will still be installed as
"gnusort".  Most of the BSD sort development work was done by
  Oleg Moskalenko <oleg.moskalenko@citrix.com>.
- GNU grep can be set to default by setting WITH_GNU_GREP.  It will cause
  BSD sort to be installed as "bsdsort".

Portbuild tested by:    linimon
2012-06-27 05:59:01 +00:00
Marius Strobl
acc743293d Turn on TLS support for arm on here as it is supported since r231618/
r231619 and working since r233106.
2012-06-14 20:27:28 +00:00
David Chisnall
fe13239287 Clean up some symbol versions for libsupc++ / libcxxrt.
MFC after:	1 week
Reviewed by:	kan
2012-06-11 15:40:57 +00:00
Dag-Erling Smørgrav
87b8d8bbc9 Add mangled symbols for operator new / delete on 64-bit platforms.
Reported by:	decke@
MFC after:	1 week
2012-06-05 12:34:08 +00:00
David Chisnall
523f54dd4a Correctly export operator new / delete for things linking against libsupc++ but
not libstdc++.

Unfortunately, it appears that libsupc++ / libstdc++ have a different idea of
the type of size_t to the rest of the world, which may cause problems later
on...

Reported by:	des
MFC after:	1 week
2012-05-28 12:11:00 +00:00
Marcel Moolenaar
450ea99db7 Don't recurse into libssp when MK_SSP is set to no. 2012-05-21 16:03:44 +00:00
David Xu
f8ad51d5e2 Print key value, an index, otherwise we don't know which key is allocated. 2012-05-21 03:06:31 +00:00
Marcel Moolenaar
c7a6b0911b Build the "S" objects with the same name they get installed under.
That is, build crtbeginS.o and crtendS.o instead of crtbegin.So and
crtend.So. Remove the name substitution during install.

Obtained from:	Juniper Networks, Inc.
2012-05-17 20:38:01 +00:00
Marius Strobl
45e2c46b37 Switch sparc64 to using libcompiler_rt; since r230021 we have a workaround
in place allowing it to be used there and since r235388 (see also r235486)
we also have usable div/mod optimizations like libgcc has.
2012-05-15 22:47:34 +00:00
Gabor Kovesdan
85d7de106c - Hook up BSD sort to the build. By default, it will be installed as
"bsdsort" and GNU sort will be the default "sort".  When WITH_BSD_SORT
  is set, BSD sort will be the default "sort" and GNU sort will be installed
  as "gnusort".
2012-05-11 12:47:21 +00:00
Glen Barber
2fccbf04cc General mdoc(7) and typo fixes.
PR:		167696
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-10 02:07:00 +00:00
Konstantin Belousov
4f20e4f263 Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the
toolchain binaries as dynamically linked.  Option is disabled by
default.

Reviewed by:	ru (previous version)
MFC after:	2 weeks
2012-04-29 09:32:44 +00:00
Marcel Moolenaar
f502124c06 Allow building a powerpc cross-kgdb. 2012-04-27 20:16:20 +00:00
Dimitry Andric
db3212b375 Revert r234356 for now, as it leads to run-time problems on 32-bit
PowerPC.  Note this will break world.

Reported by:	andreast
Pointy hat to:	dim
2012-04-23 06:33:27 +00:00
Warner Losh
01712ae93a Replace a bare use of nm with ${NM} for easier cross compilation in
environments where nm is spelled differently.
2012-04-21 16:02:00 +00:00
Dimitry Andric
4f78aa4725 Work around an issue on 32-bit PowerPC, where clang executable can get
too big, causing 'relocation truncated to fit' errors at link time.

Reviewed by:	nwhitehorn
2012-04-16 21:36:55 +00:00
David Chisnall
cf56074e52 Make libsupc++ build as a shared library and make libstdc++ a filter library
for it.

This allows people to swap out libsupc++ for libcxxrt easily, so we can begin
the libstdc++ -> libc++ migration.

Approved by:	dim (mentor)
2012-03-31 14:25:12 +00:00
Juli Mallett
84db023ec1 Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the
expectations of much third-party software.  MIPS builds which are little-endian
should require and exhibit no changes.  Big-endian TARGET_ARCHes must be
changed:
	From:		To:
	mipseb		mips
	mipsn32eb	mipsn32
	mips64eb	mips64

An entry has been added to UPDATING and some foot-shooting protection (complete
with warnings which should become errors in the near future) to the top-level
base system Makefile.
2012-03-29 02:54:35 +00:00
Oleksandr Tymoshenko
5fc747bf78 Make default ABI for as(1) to be the same as target platform.
This change makes object files compiled with default flags by
gcc and as compatible.
2012-03-23 19:37:45 +00:00
Juli Mallett
07257b7e1c Note two shortcomings of GDB on MIPS that should be addressed. 2012-03-13 04:50:41 +00:00
Dimitry Andric
dfbaea8347 Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

Note this does *not* disable building and installing gcc, which will
still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
you want to disable gcc completely, you must use WITHOUT_GCC.

MFC after:	2 weeks
2012-02-29 22:58:51 +00:00
Oleksandr Tymoshenko
5989db894d Enable TLS support for ARM toolchain
Reviewed by:	cognet
2012-02-14 00:18:18 +00:00
Konstantin Belousov
f1c8f19055 Adopt to new layout of struct pcb.
MFC after:	1 month
2012-01-21 17:50:14 +00:00
Ed Schouten
34d80cf2ff Don't include <sys/timeb.h>.
Including this header file causes a compilation warning. The code builds
perfectly fine without this header file.
2012-01-08 12:38:41 +00:00
Robert Watson
f68dd1eefc Add missing -w to kgdb(1)'s usage().
Sponsored by:	Adara Networks, Inc.
MFC after:	3 days
2012-01-04 21:26:47 +00:00
Dimitry Andric
6aff93296d Define YY_NO_INPUT when building libbinutils, to prevent warnings about
unused input() functions emitted by lex.

MFC after:	1 week
2011-12-16 22:19:13 +00:00
Ruslan Ermilov
dd5e6f8a24 Pull up vendor changes to mdoc(7). 2011-12-08 13:54:06 +00:00
Baptiste Daroussin
acca521c82 upgrade gperf to the last GPLv2 version (3.0.3)
Reviewed by:	cognet
Approved by:	cognet
2011-11-28 12:29:16 +00:00
Max Khon
46968249f1 libodialog: Remove no longer used library. 2011-11-24 20:34:50 +00:00
Max Khon
24d1b19ec4 libodialog: disconnect from the build and obsolete. 2011-11-24 20:31:06 +00:00
Max Khon
7c86633876 Use ${VAR} instead of $(VAR) consistently. 2011-11-24 14:17:04 +00:00
Andreas Tobler
6bac4c3e6a Rename the linker emulation name for powerpc and powerc64. This is needed that
we can also use the upstream binutils linker where we have to have a unique
name for the FreeBSD emulation.
2011-11-19 19:25:57 +00:00
Dimitry Andric
130515293b When one attempts to compile the tree with -march=i386, which also used
to be gcc's default before r198344, calls to atomic builtins will not be
expanded inline.  Instead, they will be generated as calls to external
functions (e.g. __sync_fetch_and_add_N), leading to linking errors later
on.

Put in a seatbelt that disables use of atomic builtins in libstdc++ and
llvm, when tuning specifically for the real i386 CPU.  This does not
protect against all possible issues, but it is better than nothing.
2011-11-06 14:07:23 +00:00
David E. O'Brien
d65033b604 * Don't give the impression that this compiler is GPLv3.
(It is "well known" that GCC 4.2.2 is GPLv3.)
* Don't give the impression that this compiler isn't "trustable".
* Fix dependency nit.
2011-10-24 20:52:41 +00:00
Dimitry Andric
162c8b19e3 Update gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 10. 2011-10-18 17:38:25 +00:00
Eitan Adler
36daf0495a - change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
2011-10-16 14:30:28 +00:00
Ken Smith
8a3b6cc1e1 Shift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing
it from the 9.0-RELEASE release cycle code freeze.

Approved by:	re (implicit)
2011-09-26 02:27:04 +00:00
Olivier Houchard
84f3091bc2 Do not include <sys/ptrace.h> if we're building a cross-debugger, ptrace isn't
used anyway, and it breaks the build, since sys/ptrace.h now includes
<machine/reg.h>

Approved by:	re
2011-08-26 15:24:54 +00:00
John Baldwin
6dfd657c01 Walk the zombproc list as well as the allproc list when enumerating threads
and processes in a kernel image.  This allows examination of threads that
have exited or are in the late stages of exiting.

Tested by:	avg
Approved by:	re (kib)
MFC after:	1 week
2011-08-19 21:28:40 +00:00
Marius Strobl
39c5320dad Compile fbsd-threads.c. Amongst others this is necessary for a working
kgdb(1).

Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:53:45 +00:00
Nathan Whitehorn
682c9e0fed Update dialog to 1.1-20110707. 2011-07-14 14:01:36 +00:00
Sergey Kandaurov
c66ca7723b Provide a simple manual page for libprocstat(3).
Reviewed by:	jilles, gjb
2011-07-12 13:46:13 +00:00
David E. O'Brien
9fe1fe8204 Simply post r222273. 2011-06-08 21:29:33 +00:00
Ruslan Ermilov
0b545d875b Added FreeBSD 8.3. 2011-06-08 08:16:32 +00:00
Ruslan Ermilov
c8c215e682 Pull up all vendor changes to mdoc(7).
This also replaces the local fix in r219209 that made .Ac emit
ASCII angle quotes with an official fix.  In the official fix,
ASCII quotes are output when using the .Aq, .Ao and .Ac calls,
but only when nested into the .An macro.

PR:		gnu/154822
2011-06-08 08:08:42 +00:00
Attilio Rao
1de471dfee Revert r222363, as bde@ pointed out the initial solution was far more
correct.
2011-05-31 20:59:53 +00:00
Attilio Rao
d361ed4b1c Style fix: cast to size_t rather than u_long when comparing to sizeof()
rets.

Requested by:	kib
2011-05-27 16:01:51 +00:00
Attilio Rao
7fcdc9a26f MFC 2011-05-26 17:38:00 +00:00
David E. O'Brien
a23d1c70b3 Build and install a BSD licensed grep.
If WITH_BSD_GREP is not set, it will be 'bsdgrep' and GNUgrep will be
'[ef]grep'.  Otherwise, BSD-grep will be the grep family, and GNUgrep
will be 'gnugrep'.

Discussed with: brooks
2011-05-25 01:04:12 +00:00
Attilio Rao
1fff3a5663 MFC 2011-05-19 22:55:37 +00:00
Warner Losh
0163af2360 Implement WITH{,OUT}_{GCC,BINUTILS} to provide finer-grained control
over building gcc and binutils.  They default to true, unless
MK_TOOLCHAIN is no.

Reviewed by:	ru@
2011-05-19 05:13:25 +00:00
Attilio Rao
e0c109e8c1 MFC 2011-05-14 02:28:26 +00:00
Attilio Rao
4b547324c0 Disconnect sun4v architecture from the three.
Some files keep the SUN4V tags as a code reference, for the future,
if any rewamped sun4v support wants to be added again.

Reviewed by:	marius
Tested by:	sbruno
Approved by:	re
2011-05-14 01:53:38 +00:00
Attilio Rao
71a19bdc64 Commit the support for removing cpumask_t and replacing it directly with
cpuset_t objects.
That is going to offer the underlying support for a simple bump of
MAXCPU and then support for number of cpus > 32 (as it is today).

Right now, cpumask_t is an int, 32 bits on all our supported architecture.
cpumask_t on the other side is implemented as an array of longs, and
easilly extendible by definition.

The architectures touched by this commit are the following:
- amd64
- i386
- pc98
- arm
- ia64
- XEN

while the others are still missing.
Userland is believed to be fully converted with the changes contained
here.

Some technical notes:
- This commit may be considered an ABI nop for all the architectures
  different from amd64 and ia64 (and sparc64 in the future)
- per-cpu members, which are now converted to cpuset_t, needs to be
  accessed avoiding migration, because the size of cpuset_t should be
  considered unknown
- size of cpuset_t objects is different from kernel and userland (this is
  primirally done in order to leave some more space in userland to cope
  with KBI extensions). If you need to access kernel cpuset_t from the
  userland please refer to example in this patch on how to do that
  correctly (kgdb may be a good source, for example).
- Support for other architectures is going to be added soon
- Only MAXCPU for amd64 is bumped now

The patch has been tested by sbruno and Nicholas Esborn on opteron
4 x 12 pack CPUs. More testing on big SMP is expected to came soon.
pluknet tested the patch with his 8-ways on both amd64 and i386.

Tested by:	pluknet, sbruno, gianni, Nicholas Esborn
Reviewed by:	jeff, jhb, sbruno
2011-05-05 14:39:14 +00:00
Gordon Tetlow
16e07d175a Remove GNU man implemenation now that the BSD version has cooked for a while. 2011-04-21 07:14:10 +00:00
Dimitry Andric
6d67f69487 Remove libobjc and other Objective-C related components, as these are
extremely outdated, and not used by anything in the base system.

Silence from:	current@
2011-04-17 21:03:23 +00:00
Nathan Whitehorn
7a1c0d9633 Update dialog to version 1.1-20110302. 2011-04-17 17:28:17 +00:00
Dimitry Andric
66c468d021 In r219639, SSSE3 instruction set support was backported to our gcc.
Therefore, we also need to install the new tmmintrin.h header containing
the related intrinsic functions, similar to xmmintrin.h, emmintrin.h,
etc.

Reported by:	George Liaskos <geo.liaskos@gmail.com>
2011-04-14 16:45:16 +00:00
Konstantin Belousov
57c3423c39 Print the raw value of si_code, that is esp. useful for undecoded values.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2011-03-26 21:12:53 +00:00
Marcel Moolenaar
9d985cdc65 Change the load address from offset 0 in region 1 to offset 4G in region 0.
This (almost) gives us the address space back (at the bottom) that we lost
at the top.

Region 0 has traditionally been reserved for IA-32 emulation, which has not
been of great interest. By starting 64-bit processes at the 4G boundary we
at least preserve some of the advantages:
1.  Any invalid pointer cast (from int to pointer and back) will still
    always fail and not only when more than 4GB of memory is in use.
2.  Memory sharing between 64-bit and 32-bit processes is still possibly
    by using addresses < 4G.
2011-03-22 17:19:35 +00:00
Marcel Moolenaar
1961f30034 Branch from contrib/binutils/ld/emulparams/elf64_ia64_fbsd.s so that
we can modify it.
2011-03-22 17:02:33 +00:00
Marcel Moolenaar
a54f161a82 Fix typo: s/LIBSERACHPATH/LIBSEARCHPATH/g 2011-03-21 04:03:55 +00:00
Marius Strobl
d6582233c1 Now that TLS is supported for sparc64 by both binutils 2.17.50 committed
in r218822 and rtld(1) committed in r219533 turn on TLS support in GCC.
2011-03-11 21:24:02 +00:00
Dimitry Andric
ce8fb93178 Merge binutils 2.17.50 to head. This brings a number of improvements to
x86 CPU support, better support for powerpc64, some new directives, and
many other things.  Bump __FreeBSD_version, and add a note to UPDATING.

Thanks to the many people that have helped to test this.

Obtained from:	projects/binutils-2.17
2011-02-18 20:54:12 +00:00
Ulrich Spörlein
752d2f141b Add back soon-to-be-release FreeBSD 7.4 which got clobbered in the previous
merges.
2011-02-13 22:17:49 +00:00
Nathan Whitehorn
2774633be1 Enable wide character support in libdialog. 2011-02-05 16:23:32 +00:00
Warner Losh
39bf09d2a0 Make the generated files depend on the Makefile so new platforms are easier
to add than mipsn32 was when I was working on it...
2011-02-02 03:27:31 +00:00
Warner Losh
4ef48a113b Revert last change now that the reason for it is no more...
MACHINE_ARCH is now always mipsel when building mips/mips.
2011-02-02 03:24:52 +00:00
Jayachandran C.
1fb145a629 Rewrite the ARCH check another way for backward compatibility.
Compilation fails now, if TARGET_ARCH=mips instead of mipsel/mipseb.
2011-01-29 10:32:00 +00:00
Jayachandran C.
7b87c35eba Fix n32 compile.
These changes are needed to fix n32 compile after the recent change of
mips n32 MACHINE_ARCH to mipsn32eb/mipsn32el.

Reviewed by:	imp, bz (earlier version)
2011-01-27 14:16:12 +00:00
Ed Maste
89db1db777 Use string literal format strings to quiet clang warnings. 2011-01-23 14:08:59 +00:00
Ulrich Spörlein
7ea7457aac Update groff manpage and symbols with what has been submitted upstream.
Also remove local overrides that are now in the contrib tree.

This is a direct commit to contrib/ as we will no longer import any
newer groff snapshots, due to licensing issues.

MFC after:	3 weeks
2011-01-19 20:16:38 +00:00
Nathan Whitehorn
1e0658d5ca Add libm to the dependencies section.
Submitted by:	Garrett Cooper
2011-01-18 14:58:12 +00:00
Nathan Whitehorn
4c8945a06b Update dialog to version 20100428. This changes the license under which
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new
features and a new and better libdialog API. The existing libdialog will
be kept temporarily as libodialog for compatibility purposes until sade,
sysinstall and tzsetup have been either updated or replaced.

__FreeBSD_version is now 900030.

Discussed on:	-current
Approved by:	core
Obtained from:	http://invisible-island.net/dialog
2011-01-12 14:55:02 +00:00
Tijl Coosemans
911127a0d6 Remove unused support for 64 bit long on 32 bit architectures.
It was used mainly to discover and fix some 64-bit portability problems
before 64-bit arches were widely available.

Discussed with:	bde
Approved by:	kib (mentor)
2011-01-07 22:57:31 +00:00
Warner Losh
cd2ae2532f Retire TARGET_ABI.
Implement MACHINE_ARCH=mips64e[lb] to build N64 images.  This replaces
MACHINE_ARCH=mipse[lb] TARGET_ABI=n64.

MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires
WITHOUT_CDDL due to atomic issues in libzfs.  I've not investigated
this much, but implemented this to preserve as much of the TARGET_ABI
functionality that I could.  Since its presence doesn't affect the
working cases, I've kept it in for now.

Added mips64e[lb] to make universe, so more kernels build.

And I think this (finally) closes the curtain on the tbemd tree.
2011-01-07 20:26:33 +00:00
Alexander Kabaev
d933fa1a10 Switch mips architectures back to libgcc.
MIPS64 n64 binaries are broken with libcompiler_rt at this time.
Switch mips back to libgcc until the cause of breakage is analyzed
and fixed.
2010-12-29 17:12:05 +00:00
Nathan Whitehorn
af1fdf0dbf Fix a missing underscore. 2010-12-09 17:39:40 +00:00
Dimitry Andric
e3c77b8170 For ia64, add a proper 'elf64-ia64-freebsd' output format to BFD, so the
ELF branding for FreeBSD is done in the same way as amd64, i386 and
sparc.  Something similar should probably also be done for arm, mips and
powerpc.
2010-12-05 20:24:22 +00:00
Dimitry Andric
2006fbc8fe Sync: merge r215944 through r216132 from ^/head. 2010-12-02 22:00:57 +00:00
Nathan Whitehorn
35d4aa10d7 Unbreak amd64<->i386 cross builds. 2010-12-02 17:36:47 +00:00
Nathan Whitehorn
5a7bfc90a9 The driver-XXX.c files used for host CPU detection with -march=native
should not be compiled in the cross-tools case (where -march=native makes
no sense). This fixes cross-building x86 toolchains on non-x86 systems.
2010-12-02 04:58:07 +00:00
Dimitry Andric
a35d3535ee Sync: merge r215464 through r215708 from ^/head. 2010-11-22 20:52:18 +00:00
Attilio Rao
7f08176ee8 Add the ability for GDB to printout the thread name along with other
thread specific informations.

In order to do that, and in order to avoid KBI breakage with existing
infrastructure the following semantic is implemented:
- For live programs, a new member to the PT_LWPINFO is added (pl_tdname)
- For cores, a new ELF note is added (NT_THRMISC) that can be used for
  storing thread specific, miscellaneous, informations. Right now it is
  just popluated with a thread name.

GDB, then, retrieves the correct informations from the corefile via the
BFD interface, as it groks the ELF notes and create appropriate
pseudo-sections.

Sponsored by:	Sandvine Incorporated
Tested by:	gianni
Discussed with:	dim, kan, kib
MFC after:	2 weeks
2010-11-22 14:42:13 +00:00
Dimitry Andric
6b6403a102 Sync: merge r215396 through r215463 from ^/head. 2010-11-18 18:30:03 +00:00
Tijl Coosemans
cac88fd591 Let gcc and ld know where to find 32 bit libraries on amd64.
Reviewed by:	arch@
Approved by:	kib (mentor)
2010-11-17 19:54:01 +00:00
Dimitry Andric
9977fc32d1 Sync: merge r215319 through r215395 from ^/head, so ports can actually
build! :)
2010-11-16 10:33:41 +00:00
Nathan Whitehorn
ce0cfc0ef3 Garbage-collect some code made obsolete by the TBEMD import. 2010-11-15 22:12:13 +00:00
Nathan Whitehorn
4a380db544 Try including Makefile.${TARGET_ARCH} before Makefile.${TARGET_CPUARCH} if
it exists in order to allow arch-specific overrides. This fixes the
binutils (and world) build on powerpc64 after recent TBEMD merges.

Reviewed by:	imp
2010-11-15 22:11:18 +00:00
Dimitry Andric
29d0dcddab Sync: merge r215273 through r215318 from ^/head. 2010-11-14 20:47:30 +00:00
Yoshihiro Takahashi
c482218be3 Add missing '/'. 2010-11-14 11:09:16 +00:00
Warner Losh
5fb4617bc9 We need to add powerpc64->powerpc translations (I knew I hated copying
this code in the first place).

Also MACHINE_ARCH powerpc is 32-bit, not MACHINE_CPUARCH == powerpc.

Submitted by:	nathanw
2010-11-14 01:52:19 +00:00
Warner Losh
cf3b7dd35b These two cases should be different...
Submitted by:	nathanw@
2010-11-14 01:50:40 +00:00
Dimitry Andric
5fbbc222c8 Sync: merge r215141 through r215188 from ^/head. 2010-11-12 17:20:18 +00:00
Ed Schouten
585d4a8062 Revert to libgcc for sparc64.
I've had a report of a sparc64 system where cc1 generates illegal
instructions. We still have to diagnose this properly, but instead of
hosing all sparc64 boxes out there, fall back to libgcc to prevent more
damage.

Reported by:	Florian Smeets
2010-11-12 15:52:27 +00:00
Dimitry Andric
cfe6b823a2 Garbage collect gnu/usr.bin/binutils/{gasp,gdb,gdbreplay}, as these have
not been connected to the build for more than 6 years.

Obtained from:	projects/binutils-2.17
2010-11-11 23:45:19 +00:00
Dimitry Andric
dfbf73475a Do not build or install gasp.info anymore, as gasp has not been built or
installed for more than 6 years.

Obtained from:	projects/binutils-2.17
2010-11-11 23:41:36 +00:00
Dimitry Andric
1170f3d12e Sync: merge r214895 through r215140 from ^/head. 2010-11-11 20:52:24 +00:00
Ed Schouten
39cd938c39 Replace libgcc.a by libcompiler_rt.a.
libcompiler_rt.a is a BSD licensed C language runtime, which implements
many routines which are linked into binaries on architectures where
certain functionality is missing (e.g. 64 bits mul/div on i386).

Unfortunately, libcompiler_rt cannot replace libgcc entirely. Certain
features, such as an unwinder for exception handling, are missing.
That's why only libgcc.a is replaced for now, because this one does seem
to be complete.

Tested by:	rene (amd64), nwhitehorn (powerpc), droso (i386 exprun)
		and many others. Thanks!
Obtained from:	user/ed/compiler-rt
2010-11-11 15:48:27 +00:00
Ed Schouten
b70519663c Don't use ${LIB} to obtain the library name.
Once we use libcompiler_rt, the LIB-line must go, to prevent libgcc.a
from being built. Therefore, just hardcode the name.

Obtained from:	user/ed/compiler-rt
2010-11-11 15:24:57 +00:00
Warner Losh
e8dce5b9b3 Complete the integration of tbemd branch into head.
TARGET_BIG_ENDIAN is now completely dead, except where it was
originally supposed to be used (internally in the toolchain building).

TARGET_ARCH has changed in three cases:
(1) Little endian mips has changed to mipsel.
(2) Big endian mips has changed to mipseb.
(3) Big endian arm has changed to armeb.

Some additional changes are needed to make 'make universe' work on arm
and mips after this change, so those are commented out for now.

UPDATING information will be forthcoming.  Any remaining rough edges
will be hammered out in -current.
2010-11-10 06:39:49 +00:00
Oleksandr Tymoshenko
ce9346c8a4 Fix cross-debugger build 2010-11-07 23:23:48 +00:00
Oleksandr Tymoshenko
c8f6c2ae32 Fix initialization order:_initialize_svr4_solib should
be called before _initialize_thread_db
2010-11-07 23:22:22 +00:00
Oleksandr Tymoshenko
94b78d528f - Use proper constant for accessing PCB intead of hardcoded numbers
- Minor clean-up
2010-11-07 20:56:41 +00:00
Oleksandr Tymoshenko
a815718baf Link threads support to the build 2010-11-07 20:53:19 +00:00
Dimitry Andric
964cec1081 Simply our custom OSABI branding 'stub'. It is presently still needed
for ia64, but I will integrate it into contrib/binutils/bfd/elfxx-ia64.c
later on, after which it can be removed entirely.
2010-11-03 16:39:55 +00:00
Dimitry Andric
4e41c4ad7e Fix warnings in fbsd-threads.c. 2010-11-01 20:17:15 +00:00
Dimitry Andric
e9071af4e8 For stuff under gnu/usr.bin/gdb, search contrib/binutils/include before
contrib/gdb/include, since that contains newer versions of the same
files.
2010-11-01 20:09:54 +00:00
Dimitry Andric
ce43f651bd Update doc Makefile and texinfo config file. 2010-11-01 19:47:03 +00:00
Dimitry Andric
d6def1f86e Update config.h for ld. 2010-11-01 19:46:18 +00:00
Dimitry Andric
d2d5b59cdd Update Makefile and config.h for as. 2010-11-01 19:45:55 +00:00
Dimitry Andric
8bdf879215 Add manpages under gnu/usr.bin/binutils, since they are generated. 2010-11-01 19:45:15 +00:00
Dimitry Andric
28b535d1e0 Update Makefile and config.h.bsd for libbinutils. 2010-11-01 19:42:29 +00:00
Dimitry Andric
67f8e5a556 Update Makefile and config.h.bsd for libopcodes. 2010-11-01 19:42:07 +00:00
Dimitry Andric
0921c6ef0b Update Makefile, bfd.h and config.h.bsd for libbfd. 2010-11-01 19:41:22 +00:00
Dimitry Andric
878ad3892a Update Makefile and config.h for libiberty. 2010-11-01 19:40:22 +00:00
Dimitry Andric
f74ef8307a Update VERSION to 2.17.50 [FreeBSD] 2007-07-03. 2010-11-01 19:39:10 +00:00
Dimitry Andric
1368e47f87 Make sure elf_fbsd_post_process_headers() is actually called for ia64.
This is done by prepending the file to elfxx-ia64, not appending it.

Additionally, reduce diffs between Makefile.amd64 and Makefile.ia64;
instead of echo'ing defines in Makefiles, just add the needed define to
elf-fbsd-brand.c directly, as it is only used for amd64 and ia64.
2010-10-26 17:49:17 +00:00
Dimitry Andric
e083002bca Most of binutils now compiles at WARNS=3, except for libiberty and
libbfd, which still need WARNS=2.
2010-10-22 20:46:08 +00:00
Dimitry Andric
b927df46b1 In case of powerpc64, enable HAVE_LD_NO_DOT_SYMS in gcc's auto-host.h.
Requested by:	nwhitehorn
2010-10-22 20:43:37 +00:00
Dimitry Andric
7a66be1ab6 Update gcc's auto-host.h header for binutils 2.17: turn on
HAVE_COMDAT_GROUP, HAVE_GAS_WEAKREF and HAVE_LD_SYSROOT.
2010-10-22 18:12:40 +00:00
Dimitry Andric
162972bcf5 Garbage collect gnu/lib/libiberty and gnu/lib/libg2c, these have not
been used for years.
2010-10-22 18:11:17 +00:00
Dimitry Andric
f071fb0b44 Update makeinfo include paths, and configuration settings for the as
info page.
2010-10-21 20:34:29 +00:00
Dimitry Andric
a477c4b7f8 Update ldscript extension list. 2010-10-21 20:33:09 +00:00
Dimitry Andric
d9eabf4616 Use one file per line in SRCS= definition, to make insertions and
deletions easier, and sort the file list.
2010-10-21 20:31:59 +00:00
Dimitry Andric
a8620cbced Apply upstream changes to genscripts.sh, while attempting to keep the
diff as small as possible.
2010-10-21 20:30:35 +00:00
Dimitry Andric
e7cde49997 Remove weird double-pasted sections in armelfb?_fbsd.sh. 2010-10-21 20:29:16 +00:00
Dimitry Andric
5c049bc266 Regenerate config.h for ld. 2010-10-21 20:28:23 +00:00
Dimitry Andric
1e35dff483 Remove bignum-copy.c from SRCS=, as it no longer exists. Remove
tc-sparc-fixed.c entirely, since the fix has been integrated into
contrib/binutils/gas/config/tc-sparc.c by upstream.  Define TARGET_OS
in addition to the other TARGET_XXX defines.
2010-10-21 20:27:40 +00:00
Dimitry Andric
52eb44ceae Use one file per line in SRCS= definition, to make insertions and
deletions easier, and sort the file list.
2010-10-21 20:23:53 +00:00
Dimitry Andric
631c65aad6 Regenerate config.h for as. 2010-10-21 20:22:32 +00:00
Dimitry Andric
bebf802419 Add new upstream file, and update TARGET definition. 2010-10-21 20:21:36 +00:00
Dimitry Andric
8114428ba2 Use one file per line in SRCS= definition, to make insertions and
deletions easier, and sort the file list.
2010-10-21 20:20:33 +00:00
Dimitry Andric
8f4c1b2c16 Regenerate config.h for libbinutils. 2010-10-21 20:18:34 +00:00
Dimitry Andric
6efa94bc57 Update BFD version and date, and add new upstream files. Also remove
the elf32-arm-fbsd.c kludge; it is now integrated cleanly into
contrib/binutils/bfd/elf32-arm.c.
2010-10-21 20:17:13 +00:00
Dimitry Andric
3213eafad2 Use one file per line in SRCS= definition, to make insertions and
deletions easier, and sort the file list.
2010-10-21 20:08:16 +00:00
Dimitry Andric
2afbe6d79d Regenerate bfd.h and config.h.fbsd. 2010-10-21 20:04:28 +00:00
Dimitry Andric
5c89268c37 Add new upstream file to libiberty. 2010-10-21 20:02:47 +00:00
Dimitry Andric
2fe35e02e9 Use one file per line in SRCS= definition, to make insertions and
deletions easier.
2010-10-21 20:01:21 +00:00
Dimitry Andric
c6b1c1e809 Update binutils VERSION define for 2.17, and create separate
TARGET_VENDOR and TARGET_OS defines.  Set TARGET_TUPLE from
BINUTILS_ARCH, TARGET_VENDOR and TARGET_OS.
2010-10-21 19:58:20 +00:00
Dimitry Andric
bd9ba01aba Update the BFD and binutils version defines. 2010-10-19 20:17:17 +00:00
Dimitry Andric
45f6b172aa Garbage collect gnu/usr.bin/binutils/{gasp,gdb,gdbreplay}, as these have
not been connected to the build for 6 years now.
2010-10-18 21:04:55 +00:00
Dimitry Andric
7ce9c2e938 Do not build or install gasp.info anymore, as gasp is obsolete. 2010-10-18 20:59:46 +00:00
Jaakko Heinonen
9543d2735d Add FreeBSD 8.2.
Reviewed by:	ru
MFC after:	3 days
2010-10-14 14:48:11 +00:00
Xin LI
04bf016801 Add definition for FreeBSD 7.4, which will be used in a manual page change.
Reviewed by:	ru
MFC after:	3 days
2010-10-06 18:20:07 +00:00
Gordon Tetlow
023f0373a1 Retire GNU man in favor of the newly written BSDL version.
Approved by:	wes (mentor)
2010-10-03 22:24:14 +00:00
Rui Paulo
da1eef674b Remove target peigen.c so that make doesn't warn us about it. 2010-09-30 07:12:09 +00:00
Rui Paulo
c5c0eabc00 Add support for the BFD target efi-app-x86_64.
This uses only GPL2 source code and is a requirement for a 64 bit EFI
boot loader.
2010-09-29 14:41:03 +00:00
Ed Maste
d290883447 Move test for zero bufp or size before rseq and wseq calculation. This
avoids spinning in an infinite loop for some (possibly corrupt?) core
files at work.
2010-09-22 19:41:01 +00:00
Dimitry Andric
d205253515 When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2
and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile
flags are sometimes passed via this variable, for example during the
build32 stage on amd64.  This caused the 32-bit libobjc build on amd64
to fail.

Instead, only replace the first instance of clang (if any, including
optional path) with gcc, and leave the arguments alone.

Approved-by:	rpaulo (mentor)
2010-09-21 21:41:45 +00:00
Tijl Coosemans
2751839107 GCC defines built-ins for atomic instructions found on i486 and higher.
Because FreeBSD no longer supports the 80386 cpu all code targeting
FreeBSD/i386 necessarily runs on i486 or higher so the compiler
built-ins can be used by default inside libstdc++ and in C++ headers.
This allows newly compiled C++ code to inline some atomic operations.
Old binaries continue to use libstdc++ functions.

PR:		148926
Tested by:	Yuri Karaban <tech askold net>
Reviewed by:	kan
Approved by:	kib (mentor)
MFC after:	2 weeks
2010-09-07 08:33:17 +00:00
Dimitry Andric
c05f0da034 Use a more robust way to substitute gcc for clang, when compiling
gnu/lib/libobjc and sys/boot/i386/boot2, so it also works when using
absolute paths and/or options, as in CC="/absolute/path/clang -foo".

Approved by:	rpaulo (mentor)
2010-08-31 17:33:29 +00:00
Nathan Whitehorn
b12277d1d4 Repair some build breakage introduced in r211725 and garbage collect some
code made obsolete in the same commit.
2010-08-28 15:03:11 +00:00
Warner Losh
b57429d082 Create a checklist and call one of the *printw() functions from the
selected() callback. When the dialog first appears, you will not see
the printed statement on the dialog, if you move down one, you will,
move up again and it now appears. I am assuming that you call a
*printw() function on a line in the dialog box of course.

The fix, from the pr:
	This is a hack at best, I looked at the redraw code in
	dialog_checklist() and took the minimal amount of it out to do
	a simple "refresh" right after the items are drawn. This
	doesn't hurt anything and makes the library work like it
	should. There is probably a better way however =).

PR:		148609
Submitted by:	John Hixson
2010-08-24 06:30:46 +00:00
Warner Losh
25faff346c MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
Gabor Kovesdan
6608cc579e - Change default grep back to GNU version. BSD grep can be built with the
WITH_BSD_GREP knob.
- Bump __FreeBSD_version

Requested by:   dougb
Approved by:    delphij (mentor)
2010-08-23 10:04:26 +00:00
Rui Paulo
3a060e4a1a We need to pull bsd.own.mk before modifying the CC variable. Otherwise
it will be overwritten when we include bsd.lib.mk.

Pointed out by:	Dimitry Andric <dimitry at andric.com>
2010-08-21 14:59:37 +00:00
Will Andrews
4be3feb212 Fix buildworld -DNO_CLEAN when using with Perforce, which marks files as
read-only by default, meaning files copied can't be overwritten next time.

Reviewed by:	imp
Approved by:	ken (mentor)
2010-08-12 20:46:49 +00:00
John Baldwin
68819dae55 Change kgdb_lookup() to resolve symbols via GDB instead of via libkvm(3). 2010-08-04 21:02:04 +00:00
Jung-uk Kim
03b2888ea1 Give kgdb(1) a chance to take a look at FPU state. 2010-08-02 17:40:25 +00:00
Ulrich Spörlein
419fbf6975 Fix case for library macros 2010-08-02 15:33:16 +00:00
Rui Paulo
7cbb9251a6 Add libproc.
Sponsored by:	The FreeBSD Foundation
2010-07-31 14:57:33 +00:00
Rui Paulo
8f19d9820c Add librtld_db.
Sponsored by:	The FreeBSD Foundation
2010-07-31 14:36:34 +00:00
Andriy Gapon
7996bf419b kgdb: correctly map sections to addresses in elf object modules (amd64)
Unlike for modules with dso type, in elf object modules all the sections
have virtual address of zero.  So, it is insufficient to add module base
address to section virtual address (as recorded in section header) to
get section address in kernel memory.
Instead, we should apply the same calculations that are performed by
kernel loaders (in boot code and in kernel) when they lay out sections
in memory.

Discussed with:	jhb, np
MFC after:	3 weeks
2010-07-23 17:21:23 +00:00
Rui Paulo
fcfec2f998 Disable building libobjc with clang as it's not yet supported.
Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-07-22 18:49:27 +00:00
Marcel Moolenaar
0d95bb16e3 Sanitize CFLAGS and add WARNS?=2. The hardcoding of -Os -fPIC
as compiler options resulted in an invalid executable on PowerPC.
2010-07-15 02:22:50 +00:00
Nathan Whitehorn
2cf64c8006 Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.

Obtained from:	projects/ppc64
2010-07-10 02:29:22 +00:00
Benedict Reuschling
4935d54b6a Mention the radiolist option in the man page. It is being listed when
dialog(1) is run without arguments and works as expected. Therefore,
it should be part of the manual as well.

Note: dialog(1) has not been updated for many years and is not actively
maintained at the moment.

PR:             docs/139682
Submitted by:   manolis@
Discussed with: jkim@
MFC after:      2 weeks
2010-07-06 18:06:10 +00:00
Konstantin Belousov
46d44c29db For "thread signal" command, print some information from siginfo when
available.

Suggested by:	davidxu
MFC after:	2 weeks
2010-07-04 12:09:30 +00:00
Jayachandran C.
d12582eb67 Add an alignment of 8 for sections in the n32 ABI. The default alignment
of of 4 causes _end to be word aligned, which will be returned by sbrk.

malloc(3), when compiled for n32, expects sbrk to return an 8-byte aligned
value.

Approved by:	rrs (mentor)
2010-06-25 05:07:42 +00:00
Konstantin Belousov
15744a9c4c Often reported issue with newer ld is:
error in /usr/lib/crtendS.o(.eh_frame); no .eh_frame_hdr table will be created.

The issue is that crtend is compiled with unwind table, and also it
places the special CIE into the .eh_frame indicating the end of section,
that is located before generated unwind table. New ld has assertion that
verifies that closing CIE is indeed the last CIE, causing the crypting
message to be issued, and refusing to generate dwarf unwind.

Add -fno-asynchronous-unwind-tables to disable unwind table generation
for crtbegin/crtend. While there, disable omitting the frame pointer [1].

Requested by:	kan [1]
Reviewed by:	kan
MFC after:	2 weeks
2010-06-18 11:09:51 +00:00
Andrey V. Elsukov
516ce862b0 Make all tests in libdialog compilable.
Fix coredump in menu3.c.

Approved by:	kib (mentor)
2010-06-15 10:01:49 +00:00
Rafal Jaworowski
3c5326bf4a Connect FDT infrastructure to the build system.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-06-13 13:02:43 +00:00
Juli Mallett
8da70fdc42 Fix build for O32 systems without a TARGET_CPUTYPE defined. We must default to
MIPS-III because FreeBSD relies on a number of MIPS-III features; the ABI
default would be MIPS-I which we don't intend to support.  Our old default
before I switched to using the ABI default was MIPS32.
2010-06-02 21:15:00 +00:00
Juli Mallett
5619a3e4bf Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain.
o) Add TARGET_ABI to the MIPS toolchain build process.  This sets the default
   ABI to one of o32, n32 or n64.  If it is not set, o32 is assumed as that is
   the current default.
o) Set the default GCC cpu type to any specified TARGET_CPUTYPE.  This is
   necessary to have a working "cc" if e.g. mips64 is specified, as binutils
   will refuse to link objects using different ISAs in some cases.
o) Add support for n32 and n64 ABIs to binutils and GCC.
o) Add additional required libgcc2 stubs for n32 and n64.
o) Add support for the "mips64r2" architecture to GCC.  Add the "octeon"
o) When static linking, wrap default libraries in --start-group and
   --end-group.  This is required for static linking to work on n64 with the
   interdependencies between libraries there.  This is what other OSes that
   support n64 seem to do, as well.
o) Fix our GCC spec to define __mips64 for 64-bit targets, not __mips64__, the
   former being what libgcc, etc., check and the latter seemingly being a
   misspelling of a hand merge from a Linux spec.
o) When no TARGET_CPUTYPE is specified at build time, make GCC take the default
   ISA from the ABI.  Our old defaults were too liberal and assumed that 64-bit
   ABIs should default to the MIPS64 ISA and that 32-bit ABIs should default to
   the MIPS32 ISA, when we are supporting or will support some systems based on
   earlier 32-bit and 64-bit ISAs, most notably MIPS-III.
o) Merge a new opcode file (and support code) from a later version of binutils
   and add flags and code necessary to support Octeon-specific instructions.
   This should also make merging opcodes for other modern architectures easier.

Reviewed by:	imp
2010-06-02 11:06:03 +00:00
Rafal Jaworowski
a95b1d6c6a Correct dtc version header autogen location.
While there unify brackets usage.
2010-05-25 13:27:55 +00:00
Jung-uk Kim
07e547fe26 Add a new build option, MAN_UTILS. This option lets you control building
utilities and related support files for manual pages, which were previously
controlled by MAN.  For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS.  This patch
is slightly improved by me from:

PR:		misc/145212
2010-05-19 23:56:26 +00:00
David E. O'Brien
680e78b305 Non-GCC gcc compatible compilers may provide the same multimedia intrinsic
headers as GCC, but of their own implementation.  So put the GCC ones into
their own header "namespace".

Requested by:	ed
2010-05-12 19:59:32 +00:00
Xin LI
8bbe8f7393 Add FreeBSD 8.1 to known list as it's being referenced by a couple of
manpages already.

MFC after:	3 days
2010-04-29 18:37:56 +00:00
Warner Losh
d578fbb66e Make this directory more regular. Since it is one we control, use the
freebsd-based names for filenames.  This allows us to eliminate
almost all of the uses of ${MACHINE_ARCH} here to do special things, and
instead we use it to include filenames.  This makes new architectures easier
to support.
2010-04-14 20:31:06 +00:00
Ulrich Spörlein
aa12cea2cc mdoc: order prologue macros consistently by Dd/Dt/Os
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)
2010-04-14 19:08:06 +00:00
Warner Losh
b29d0c6134 Simplify how we select which architectures to add gdbserver for. If
the MD files exist, compile it, otherwise omit it.
2010-04-12 23:35:58 +00:00
Ed Schouten
99742a231f Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
2010-03-28 13:16:08 +00:00
Marcel Moolenaar
2a4510e122 Allow building a cross-kgdb for ia64. 2010-03-26 19:41:40 +00:00
Marcel Moolenaar
10da4aa601 Handle cross-builds for gdbserver. 2010-03-26 19:40:53 +00:00
Xin LI
36e60cda45 Remove GNU cpio after fix of CVE-2010-0624.
Note that this is actually a no-op for most users, as this GNU
cpio was broken on -HEAD and 8-STABLE since last March until
the recent fix.

FreeBSD 8.0+ uses BSD cpio by default and the code is being
actively maintained.

Blessed by:	kientzle
With hat:	secteam
MFC after:	3 days
2010-03-26 17:02:32 +00:00
Warner Losh
ebbcc89c45 This broke when we went to gnu99 as the default standard. Fix the build
by reverting to the gnu89 standard.
2010-03-24 20:20:28 +00:00
Warner Losh
ae84e39b61 Fix typo in comment 2010-03-19 05:40:47 +00:00
Warner Losh
56ac80ce81 Make little endian compiles produce little endian binaries on mips.
Submitted by:	neel@
2010-03-05 21:24:41 +00:00
Rafal Jaworowski
9649a9dd26 Remove stale path reference. 2010-03-05 19:51:02 +00:00
Warner Losh
9737f6898d Make the n32 scripts actually generate, ummm, n32 binaries... <blush>
Submitted by:	jmallet
2010-03-04 04:30:16 +00:00
Warner Losh
69be831fc8 Add n32 ABI generators...
Submitted by:	neel, jmallet
2010-03-02 05:43:04 +00:00
Rafal Jaworowski
78fffe9d7b Provide BSD-style Makefile for the device tree compiler (dtc).
Note it is not connected to the build hierarchy yet.

Sponsored by:	The FreeBSD Foundation
2010-02-28 22:09:09 +00:00
Jung-uk Kim
bdcf2df5c2 Initial gdbserver support for amd64. 2010-02-25 21:29:00 +00:00
Xin LI
aa74e2f883 POSIX patch(1) would treat -b as different meaning (the functionality
is to be provided by --suffix).  Looking at the usage here in diffutils,
it seems that we can just get rid of the -b .orig stuff.  This resolves
a problem that can triggered if we move toward to a more permissively
licensed patch(1) program.
2010-02-22 22:32:24 +00:00
Gabor Kovesdan
5e72825fcd - Remove GNU bc/dc bits. There has not been any regressions seen after
BSD bc/dc import. It has been tested with make universe that this code
  is not used by anything any more.

Approved by:	delphij (mentor)
2010-02-21 14:28:03 +00:00
Randall Stewart
7e1f32462d These contain JC's patch to get gdb sort of working
on mips. Its not fully done yet but its a start.

Obtained from: JC - c.jayachandran@gmail.com

M    gnu/usr.bin/gdb/kgdb/trgt_mips.c
M    gnu/usr.bin/gdb/arch/mips/init.c
M    gnu/usr.bin/gdb/arch/mips/Makefile
M    gnu/usr.bin/Makefile
M    contrib/gdb/gdb/mips-tdep.h
2010-02-20 17:29:27 +00:00
Marcel Moolenaar
f6c3201d66 Compile fbsd-threads.c. Threading & TLS support is working just fine. 2010-02-16 16:38:57 +00:00
Andriy Gapon
c12959b335 kgdb: initialize n_type field of nlist entry for kvm_nlist call
kvm_nlist skips lookup for entries that have n_type != N_UNDF.
N_UNDF happens to be zero, so n_type typically has a correct
value by accident, but not always.
Note: jhb has a patch that replaces kvm_nlist use with direct
gdb parsing.

MFC after:	5 days
X-MFC-Note:	unless jhb commits kvm_nlist => kgdb_parse change
2010-02-13 11:47:04 +00:00
Marcel Moolenaar
2ebd5d2871 Add description for libefi.
Pointed out by: ru
2010-02-09 18:40:40 +00:00
Warner Losh
8f2411c3b5 Remove alpha support from here too. FreeBSD 6 was the last branch to
support it.
2010-02-03 18:32:29 +00:00
Warner Losh
c684b5612f Remove more traces of the Alpha port. 2010-02-03 18:29:35 +00:00
Warner Losh
e70f20b0e8 Remove another reference to alpha... 2010-02-03 02:39:08 +00:00
Joerg Wunsch
4d36f1aaf1 Add a libgpib to the list of known .Lb names.
MFC after:	3 days
2010-02-01 20:54:45 +00:00
Stephane E. Potvin
a070c49911 Use the new PO_CXXFLAGS from r202807 to remove the '-ffunction-sections'
flag when compiling profiled objects as it's ignored by the compiler.
This removes the associated warning for each file compiled.

MFC after:	1 month
2010-01-22 14:09:15 +00:00
Gabor Kovesdan
fdf1f88bce Replace GNU bc/dc with BSDL versions ported from OpenBSD. They have a good
compatibility level with the GNU counterparts and have shown to be mature
enough. For now, the GNU versions aren't removed from the tree, just detached
from the build.

Sponsored by:		Google Summer of Code 2008
Portbuild run by:	erwin
Approved by:		delphij
2010-01-20 21:30:52 +00:00
Ruslan Ermilov
1b2ef7353d Moved the doc-str-Lb-libulog string definition to where it belongs. 2010-01-15 14:05:06 +00:00
Ruslan Ermilov
4d433b8ccd Pull up vendor changes. The following local changes made obsolete:
- Addition of several FreeBSD versions.
- r192561 that attempted to fix UTF-8 issues.
2010-01-15 13:59:50 +00:00
Warner Losh
e1694bc9a6 Merge r195030 from project/mips into head by hand:
r195030 | gonzo | 2009-06-25 19:27:31 -0600 (Thu, 25 Jun 2009) | 4 lines
- Switch to libc softfloat from libgcc implementation. The problem
    with latter is that it is not complete, fpsetXXX/fpgetXXX
    functions are missing.
2010-01-08 23:11:23 +00:00
Warner Losh
7eb498c3b5 Merge r195575 and 195530 from projects/mips to head by hand:
r195575 | imp | 2009-07-10 12:24:02 -0600 (Fri, 10 Jul 2009) | 2 lines
quick hack for the problem gonzo is seeing.

r195530 | imp | 2009-07-10 01:18:30 -0600 (Fri, 10 Jul 2009) | 5 lines
Always build all 4 emulators into the mips toolchain.
# I think we have a gcc spec file issue with abi=64 since I have to do other
# hacks to get it mostly kinda right.
2010-01-08 23:09:11 +00:00
Warner Losh
bd8c0ffba9 Merge from project/mips r195021:
r195021 | gonzo | 2009-06-25 18:44:23 -0600 (Thu, 25 Jun 2009) | 2 lines
- Add MIPS to the list of 32-bit architectures
2010-01-08 23:06:56 +00:00
Warner Losh
9531b8c0b4 Back-merge (by hand) r195668:
r195668 | gonzo | 2009-07-13 17:01:12 -0600 (Mon, 13 Jul 2009) | 3 lines
- Get rid of ugly TARGET_CPU_DEFAULT default. 16 is MASK_DSP
    and was set there due to my ignroance.
2010-01-08 23:02:17 +00:00
Alexander Kabaev
9fa014a263 Fix one spelling and one copy&paste error in comments. 2009-12-14 01:51:23 +00:00
Alexander Kabaev
573cb89b8d Compile libgcov without stack protection. It can be linked into
both static and dynamic binaries compiled with or without stack
protection and should not depend on libssp_nonshared.a symbols.

Discussed with: kib
PR:		bin/139052
2009-10-25 15:52:31 +00:00
Alan Cox
a47b9d74fc Add FreeBSD 7.2 and 7.3.
Discussed with:	ru
2009-09-21 17:19:36 +00:00
Stephane E. Potvin
68961d1200 The buffer returned by fgenln is not a "C" string and might not be NUL
terminated. Make sure that it is before using it.

Reviewed by:	marck@
MFC after:	3 days
2009-09-16 19:53:29 +00:00
Ed Schouten
69eb6d71d0 Add support for diffs generated by Perforce.
It basically picks the filenames from the "====" line and strips off the
# revision number.
2009-08-23 12:23:24 +00:00
Ken Smith
cf48cc9f69 Make head 9.0-CURRENT in preparation for lifting code freeze.
Approved by:	re (implicit)
2009-08-22 23:44:37 +00:00
Ken Smith
3ca3047aee Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
2009-07-19 17:25:24 +00:00
Alexander Kabaev
2286fe7635 Second attempt at eliminating .text relocations in shared libraries
compiled with stack protector.

Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC
generates local calls to this function which result in absolute
relocations put into position-independent code segment, making dynamic
loader do extra work every time given shared library is being relocated
and making affected text pages non-shareable.

Reviewed by:        kib
Approved by:        re (kib)
2009-07-14 21:19:13 +00:00
Alexander Kabaev
d48890cfb8 Back out previous revision until better tested fix is ready.
Approved by: re (impliciti, by approving previos check-in)
2009-06-29 01:33:59 +00:00
Alexander Kabaev
a162c9ae9c Eliminate .text relocations in shared libraries compiled with stack protector.
Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC generates
local calls to this function which result in absolute relocations put into
position-independent code segment, making dynamic loader do extra work everys
time given shared library is being relocated and making affected text pages
non-shareable.

Reviewed by:        kib
Approved by:        re (kensmith)
2009-06-28 23:51:39 +00:00
Jamie Gritton
de6f37045c Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by:	bz (mentor)
2009-06-24 18:18:35 +00:00
Alexander Kabaev
c78339e9d8 Compile static gcov library with -fPIC to match what stock GCC builds
are doing. This is required for libgcov.a to be usable on amd64.

Reported by:	stas
2009-06-21 01:54:47 +00:00
Brian Somers
c33b82645a Don't set $PATH - if the caller doesn't have /bin and /usr/bin in their
PATH then they can expect things to break.

PR:		135417
MFC after:	3 weeks
2009-06-14 06:09:33 +00:00
Stephane E. Potvin
9ab20e104c Change the internal buffer used to store input lines from a static buffer
to a dynamically allocated one in order to support input lines of
arbitrary length.

Approved by:	kan (mentor)
MFC after:	1 month
2009-05-08 02:18:46 +00:00
David Schultz
14b55f2f95 Fix build breakage due to the interplay between r189801 and r189824.
In particular, vendor sources that aren't ready for gnu99 should
still be compiled with gnu89. (Before r189824, these would have
generated warnings if you tried to compile them in gnu99 mode,
but the warnings went unheeded due to -Wno-error.)
2009-03-14 22:50:03 +00:00
David Schultz
8bc369a3e1 Define a macro for POSIX.1-2008 here until a future groff import
includes one.
2009-02-28 05:47:41 +00:00
Ruslan Ermilov
107e14e304 Restore the install location of libssp.so.0.
Noticed by:	tegge
2009-02-24 16:14:15 +00:00
Rafal Jaworowski
ab8b490a63 Initial gdbserver support for PowerPC.
Obtained from:	Juniper Networks, Semihalf
2009-02-23 18:22:49 +00:00
Ruslan Ermilov
d9ca85fca7 Fix build when WITH_SSP is set explicitly.
Submitted by:	Jeremie Le Hen
2009-02-21 15:04:31 +00:00
Jung-uk Kim
455cc6ec70 Honor WITHOUT_INSTALLLIB in some places. 2009-02-13 16:51:36 +00:00
David E. O'Brien
b29362d8dd For files not named on the command line, only the basename is compared
to the exclude pattern.
Change this so that "grep --exclude='*/.svn/*' -[Rr] foo *" DWIM.

Obtained from:	dave+news001@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Dave Gibson)
Obtained from:	comp.unix.questions [Thu, 15 Mar 2007 18:54:38 +0000]
Obtained from:	http://unix.derkeiler.com/Newsgroups/comp.unix.questions/2007-03/msg00046.html
2009-01-30 00:22:08 +00:00
Warner Losh
599e167f48 There's no need to redundantly redefine atomicity.h. 2008-12-31 07:39:23 +00:00
Ken Smith
3fdaf2d2f9 Remove the /usr/X11R6 paths. It has been long enough since the X stuff
moved to /usr/local.

Checked with:	des (last person to have fiddled with this)
MFC after:	1 month
2008-12-30 16:00:36 +00:00
Ruslan Ermilov
e5022d8c10 Added FreeBSD 6.4. 2008-12-13 16:13:37 +00:00
Ruslan Ermilov
99e1e6f30a Added FreeBSD 7.1. 2008-12-13 15:47:46 +00:00
Warner Losh
5abe265777 Push mips support into the tree. 2008-12-11 08:20:34 +00:00
Warner Losh
d7aeea2745 Push mips support for ld into the tree. 2008-12-11 08:18:45 +00:00
Warner Losh
7932522f76 Push mips support for as into the tree. 2008-12-11 08:15:14 +00:00
Konstantin Belousov
20e76cb365 Add strndup(3) prototype to string.h.
This change was erronously ommitted from the r185690, and attempt
to simply add the prototype to string.h has revealed that several
contributed programs defined local prototypes for strndup(), controlled
by autoconfed config.h. So, manually change #undef HAVE_STRNDUP to
#define HAVE_STRNDUP 1. Next import of the corresponding program would
regenerate config.h, overriding the changes in this commit.

No objections from: kan
2008-12-08 21:04:24 +00:00
Rafal Jaworowski
c7b4433263 Initial gdbserver support for ARM.
Obtained from:	Juniper Networks, Semihalf
2008-11-17 16:32:57 +00:00
David E. O'Brien
ee81baecd8 Document what the sed trick is for.
Remove an embedded <TAB>, and use same style for both files.
2008-10-16 18:09:27 +00:00
Dag-Erling Smørgrav
ba377f119f Enable UTF-8.
MFC after:	1 week
2008-10-08 13:16:20 +00:00
John Baldwin
27f38446be Oops, initialize sections and sections_end to NULL.
Submitted by:	Navdeep Parhar
MFC after:	1 week
2008-10-02 20:42:10 +00:00
Marcel Moolenaar
5f85c2cdd9 Revert previous commit. The prototype has been moved to unistd.h 2008-09-28 19:17:54 +00:00
Konstantin Belousov
42003afced Differentiate between interrupt frames, trap interrupt frames and timer
frame in the kgdb, to allow it to properly backtrace over the interrupt
stacks.

Noted and reviewed by:	tegge
Tested by:	pho
MFC after:	1 week
2008-09-27 15:58:37 +00:00
Marcel Moolenaar
3e5dafac90 Add -D_OSRELDATE_H to CFLAGS to prevent the declaration of
getosreldate() in assembler source files. We still get the
definition of __FreeBSD_version this way, because it's
outside the standard multiple-inclusion protection trick.

All this is specific to ia64.
2008-09-26 15:00:18 +00:00
John Baldwin
59c47d99be Use existing GDB routines for parsing the section table of klds in
the 'add-kld' command instead of doing it more by hand.

MFC after:	1 week
2008-09-25 19:32:03 +00:00
Sam Leffler
690f477d75 add new build knobs and jigger some existing controls to improve
control over the result of buildworld and installworld; this especially
helps packaging systems such as nanobsd

Reviewed by:	various (posted to arch)
MFC after:	1 month
2008-09-21 22:02:26 +00:00
Warner Losh
ca7da4c058 MFP4: Add mips to the list of soft-float platforms. 2008-09-19 03:09:36 +00:00
Warner Losh
608a4df923 mfp4: sort the architectures alphabetically... 2008-09-19 02:30:22 +00:00
Warner Losh
bfb4b856d3 Prefer the patch in p4 to the patch in svn as it properly sorts the
architectures alphabetically.
2008-09-19 01:35:34 +00:00
Marcel Moolenaar
93898f2b2d Widen psaddr_t from uintptr_t to uint64_t. This results in an
ABI change on ILP32 platforms and relating to events.  However
it's harmless on little-endian ILP32 platforms in the sense
that it doesn't cause breakages.  Old ILP32 thread libraries
write a 32-bit th_p and new thread libraries write a 64-bit
th_p.  But due to the fact that we have an unused 32-bit data
field right after th_p and that field is always initialized to
zero, little-endian ILP32 machines effectively have a valid
64-bit th_p by accident. Likewise for new thread libraries and
old libthread_db: little endian ILP32 is unaffected.

At this time we don't support big-endian threaded applications
in GDB, so the breakage for the ILP32 case goes unnoticed.
2008-09-14 16:52:42 +00:00
David E. O'Brien
4bdc01a9f9 Add FreeBSD/MIPS support to GCC. 2008-09-01 18:46:03 +00:00
David E. O'Brien
5555bfc259 GDB isn't building on MIPS. Temporarily disable, to revisit soon. 2008-09-01 18:18:19 +00:00
David E. O'Brien
9dec52bfb2 Turn cc_tools/Makefile and Makefile.tgt into a "linear" read. Shared
parts of the configuration aren't duplicated, and arch-specific exceptions
are made "in-place".  Also clean up the FreeBSD/amd64 config a little.
2008-08-31 23:38:28 +00:00
Rui Paulo
a9435ff4dd Enable EFI target.
While there, make use of the DEFAULT_VECTOR variable.
2008-08-31 09:17:27 +00:00
Doug Rabson
8f55a568f6 Add an implementation of the RPCSEC_GSS authentication protocol for RPC. This
is based on an old implementation from the University of Michigan with lots of
changes and fixes by me and the addition of a Solaris-compatible API.

Sponsored by:	Isilon Systems
Reviewed by:	alfred
2008-08-06 14:02:05 +00:00
Olivier Houchard
7aab344dc1 Unbreak the arm build, by spelling LIBSRCS correctly. 2008-08-02 12:33:39 +00:00
Olivier Houchard
21fb986f16 Do not build fbsd-threads.c if we're building a cross-debugger.
MFC after:	3 days
2008-08-02 01:21:04 +00:00
Peter Wemm
c6acfe86c7 Merge gnu cpio 2.6 -> 2.8 changes. Unfortunately, we have massive
conflicts due to radically different approaches to security and bug fixes.
In some cases I re-started from the vendor version and reimplemented our
patches.  Fortunately, this is not enabled by default in -current.
2008-07-10 02:08:00 +00:00
David E. O'Brien
3c46f7891b Instead of using .POSIX:, use the cool looking "@:" rule.
Submitted by:	ru
2008-06-27 14:59:23 +00:00
Ruslan Ermilov
042df2e2da Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
  turned opt-in for stable branches depending on the consensus.  You
  can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
  It is harmless to steal the knob as SSP symbols have been provided
  by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
  (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
  libc will be automatically downgraded to -fstack-protector because it
  breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by:	Jeremie Le Hen <jeremie@le-hen.org>
2008-06-25 21:33:28 +00:00
John Baldwin
ad335b4edf Catch up to recentish kgdb changes:
- Use ptid_get_pid() rather than ptid_get_tid() (part of the changes to
  let 'tid' work for remote kgdb).
- Add a stub kgdb_trgt_new_objfile() hook.

Silence from:	obrien, mips@
2008-06-18 14:23:28 +00:00
Alexander Kabaev
8fecbb4e34 Install extra include files that were forgotten in original GCC 4.2.x
import changes.

PR: 124647
Submitted by: Vlad GALU
MFC after: 2 days
2008-06-16 22:49:30 +00:00
Doug Barton
6973701a00 1. Make the BSD version of cpio the default [1]
a. The BSD version will be built and installed unless
WITHOUT_BSD_CPIO is defined.
b. The GNU version will not be built or installed unless
WITH_GNU_CPIO is defined. If this is defined, the symlink
in /usr/bin will be to the GNU version whether the BSD
version is present or not.

When these changes are MFCed the defaults should be flipped.

2. Add a knob to disable the building of GNU grep. This will
make it easier for those that want to test the BSD version in
the ports.

Approved by:	kientzle [1]
2008-06-16 05:48:15 +00:00
Tim Kientzle
e761102df3 Install GNU cpio as 'gcpio', symlink to 'cpio' unless WITH_BSDCPIO is
defined.
2008-05-26 17:21:12 +00:00
David E. O'Brien
486b0cc401 Add Juniper's copyright. 2008-05-20 22:58:47 +00:00
David E. O'Brien
aa4a28bd31 MIPS arch target kgdb(1) support.
Obtained from: Juniper Networks.
2008-05-20 22:54:42 +00:00
Ruslan Ermilov
d0010c62b2 Add support for bzip2-compressed manpages.
PR:		bin/120730
Submitted by:	ighighi AT gmail DOT com
MFC after:	1 week
2008-05-14 17:18:12 +00:00
Ruslan Ermilov
6ccf134528 Add an ability to run man(1) on local files (the argument should
contain a `/' character); based on the submission in the PR.

PR:		bin/120730
MFC after:	1 week
2008-05-14 17:08:31 +00:00
John Baldwin
084bc6a480 Trim unneeded header. 2008-05-09 19:00:40 +00:00
Doug Rabson
33f1219925 Fix conflicts after heimdal-1.1 import and add build infrastructure. Import
all non-style changes made by heimdal to our own libgssapi.
2008-05-07 13:53:12 +00:00
John Baldwin
774bd9bf03 Go back to fondling FILE internals. 2008-05-05 16:12:28 +00:00
Marcel Moolenaar
4655d57927 Lower WARNS to avoid warning about type-punned casting. 2008-05-04 04:13:35 +00:00
Marcel Moolenaar
0aca787a7b Unbreak build: gnu sort has been configured to grope inside struct
__sFILE. It's opaque now, so add a function that returns the pending
output bytes.

Pointy hat: jhb
2008-05-03 23:36:00 +00:00
Oleksandr Tymoshenko
36da6811b7 Add MIPS to the list of "no TLS" architectures.
Approved by:	cognet (mentor)
2008-05-03 21:24:28 +00:00
John Baldwin
53df73db45 - Change how the vmcore target maps FreeBSD thread IDs to GDB ptids. We
now only use the TID and ignore the PID and use pid_to_ptid() to build a
  ptid treating the TID as a PID.  The benefit of this is that the vmcore
  target now uses the same scheme as GDB's remote targets.  As a result,
  the 'tid' command now works for remote targets (however, it only accepts
  TIDs and not addresses of 'struct thread' objects).
- Use gdb_thread_select() to do the actual thread switch for the 'tid' and
  'proc' commands.  This now gives the same UI feedback when switching
  threads as the GDB 'thread' command rather than providing no visual
  output at all.

MFC after:	1 week
2008-05-01 20:36:48 +00:00
John Baldwin
3461a0f244 Rework how kgdb manages kernel and vmcore files to be a bit more gdb-ish
so that kgdb can be used more like a normal gdb:
- Load the kernel via the standard 'exec' target and allow it to be changed
  via the 'file' command.
  - Instead of explicitly loading the kernel file as the mail symbol file
    during startup, just pass it to gdb_main() as the executable file.
  - Change the kld support (via shared libraries) to cache the address of
    the linker_files and linker_kernel_file variables in addition to the
    offsets of various members in 'struct linker_file'.
  - When a new symbol file is loaded, recompute the addresses and offsets
    used by the kld support code.
  - When a new symbol file is loaded, recalculate the ofs_fix variable to
    account for the different ways a trapframe can be passed to trap
    frame handlers in i386.  This is done by adding a MD
    kgdb_trgt_new_objfile() hook that is empty on all but i386.
  - Don't use the directory name of the kernel specified on the command
    line to find kernel modules in the kld support code.  Instead,
    extract the filename of the current executable via exec_bfd.  Now
    the 'kernel' variable is private to main.c again.
  - Make the 'add-kld' command explicitly fail if no executable is loaded.
- Make the support for vmcores a real core-dump target that opens the
  kernel and vmcore on open and closes the kvm connection when closed, etc.
  - The 'core' command can now be used to select a vmcore to use, either
    a crash dump file or /dev/mem for live debugging.
  - The 'detach' command can be used to detach from a vmcore w/o attaching
    to a new one.
  - kgdb no longer explicitly opens a core dump during startup and no longer
    has to use an atexit() hook to close the kvm connection on shutdown.
  - Symbols for kld's are automatically loaded anytime a core is opened.
    Also, the unread portion of dmesg is dumped just as it was done on kgdb
    startup previously.
- Don't require either a remote target or core dump if a kernel is specified.
  You can now just run 'kgdb kernel' similar to running gdb on an executable
  and later connect to a remote target or core dump.
- Use a more relaxed way to verify remote targets specified via -r.
  Instead of explicitly allowing a few non-file target specifications,
  just assume that if stat() on the arg and on "/dev/" + arg both fail
  that is some non-file target and pass it to gdb.
- Don't use a custom interpreter.  The existing kgdb_init() hook and the
  target_new_objfile() hook give us sufficient hooks during startup to
  setup kgdb-specific behavior now.
- Always add the 'proc', 'tid', and 'add-kld' commands on startup and not
  just if we have a core dump.  Currently the 'proc' and 'tid' commands do
  not work for remote targets (I will fix at least 'tid' in the next round
  of changes though).  However, the 'add-kld' command works fine for
  loading symbols for a kernel module on a remote target.
- Always setup the 'kld' shared library target operations instead of just
  if we have a core dump.  Although symbols for kernel modules are not
  automatically loaded when connecting to a remote target, you can do
  'info sharedlibrary' after connecting to the remote target and kgdb will
  find all the modules.  You can then use the 'sharedlibrary' command to
  load symbols from the module files.
- Change kthr_init() to free the existing list of kthr objects before
  generating a new one.  This allows it to be invoked multiple times
  w/o leaking memory.

MFC after:	1 week
2008-04-29 20:32:45 +00:00
John Baldwin
624e4d168d - Add a global variable 'fbsdcoreops_suppress_target' that can be set to
force the FreeBSD multithreaded core target to not register any target
  for handling core dumps.  This is analogous to the
  'coreops_suppress_target' variable that GDB provides for suppressing the
  default core dump target.  KGDB will use this new variable so it can
  provide its own core dump target that uses libkvm to work with vmcore
  files.
- Adjust the long name and documentation of the FreeBSD multithreaded core
  dump target so it better matches what GDB's core dump target uses.

MFC after:	1 week
Reviewed by:	davidxu, marcel
2008-04-29 17:47:25 +00:00
John Baldwin
34f36b232b Use kgdb_parse() instead of libkvm(3) to read the first instruction from
"calltrap" to see which method is used to pass trap frames.  This seg
faulted on remote gdb connections (where libkvm isn't used).

MFC after:	3 days
2008-04-28 18:27:19 +00:00
John Baldwin
064e8b005f Remove the 'add_kld_command' arg from load_kld(). It is always true since
the auto-loading of kld's switched to hooking into gdb's shared library
support.

MFC after:	1 week
2008-04-28 15:26:11 +00:00
Warner Losh
2fd1934152 FreeBSD/mips gdb build suspport. From the mips2-jnpr branch. 2008-04-26 12:22:46 +00:00
Mark Linimon
f26fc231ff Add 'arm' category.
Approved by:	peter
2008-04-23 03:05:31 +00:00
Marcel Moolenaar
468390dffd Add support for the 32-bit EFI target. 2008-04-17 23:36:35 +00:00
John Baldwin
36cc36a0ec Change kgdb_parse() to use wrapped versions of parse_expression() and
evaluate_expression() so that any errors are caught and cause the function
to return to 0.  Otherwise the errors posted an exception (via longjmp())
that aborted the current operation.  This fixes the kld handling for
older kernels (6.x and 7.x) that don't have the full pathname stored in
the kernel linker.

MFC after:	3 days
2008-03-29 17:46:03 +00:00
John Baldwin
ec922be302 Initialize the head pointer in kld_current_sos() to NULL to avoid returning
a junk pointer and possibly causing a seg fault if we don't have any
non-kernel klds (or are unable to walk the list due to core / kernel
mismatch).

MFC after:	1 week
2008-03-29 03:48:06 +00:00
David E. O'Brien
079e465705 Re-enable the CVS build. 2008-03-19 15:21:44 +00:00
David E. O'Brien
d103b84809 Update for version 1.11-20080310.
Make our changes to CVS_RSH & CVS_SSH settings here instead of
  contrib/cvs/src/cvs.h.
2008-03-19 15:19:42 +00:00
David E. O'Brien
a060e0f4ed + Make it clear this was taken from the CVS 1.11 branch on 10-March-2008.
+ Depend on $CVSDIR/configure also - so things get properly remade if we tweak.
2008-03-19 15:18:03 +00:00
David E. O'Brien
9aad47f4b7 Disable CVS build. 2008-03-19 14:44:48 +00:00
Ruslan Ermilov
b18c84b4db Set AR=gnu-ar and RANLIB=gnu-ranlib on systems where we are forced
to use GNU tools.  Remove the _WITH_GNUAR knob.

Prodded by:	obrien
2008-03-02 11:10:46 +00:00
John Baldwin
af6e49e963 Remove a stale prototype I missed when converting the kld support over to
hooking into gdb's shared library infrastructure.
2008-02-25 22:04:07 +00:00
Ruslan Ermilov
d0ca999980 Make again BSD ar(1) the default system ar(1), now properly handling
source upgrades by falling back to GNU ar(1) as necessary.  Option
WITH_BSDAR is gone.  Option _WITH_GNUAR to aid in upgrades is *not*
supposed to be set by the user.

Stop bootstrapping BSD ar(1) on the next __FreeBSD_version bump, as
there are no known bugs in it.  Bump __FreeBSD_version to anticipate
this and to flag the switch to BSD ar(1), should it be needed for
something.

Input from:	obrien, des, kaiw
2008-02-25 16:16:17 +00:00
Rafal Jaworowski
56ae1bed48 Let PowerPC world optionally build with -msoft-float. For FPU-less PowerPC
variations (e500 currently), this provides a gcc-level FPU emulation and is an
alternative approach to the recently introduced kernel-level emulation
(FPU_EMU).

Approved by:	cognet (mentor)
MFp4:		e500
2008-02-24 19:22:53 +00:00
Ruslan Ermilov
6d3d8d0eca Bump the default .Os version to FreeBSD 8.0. 2008-02-23 19:27:54 +00:00
David E. O'Brien
fcc69fd9f7 If 'WITH_BSDAR' is defined, install as gnu-<util_name>. 2008-02-21 16:59:02 +00:00
Kai Wang
7a76718800 Back out previous commit. Restore Binutils ar as default. Disconnect
'BSD' ar to the build.

Requested by: 	des
2008-02-21 16:12:46 +00:00
Kai Wang
d0e2abaf12 * Connect ar(1) to the build and make it default ar. Rename GNU
binutils ar and ranlib to gar and granlib, respectively.

* Introduce a temporary variable WITH_GNUAR as a safety net.
When buildworld with -DWITH_GNUAR, GNU binutils ar and ranlib
will install as default ones and 'BSD' ar will be disabled.

* Bump __FreeBSD_version to reflect the import of 'BSD' ar(1).

Approved by:		 jkoshy (mentor)
2008-02-21 11:21:29 +00:00
Ruslan Ermilov
b7498df286 getopt(3) returns -1, not EOF. 2008-02-19 07:09:19 +00:00
John Baldwin
2369087a60 - Rework the kld support to hook into GDB's shared library support.
kgdb(8) now treats kld's as shared libraries relative to the kernel
  "binary".  Thus, you can use 'info sharedlibrary' to list the kld's
  along with 'sharedlibrary' and 'nosharedlibrary' to manage symbol
  loading and unloading.  Note that there isn't an easy way to force GDB
  to use a specific path for a shared library.  However, you can use
  'nosharedlibrary' to unload all the klds and then use 'sharedlibrary'
  to load specific klds where it gets the kld correct and use
  'add-kld' for the kld's where the default open behavior doesn't work.
  klds opened via 'sharedlibrary' (and during startup) do have their
  sections listed in 'info files'.
- Change the 'add-kld' command to use filename completion to complete its
  argument.
2008-01-29 23:44:34 +00:00
John Baldwin
d6022a04c5 Don't close the kernel bfd object during startup. Instead, leave it open
and build a section table from the kernel file so that 'info files' output
for kgdb now matches the usage of gdb on a regular file with the exception
that we don't list sections for memory in the crash dump.
2008-01-29 23:37:59 +00:00
John Baldwin
c989eb07bb Use target_read_memory() and extract_unsigned_integer() instead of direct
KVM access to read kernel pointers.
2008-01-29 23:36:42 +00:00
John Baldwin
a4d5f8a2b7 Don't look for "foo.ko.symbols" files. GDB is smart enough to open the
".symbols" file automatically when you tell it to load "foo.ko" because of
the debug link.
2008-01-29 23:36:10 +00:00
John Baldwin
9f24dd4d32 Use a for loop in find_kld_address() as in kgdb_auto_load_klds() and
replace the remaining goto's with continues as a result.
2008-01-28 21:45:09 +00:00
John Baldwin
5ca09def5b Add support for automatically loading symbols for kld's on startup:
- Add a new 'kgdb_auto_load_klds()' routine which is invoked during
  startup that walks the list of linker files and tries to find a matching
  kld on disk for each non-kernel kld.  If a kld file is found, then it
  is added as if the 'add-kld' command is invoked.  One change from
  'add-kld' is that this method attempts to use the 'pathname' from the
  linker_file structure first to try to load the file.  If that fails
  it then looks in the kernel directory followed by the directories in
  the module path.
- Move the kld file suffix handling into a separate routine so that it
  can be called standalone and to reduce duplicate code in find_kld_path().
- Cache the offsets of members of 'struct linker_file' during startup
  instead of computing them for each 'add-kld'.
- Use GDB's target_read_string() instead of direct KVM access.
- Add all resident sections from a kld by using bfd_map_over_sections() to
  build the section list rather than just adding symbols for ".text",
  ".data", ".bss", and ".rodata".
- Change the 'add-kld' command to do a y/n prompt before adding the
  symbols when run interactively to match 'add-symbol-file'.

MFC after:	1 week
2008-01-28 21:40:10 +00:00
John Baldwin
fea3c2c5c7 Remove the warnx() from kgdb_lookup() so that we don't emit a warning about
optional symbols that are missing (e.g. kgdb complains about _stoppcbs and
_stopped_cpus on UP kernels).  Instead, callers that really want their
symbols to be present now do explicitly warnx() about the missing symbol.
2008-01-28 20:33:19 +00:00
John Baldwin
4d6cae0d4d If the quiet flag is specified (-q), don't dump the unread portion of
the message buffer on startup.
2008-01-28 20:31:30 +00:00
John Baldwin
4496b3577d Move the code for working with kld's out into its own file. 2008-01-24 19:11:13 +00:00
Ruslan Ermilov
c4579b502b Remove one more alpha leftover. 2008-01-24 07:43:09 +00:00
Ed Maste
b2f965152c Include the thread name (in addition to the proc name) in "info threads." 2008-01-18 18:57:27 +00:00
John Baldwin
933785a027 Add a new 'add-kld <kld>' command to kgdb to make it easier to analyze
crash dumps with kernel modules.  The command is basically a wrapper
around add-symbol-file except that it uses the kernel linker data
structures and the ELF section headers of the kld to calculate the
section addresses add-symbol-file needs.

The 'kld' parameter may either be an absolute path or a relative path.
kgdb looks for the kld in several locations checking for variants with
".symbols" or ".debug" suffixes in each location.  The first location it
tries is just opening the specified path (this handles absolute paths and
looks for the kld relative to the current directory otherwise).  Next
it tries to find the module in the same directory of the kernel image
being used.  If that fails it extracts the kern.module_path from the
kernel being debugged and looks in each of those paths.

The upshot is that for the common cases of debugging /boot/kernel/kernel
where the module is in either /boot/kernel or /boot/modules one can merely
do 'add-kld foo.ko'.

MFC after:	1 week
2008-01-17 21:43:12 +00:00
David E. O'Brien
d74c91c758 Use a phony .POSIX target. This seems to be the way to
turn off the stuff in src/usr.bin/make/main.c rev 1.161.
2008-01-16 17:16:36 +00:00
David E. O'Brien
6949c01e6b Use our standard verbose spelling of rules variables.
(as a nice side affect, this will make gnu/usr.bin/cvs/contrib/Makefile
have a later date than contrib/cvs/contrib/Makefile.in - which will help
the build break after the 1.11.22 CVS import...)
2008-01-13 09:45:53 +00:00
David E. O'Brien
8b7d87e7fb Disable contrib - there is weirdness going on with it. 2008-01-13 08:58:25 +00:00
David E. O'Brien
2a670e33ba Reenable cvs with the build. 2008-01-13 06:56:31 +00:00
David E. O'Brien
946debc579 Disable CVS from the build. 2008-01-13 05:49:03 +00:00
Joseph Koshy
9be5e0002a Tweak -lpmc's name. 2007-11-27 10:00:33 +00:00
Ken Smith
c0bb7d9461 While checking over the libraries for 7.0-REL Kris found the following
libraries had not had their versions bumped relative to 6.3-REL but
had indeed been changed.  We need to bump their version so they can be
properly added to the compat6x port:

	libasn1.so.8 libgssapi.so.8 libhdb.so.8 libkadm5clnt.so.8
	libkadm5srv.so.8 libkafs5.so.8 libkrb5.so.8 libobjc.so.2

MFC After:	1 day
2007-11-20 04:20:32 +00:00
Andrey A. Chernov
f6d6295dd9 Use LC_ALL=C before awk generating "optionlist"
(and before two other awk calls, just to be safe)
Without it sorting is broken for locales with ASCII collating equivalence
like (v,w) in sv_SE
2007-11-18 11:59:44 +00:00
Olivier Houchard
796677a89e Add thread support for arm.
MFC After:	1 week
2007-11-17 21:30:03 +00:00
Olivier Houchard
fdad867fc6 There's no reason why we couldn't attach to a live process on arm.
MFC After:	1 week
2007-11-17 18:41:04 +00:00
John Baldwin
f157925999 Teach kgdb how to handle double fault frames on i386:
- Save td_oncpu in 'struct kthr' so the i386 target code can see which CPU
  a thread is running on.
- Add a new frame unwinder for double fault frames.  This unwinder is used
  when "dblfault_handler" is encountered in the stack.  It uses the CPU of
  the current thread to lookup the base address of the TSS used for the
  double fault from the GDT.  It then fetches the various registers out
  of the TSS similar to how the current trapframe unwinder fetches
  registers out of the trapframe.

MFC after:	3 days
2007-11-16 22:17:37 +00:00
Ruslan Ermilov
d2bf7b5d31 Added ".Lb libkse" support to mdoc(7).
Reviewed by:	deischen, davidxu
2007-10-22 10:01:58 +00:00
Ruslan Ermilov
be36b09afa Introduce FreeBSD 8.0 to mdoc(7). 2007-10-15 08:06:42 +00:00
Ruslan Ermilov
281fc7f295 Back out last commit -- it breaks sparc64 build which has
more than one .c file in SRCS.
2007-10-13 05:50:43 +00:00
David E. O'Brien
d80f4b0e33 style.Makefile(5) 2007-10-12 18:15:40 +00:00
David E. O'Brien
1d2c824f26 Minor tweak to finding BEG/END source. 2007-10-12 18:14:41 +00:00
David E. O'Brien
feaa2b360f style.Makefile(5) 2007-10-12 18:03:00 +00:00
David E. O'Brien
29e0f3f543 Welcome FreeBSD 8. 2007-10-12 17:49:12 +00:00
Rong-En Fan
224803e1fd - After gcc 4.2 import, include/objc/objc-api.h requires objc-decls.h which
we did not install. Install objc-decls.h to fix.

PR:		116943
Reported by:	beech
Submitted by:	vanilla on -current, kan
MFC after:	1 week
2007-10-12 02:52:46 +00:00
Marius Strobl
a8efe9e273 Disable TLS for arm and sparc64 here as binutils 2.15 predate GNU TLS
support for these. This is in line with gnu/lib/libgomp/config.h and
gnu/lib/libstdc++/config.h.

Reviewed by:	cognet, obrien
Approved by:	re (kensmith)
2007-10-08 18:59:34 +00:00
Ruslan Ermilov
d95f0f9848 FreeBSD 6.2 is now known to mdoc.
Approved by:	re (kensmith)
2007-10-04 04:39:06 +00:00
Marcel Moolenaar
af025ea9a7 Force -O1 compilation when targeted for ia64. GCC 4 generates
bad code at -O2. Since this is likely caused by the low-level
optimizer, testing TARGET_ARCH rather than MACHINE_ARCH should
handle ia64 cross-compilation as well. With this work-around
in place, we can release using the current GCC and Binutils
code at the default optimization level on ia64.

Approved by: re (kensmith)
2007-09-26 01:31:28 +00:00
Edwin Groothuis
e06a060ed3 Fix possible uninitialized variable insert due to previous commit.
Pointy hat to: me and my absence of -Wall in my CFLAGS.

MFC will happen at the same time of the earlier commit.

Thanks to ru@ for spotting.

Approved by:	re (Ken Smith), grog@ (mentor)
2007-09-25 21:41:22 +00:00
Edwin Groothuis
085ca02717 man(1) can't handle compressed included files.
Some ports will install with compressed manpages. man handles
	this by looking for the .gz version of a man source file.
	It is also common to include other files with the .so
	directive where commands or functions share a man page.
	Traditionally ports have had to handle this by either not
	compressing the manpages, or using the _MLINKS macro in the
	port makefile to create symlinks to the actual source file,
	rather than using .so versions. Notably, the current version
	of Xorg port breaks. See ports/113096 and ports/115845.

PR:		bin/115850
Submitted by:	Callum Gibson <callumgibson@optusnet.com.au>
Approved by:	re@ (ken smith), grog@ (mentor)
MFC after:	1 week
2007-09-20 21:37:29 +00:00
David E. O'Brien
557c18457f Catch up with the demise of /usr/X11R6
Approved by:	re(ken)
2007-09-19 14:21:18 +00:00
David E. O'Brien
6a859d67c1 Reduce diff to vendor for maintance purposes.
Approved by:	re(ken)
2007-09-19 14:19:32 +00:00
Thomas Quinot
a0b65c7be0 In the case of a native build, set NATIVE to yes so that the code circuits
that need to be activated specifically for the case of a native linker
actually are enabled. Specifically, this makes ld(1) look for shared
libraries in LD_LIBRARY_PATH in the native case, as documented in the
man page.

PR:		gnu/96481
Approved by:	re (kensmith)
MFC after:	2 weeks
2007-09-19 12:17:39 +00:00
Olivier Houchard
65875b1f58 Make gcc default to big endian when building it for a big endian target.
This was lost while migrating to gcc4.

Reported by:	Michael Reifenberger <mike at Reifenberger dot com>
Approved by:	re (blanket)
2007-09-18 23:34:42 +00:00
Andrey A. Chernov
680e3e034b Fix stack overflow with too many items return list in 'dialog' program.
(Noticed in ghostscript-gpl core dump)

Approved by:    re@ (bmah)
2007-08-24 16:26:24 +00:00
John Baldwin
4ba3dab395 NMIs now come from 'nmi_calltrap' rather than 'calltrap', so teach 'kgdb'
to treat the frame under 'nmi_calltrap' as a trapframe.

MFC after:	3 days
Approved by:	re (bmah)
2007-08-22 20:28:13 +00:00
Alexander Kabaev
203ab4d0c3 Install etx/numeric_traits.h.
PR:		gnu/115250
Approved by:	re (blanket)
2007-08-16 23:02:00 +00:00
Alexander Kabaev
a602382caf Remove comment that was added by mistakes and which prevented _eprintf
and gcc_bcmp to be added to static libgcc.a.

Approved by:	re (kensmith)
2007-08-14 20:49:57 +00:00
Rong-En Fan
27cfc42fc5 - Bump share library version which were missed in last bump
Reported by: 	     jhb
Discussed with:	     deischen, des, doubg, harti
Approved by:	     re (kensmith)
2007-06-18 18:47:54 +00:00
Xin LI
9ba2645aa7 Fix build on arm: time_t on arm is 64 bits while long is
32 bits, so subsequent compile time assertion:

	sizeof inf->stat.st_mtime <= sizeof sec

Would fail because of that.  This change is suitable for
general consumption as well, but fix it in our local
patchset as we are near a code freeze.

Submitted by:	cognet
2007-06-17 00:43:50 +00:00
Xin LI
b6ee6822f3 Update build skeleton after diffutils 2.8.7 update. 2007-06-15 07:09:34 +00:00
Philip Paeps
3a787f042c Don't lie about saved reports.
PR:		gnu/89777
Submitted by:	edwin
MFC after:	1 day
2007-06-02 18:06:08 +00:00
Alexander Kabaev
88843a0a1e Install omp.h file.
Submitted by:	Pieter de Goeje (pieter at degoejes dot nl)
2007-05-31 13:21:30 +00:00
Alexander Kabaev
ba25c97b24 Fix compiles when user chooses to disable both ObjC and C++ support in
GCC.

Reported by: bz
2007-05-28 00:25:07 +00:00
Ruslan Ermilov
0effeaaec3 Don't forget to clean generated ssp.h. 2007-05-22 10:40:58 +00:00
Ruslan Ermilov
4c520cd4c6 Back out the addition of -static to LDFLAGS; I'm pretty confident
that the build failure was caused by a computer/sources date/time
mismatch that caused GCC tools to be mistakenly rebuilt again at
an inappropriate time during buildworld, re-linking them against
new libraries instead of host's installed libraries and thus making
them not runnable by the host.  Normally they are only built in
the early stage of buildworld (build-tools) that links them against
shared libraries of the host, but if either the system clock or
modification date/time on source files is set incorrectly, make(1)
can be foolished into thinking that tools are stale and will rebuild
them again, now in the "target" environment which is not suitable
for building helper apps that are to be run during buildworld.

OK'ed by:	kan
2007-05-21 12:04:16 +00:00
Alexander Kabaev
1b156a4077 Fix the fallout from over-zealous obsolete files removal. Use correct
atomicity.h file for arm and powerpc.
2007-05-19 15:41:01 +00:00
Scott Long
ad08d9331d Work-around for upgrading from a pre-symbol-versioned world.
Blame-to: cperciva
2007-05-19 07:56:08 +00:00
Alexander Kabaev
68e56eb18e Do not compile hash_compat.c. 2007-05-19 05:52:28 +00:00
Alexander Kabaev
afb57df680 Update bmake glue to build GCC 4.2.
Also:
        Switch FreeBSD to use libgcc_s.so.1.

        Use dl_iterate_phdr to locate shared objects' exception frame
        info instead of depending on older register_frame_info machinery.
        This allows us to avoid depending on libgcc_s.so.1 in binaries
        that do not use exception handling directly. As an additional
        benefit it breaks circular libc <=> libgcc_s.so.1 dependency too.

        Build newly added libgomp.so.1 library, the runtime support
        bits for OpenMP.

        Build LGPLed libssp library. Our libc provides our own
        BSD-licensed SSP callbacks implementation, so this library
        is only built to benefit applications that have hadcoded
        knowledge of libssp.so and libssp_nonshared.a. When linked
        in from command line, these libraries override libc
        implementation.
2007-05-19 04:25:59 +00:00
Alexander Kabaev
44f3233714 Remove extern int verbose declaration. It is declared static in the
only file it is used in.
2007-05-19 03:23:43 +00:00
Alexander Kabaev
520d6ec0d8 Fix static/extern mismatch by patching corresponding tdep files
in-place.
2007-05-19 03:22:19 +00:00
Marcel Moolenaar
28db227dc2 Add threading support. 2007-05-01 18:29:34 +00:00
Alexander Kabaev
04d56e6287 Minor Makefile cleanup. Do not use Makefile variables named 'version' and
'target'. Latter is problematic in particular as apparently FreeBSD's
bsd.prog.mk re-defines it under some circumstances. This causes an
unexpected failures like -dumpmachine not working for cc while working
fine for c++.

Do not re-define IN_GCC in multipe places, it gets inherited from
Makefile.in anyway.

PR:		gnu/110143
Submitted by:	usleepless at gmail
2007-03-12 00:28:06 +00:00
Konstantin Belousov
0a592d0535 Unbreak the kgdb stepping over the special frames on i386 after rev. 1.117 of
i386/i386/exception.s.

No objections from:	marcel
2007-03-01 13:56:08 +00:00
Konstantin Belousov
d7eb5fb599 Rename lookup() to kgdb_lookup() and make it global (for use in trgt_i386.c).
No objections from:	marcel
2007-03-01 13:55:15 +00:00
Ed Maste
5a16cfaeb6 Avoid writing uninitialized stack data into a thread's MMX/SSE state by
first getting the current state with td_thr_getxmmregs_p.  Without this,
debugging a threaded app that uses libthr resulted in kernel panics or
spurious SIGFPEs for me.

(As of revision 1.6, sys/i386/i386/ptrace_machdep.c masks off the
reserved bits in the mxcsr register, which prevents the kernel panics.)

Architectures without PT_GETXMMREGS are not affected.

MFC after:      1 week
2007-02-20 18:10:13 +00:00
Marcel Moolenaar
6c7ef9a0f8 Fix PowerPC-targeted cross-builds performed on 64-bit platforms.
Only PowerPC supports both 32-bit and 64-bit targets and the
BFD_DEFAULT_TARGET_SIZE is used by the binutils code to reflect
the preferred ABI. We define BFD_DEFAULT_TARGET_SIZE for all
platforms, but based on the build machine. As such 64-bit build
machines defined BFD_DEFAULT_TARGET_SIZE incorrectly for 32-bit
targets, but since this only affects PowerPC it went unnoticed
for a long time.
The fix is to define BFD_DEFAULT_TARGET_SIZE based on the target
architecture.

PR: amd64/102996
MFC after: 1 month
2007-02-11 07:15:06 +00:00
Xin LI
5ded07e693 Remove GNU gzip left-offs, they are no longer necessary. 2007-01-31 03:44:42 +00:00
Xin LI
9a9ea25f4a Replace the GNU gzip with a slightly modified NetBSD gzip. The
NetBSD version is a feature-to-feature re-implementation of GNU
gzip using the freely-redistributable zlib and this version is
expected to be mostly bug-to-bug compatible with the GNU
implementation.

 - Because this is a piece of mature code and we want to make
   changes so it is added directly rather than importing to
   src/contrib.
 - Connect newly added code to src/usr.bin/ and rescue/rescue
   build.
 - Disconnect the GNU gzip code from build for now, they will
   be eventually removed completely.
 - Provide two new src.conf(5) knobs, WITHOUT_BZIP2_SUPPORT and
   WITHOUT_BZIP2.

Tested by:	kris (full exp-7 pointyhat build)
Approved by:	core (importing a 4-clause BSD licensed file)
Approved by:	re (adding new utility during -HEAD code slush)
2007-01-26 10:19:08 +00:00
Craig Rodrigues
c4b1628e07 Try to avoid a possible infinite loop when parsing an invalid kernel dump file.
PR:		108229
Submitted by:	Jessica Han <jessicah juniper net>
Reviewed by:	marcel
MFC after:	1 week
2007-01-25 06:39:25 +00:00
Andrey A. Chernov
b1b027ee15 Change RL_LIBRARY_VERSION 2006-12-31 09:27:16 +00:00
Andrey A. Chernov
82fe6057d5 Update config 2006-12-31 09:26:00 +00:00
Ruslan Ermilov
bf2a133f37 -mdoc knows about FreeBSD 7.0 as well.
Reminded by:	ceri
2006-12-29 06:22:13 +00:00
Ruslan Ermilov
a804cd3659 Markup revision. 2006-12-25 15:09:06 +00:00
Ruslan Ermilov
4f54ae7af3 FreeBSD 5.5 is part of official -mdoc. 2006-12-25 09:09:47 +00:00
Ruslan Ermilov
0321d7f9a8 Fix markup, remove a dummy BUGS section. 2006-12-24 23:07:11 +00:00
Ruslan Ermilov
f54222f069 Add missing articles. 2006-12-23 23:26:05 +00:00
Ruslan Ermilov
5adba4ff85 Teach mdoc(7) about FreeBSD/arm and FreeBSD 6.3; both needed by the
npe(4) manpage.
2006-12-05 17:01:23 +00:00
Joseph Koshy
3eb1a62e69 MFP4: Add an implementation of the ELF(3) and GELF(3) API set.
Bump __FreeBSD_version.

Reviewed by:	jb
2006-11-11 17:16:35 +00:00
David E. O'Brien
55738a1aa4 Remove gratuitous white space change. 2006-11-06 02:49:19 +00:00
David E. O'Brien
ffe2c5e5a5 Allow one to force with issue with 'TARGET_BIG_ENDIAN'. 2006-11-06 02:32:29 +00:00
Philip Paeps
089d90279a Fix vim syntax highlighting. Vim complained about the (comment). The syntax
file is also called "sendpr", not "send-pr".
2006-11-01 12:13:08 +00:00
Ruslan Ermilov
afa56e7db8 Bump document date for the previous change. 2006-10-21 17:39:35 +00:00
John-Mark Gurney
870fe2a280 Turn on gdbserver for the arch that supports it.. 2006-10-21 17:27:36 +00:00
John Baldwin
a5146161ae Trim trailing whitespace. 2006-10-16 20:07:23 +00:00
John Baldwin
62f6176c27 Restore the 'proc' and 'tid' commands which allow one to switch to the
first thread in a process or to a specific thread via PIDs and TIDs,
respectively.

Submitted by:	kan
Approved by:	marcel
2006-10-16 20:06:32 +00:00
Ceri Davies
fd717a30ea Update the FILES section which has been wrong for some time.
MFC after:	3 days
2006-10-15 11:50:11 +00:00
Ceri Davies
9eacd2a880 Add the sun4v category.
Reminded by:	ru
MFC After:	1 re approval
2006-10-15 11:43:42 +00:00
Olivier Houchard
ca8022c580 Don't build the libgcc with functions already included in the libc to
unbreak the build.
We'll switch back to the libgcc functions and get rid of the libsoftfloat
later.
2006-10-12 16:43:15 +00:00
David E. O'Brien
1d60a995b9 Document '-w' from main.c rev. 1.11. 2006-10-11 14:42:43 +00:00
Tom Rhodes
1c6b148eb1 Add the -P option back, but with a note that it is not supported on FreeBSD.
Requested by:	ru
2006-10-11 09:52:32 +00:00
Tom Rhodes
ca56b49e0e grep -P xxx file.txt
"The -P option is not supported"
Removed from the manual page via this commit.

PR:	99831
2006-10-10 01:57:25 +00:00
Kip Macy
777552aef6 Temporarily add newer copy of tc-sparc.c to build to
support building of sun4v. This can be removed once
the binutils import happens.

Reviewed by: kan
Approved by: rwatson (mentor)
2006-10-09 04:52:14 +00:00
David E. O'Brien
d3fbc8d9c0 The ARM platform does the setjmp/longjmp type of exception handling. 2006-10-05 20:55:37 +00:00
Warner Losh
c23b8029f1 Enable gdb on the arm. Some time ago I committed it, but had forgotten to
enable it here.

Noticed by: cognet
2006-10-03 00:03:30 +00:00
Ruslan Ermilov
cf35cbe5d9 Fix build due to the incomplete removal of demangle.h. 2006-09-30 12:52:15 +00:00
Alexander Kabaev
2972ed120b Reduce diffs with file generated by FSF configure. 2006-09-22 15:08:07 +00:00
Ruslan Ermilov
f6b0ef28b7 Prepare to pick up manpages from their new location. 2006-09-21 07:52:41 +00:00
Alexander Kabaev
7614e6f347 Bump __FreeBSD_cc_version in case someone cares for differences between
GCC 3.4.4 and GCC 3.4.6 on -current.
2006-09-21 03:27:07 +00:00
Simon L. B. Nielsen
789cb6fc6a Correct multiple vulnerabilities in gzip(1).
Security:	FreeBSD-SA-06:21.gzip
2006-09-19 14:06:20 +00:00
Warner Losh
a817992dfc Add additional support for generating code for the arm. There's still
a few issues in other parts of the tree, but those will be resolved
separately.

Submitted by: cogenet@
Reviewed by: kan@, obrien@
MFC After: 5 days
2006-09-18 17:08:32 +00:00
Ruslan Ermilov
d0cca13549 This is not needed since src/gnu/usr.bin/cc/cc_int/Makefile,v 1.34. 2006-09-16 09:09:44 +00:00
Ruslan Ermilov
979df1f5dd Remove vestiges of GNU tar. 2006-09-15 08:04:23 +00:00
Warner Losh
5d20c54439 A TARGET_CPU_DEFAULT of xscale for arm results in illegal instructions
during buildworld.  Comment it out for now.
2006-09-15 05:21:06 +00:00
Warner Losh
38ede4873d Remove redundant default vector
Submitted by: ru@
2006-09-14 08:21:20 +00:00
Warner Losh
280075717e Add cross debug support to arm.
Submitted by: cognet@
2006-09-14 07:51:52 +00:00
Warner Losh
4c808aa2bb fix the build: add missing end of line cont character 2006-09-14 07:48:16 +00:00
Warner Losh
70e66c2fbd scripts for the arm port.
Submitted by: cognet@
Reviewed by: obrien and kan
2006-09-14 07:46:32 +00:00
Warner Losh
a8e874edc2 Fix the build and minor cleanup. 2006-09-14 07:44:05 +00:00
Warner Losh
f6b979e59e .end -> .endif 2006-09-14 07:02:17 +00:00
Warner Losh
46e96d9a58 Architecture specific portions of gdb for arm.
Submitted by: cognet@
2006-09-14 06:49:34 +00:00
Warner Losh
77e84bed77 Config file for arm assembler 2006-09-14 06:39:07 +00:00
Warner Losh
f3168f1544 TARGET_BIG_ENDIAN isn't appropriate here. __ARMEB__ is sufficient and
besides, TARGET_BIG_ENDIAN isn't defined anyway.
2006-09-14 06:36:13 +00:00
Alexander Kabaev
f7a0a44b44 Remove redundant defines alerady set by Makefile.fe 2006-09-12 21:57:28 +00:00
David E. O'Brien
e9231ad68b Style sync. 2006-09-12 19:24:01 +00:00
David E. O'Brien
eaa35077b4 Move to more global Makefile.tgt vs. having to define in the leaves. 2006-09-12 07:37:44 +00:00
David E. O'Brien
8d60fe4054 Default to big endian ARM if "TARGET_BIG_ENDIAN" is defined, and set an ARM
target default.
2006-09-12 07:37:02 +00:00
David E. O'Brien
124866d539 Default to big endian ARM if "TARGET_BIG_ENDIAN" is defined (& targeting ARM). 2006-09-12 07:09:45 +00:00