Commit Graph

158 Commits

Author SHA1 Message Date
Andrew Turner
ae1dac06a2 Teach binutils that arm64 is a 64bit architecture. This is needed to cross
build from arm64 to other architectures that use binutils.

Sponsored by:	ABT Systems Ltd
2018-07-06 11:50:59 +00:00
Jonathan Anderson
bab31140a2 Remove redundant source and object files.
Reviewed by:	bdrewery, ngie
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12208
2017-09-09 13:18:32 +00:00
Warner Losh
40b0fb72f5 Convert all the arm big endian tests into a regexp rather than a list.
Suggested by: emaste@
2017-08-14 22:25:20 +00:00
Ruslan Bukin
5bca221511 Add full softfloat and hardfloat support for MIPS.
This adds new target architectures for hardfloat:
mipselhf mipshf mips64elhf mips64hf.

Tested in QEMU only.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D8376
2016-10-31 15:33:58 +00:00
Bryan Drewery
bd18fd57db DIRDEPS_BUILD: Regenerate without local dependencies.
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:20:11 +00:00
Bryan Drewery
660d1f65bb Add missing CLEANFILES.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 23:15:24 +00:00
Simon J. Gerraty
7f4b19cbf8 Avoid circular dependency with nm 2015-06-14 03:33:27 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Justin Hibbits
ff0bab9760 Add new PowerPC relocations to binutils
Summary:
LLVM/Clang generates relocations that our binutils doesn't understand, but newer
binutils does.  I got permission from the author of a series of patches to
relicense them as GPLv2 for use in FreeBSD.  The upstream git hashes are:

ac2df442ac7901f00af15b272fc48b594b433713
2b95367962dc14f69d3c338c4d54195266e2e169
102890f04c44b64cf5cef4588267dd9f24086ac7
b7fcf6f6bb53b5027e111107f5416769cb9a5798
1d483afedd5a628dc84fb58d1d570f79fdfbfa7b
90aecf7a80c1cefeb45fc10a6cd02c8338e34b4c
3a71aa26df2a372a58e9c11ef9ba51fd0e83320a
727fc41e077139570ea8b8ddfd6c546b2a55627c

With the import of clang 3.5, and a few backported patches, we should be able to
move powerpc and powerpc64 to clang-as-cc soon.

Test Plan: Passes make tinderbox, so no regressions.  Binaries built with clang
run on powerpc64.

Reviewers: #committers, dim

Reviewed By: dim

Differential Revision: https://reviews.freebsd.org/D1297

Obtained from:	Alan Modra, upstream binutils-gdb git
MFC after:	3 weeks
Relnotes:	yes
2014-12-12 03:58:51 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Gavin Atkinson
ad3afeea16 With the move away from GNATS, point end users to a better web page
detailing how to report bugs.

Hat:		bugmeister
MFC after:	3 days
2014-06-14 18:45:40 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +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
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
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
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
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
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
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
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
Dimitry Andric
1170f3d12e Sync: merge r214895 through r215140 from ^/head. 2010-11-11 20:52:24 +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
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
0921c6ef0b Update Makefile, bfd.h and config.h.bsd for libbfd. 2010-11-01 19:41:22 +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
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
bd9ba01aba Update the BFD and binutils version defines. 2010-10-19 20:17:17 +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
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
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
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
5abe265777 Push mips support into the tree. 2008-12-11 08:20:34 +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
Marcel Moolenaar
468390dffd Add support for the 32-bit EFI target. 2008-04-17 23:36:35 +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
Warner Losh
38ede4873d Remove redundant default vector
Submitted by: ru@
2006-09-14 08:21:20 +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
f6b979e59e .end -> .endif 2006-09-14 07:02:17 +00:00
David E. O'Brien
6b31c6b17f Craft the FreeBSD/ARM ABI by hacking the New ARM ABI source.
Submitted by:	cognet
2006-09-12 07:03:58 +00:00
David E. O'Brien
da07c79f6a Default vector to big endian ARM if "TARGET_BIG_ENDIAN" is defined. 2006-09-12 07:02:15 +00:00