Commit Graph

3900 Commits

Author SHA1 Message Date
kan
1e202d12a5 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
nwhitehorn
ad01c62033 Fix a missing underscore. 2010-12-09 17:39:40 +00:00
dim
fd23e48979 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
dim
ba5e9b3444 Sync: merge r215944 through r216132 from ^/head. 2010-12-02 22:00:57 +00:00
nwhitehorn
789892d7ed Unbreak amd64<->i386 cross builds. 2010-12-02 17:36:47 +00:00
nwhitehorn
ee62ec76ff 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
dim
71b42433f6 Sync: merge r215464 through r215708 from ^/head. 2010-11-22 20:52:18 +00:00
attilio
7718cbcbf4 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
dim
79e78b2c61 Sync: merge r215396 through r215463 from ^/head. 2010-11-18 18:30:03 +00:00
tijl
3ed7e4e8d8 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
dim
b0df1c137c Sync: merge r215319 through r215395 from ^/head, so ports can actually
build! :)
2010-11-16 10:33:41 +00:00
nwhitehorn
ed2379efaf Garbage-collect some code made obsolete by the TBEMD import. 2010-11-15 22:12:13 +00:00
nwhitehorn
1962241c7a 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
dim
b355314642 Sync: merge r215273 through r215318 from ^/head. 2010-11-14 20:47:30 +00:00
nyan
a81bc66d88 Add missing '/'. 2010-11-14 11:09:16 +00:00
imp
eceb0894df 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
imp
57c659fc8f These two cases should be different...
Submitted by:	nathanw@
2010-11-14 01:50:40 +00:00
dim
ea0b64c862 Sync: merge r215141 through r215188 from ^/head. 2010-11-12 17:20:18 +00:00
ed
3bf90be325 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
dim
872d2c10e7 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
dim
4a9a1d63b9 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
dim
37e5085724 Sync: merge r214895 through r215140 from ^/head. 2010-11-11 20:52:24 +00:00
ed
eee194800d 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
5bd2211ccc 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
imp
c178b8695e 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
gonzo
f9ccde4a24 Fix cross-debugger build 2010-11-07 23:23:48 +00:00
gonzo
3dcfe17daa Fix initialization order:_initialize_svr4_solib should
be called before _initialize_thread_db
2010-11-07 23:22:22 +00:00
gonzo
55c115b83d - Use proper constant for accessing PCB intead of hardcoded numbers
- Minor clean-up
2010-11-07 20:56:41 +00:00
gonzo
ce202f7d13 Link threads support to the build 2010-11-07 20:53:19 +00:00
dim
dd82ae2cb6 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
dim
c6446a754f Fix warnings in fbsd-threads.c. 2010-11-01 20:17:15 +00:00
dim
c59afb2ce3 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
dim
69a79d687c Update doc Makefile and texinfo config file. 2010-11-01 19:47:03 +00:00
dim
f0f9e618bf Update config.h for ld. 2010-11-01 19:46:18 +00:00
dim
0f59ea67c5 Update Makefile and config.h for as. 2010-11-01 19:45:55 +00:00
dim
8a36c8bef3 Add manpages under gnu/usr.bin/binutils, since they are generated. 2010-11-01 19:45:15 +00:00
dim
b219c11ef9 Update Makefile and config.h.bsd for libbinutils. 2010-11-01 19:42:29 +00:00
dim
ef92b3b53e Update Makefile and config.h.bsd for libopcodes. 2010-11-01 19:42:07 +00:00
dim
deecd7f3ad Update Makefile, bfd.h and config.h.bsd for libbfd. 2010-11-01 19:41:22 +00:00
dim
b921eb7d4b Update Makefile and config.h for libiberty. 2010-11-01 19:40:22 +00:00
dim
b5380a9dee Update VERSION to 2.17.50 [FreeBSD] 2007-07-03. 2010-11-01 19:39:10 +00:00
dim
3279f5121c 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
dim
926cfb4a95 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
dim
05c8f27311 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
dim
d51b49793f 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
dim
01736e4af6 Garbage collect gnu/lib/libiberty and gnu/lib/libg2c, these have not
been used for years.
2010-10-22 18:11:17 +00:00
dim
15ff888ae0 Update makeinfo include paths, and configuration settings for the as
info page.
2010-10-21 20:34:29 +00:00
dim
7f695928d2 Update ldscript extension list. 2010-10-21 20:33:09 +00:00
dim
6db154aa45 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
dim
9931672781 Apply upstream changes to genscripts.sh, while attempting to keep the
diff as small as possible.
2010-10-21 20:30:35 +00:00
dim
572502042a Remove weird double-pasted sections in armelfb?_fbsd.sh. 2010-10-21 20:29:16 +00:00
dim
49079515f5 Regenerate config.h for ld. 2010-10-21 20:28:23 +00:00
dim
c7123c63d6 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
dim
1f8e7a06a3 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
dim
22c7440029 Regenerate config.h for as. 2010-10-21 20:22:32 +00:00
dim
5c7ebb5add Add new upstream file, and update TARGET definition. 2010-10-21 20:21:36 +00:00
dim
e2965bd980 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
dim
98865e313d Regenerate config.h for libbinutils. 2010-10-21 20:18:34 +00:00
dim
82ee80ccd7 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
dim
7e6c84d6b2 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
dim
5881c34a84 Regenerate bfd.h and config.h.fbsd. 2010-10-21 20:04:28 +00:00
dim
57183c9e77 Add new upstream file to libiberty. 2010-10-21 20:02:47 +00:00
dim
f51e1e2499 Use one file per line in SRCS= definition, to make insertions and
deletions easier.
2010-10-21 20:01:21 +00:00
dim
6a817821b9 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
dim
ba43e0ffe7 Update the BFD and binutils version defines. 2010-10-19 20:17:17 +00:00
dim
90edd39efd 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
dim
99b805c09e Do not build or install gasp.info anymore, as gasp is obsolete. 2010-10-18 20:59:46 +00:00
jh
cb22974c8d Add FreeBSD 8.2.
Reviewed by:	ru
MFC after:	3 days
2010-10-14 14:48:11 +00:00
delphij
db4ea844fd 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
042e7c1702 Retire GNU man in favor of the newly written BSDL version.
Approved by:	wes (mentor)
2010-10-03 22:24:14 +00:00
rpaulo
c183b15af9 Remove target peigen.c so that make doesn't warn us about it. 2010-09-30 07:12:09 +00:00
rpaulo
2f07ce984f 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
emaste
1efa60231a 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
dim
0f23475721 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
697336483f 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
dim
91d6577035 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
nwhitehorn
02bb2a078e 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
imp
177089b4f1 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
imp
c3a399c4ba 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
415098b7a0 - 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
rpaulo
6787401fc4 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
10d63a94a9 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
jhb
04e092db6f Change kgdb_lookup() to resolve symbols via GDB instead of via libkvm(3). 2010-08-04 21:02:04 +00:00
jkim
35e00f225e Give kgdb(1) a chance to take a look at FPU state. 2010-08-02 17:40:25 +00:00
uqs
09e9558b9a Fix case for library macros 2010-08-02 15:33:16 +00:00
rpaulo
9590160d8d Add libproc.
Sponsored by:	The FreeBSD Foundation
2010-07-31 14:57:33 +00:00
rpaulo
7d7db1db81 Add librtld_db.
Sponsored by:	The FreeBSD Foundation
2010-07-31 14:36:34 +00:00
avg
e702b156d5 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
rpaulo
d963dff976 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
251126898a 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
nwhitehorn
5d21d768b2 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
bcr
ca3822712e 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
kib
af2d069e9b 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
jchandra
a9f1406947 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
kib
056723449a 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
ae
00535e15c0 Make all tests in libdialog compilable.
Fix coredump in menu3.c.

Approved by:	kib (mentor)
2010-06-15 10:01:49 +00:00
raj
ce1aea1edb Connect FDT infrastructure to the build system.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-06-13 13:02:43 +00:00
jmallett
4fa69f6443 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
jmallett
ef36c6939e 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
raj
aa901e65a1 Correct dtc version header autogen location.
While there unify brackets usage.
2010-05-25 13:27:55 +00:00