Commit Graph

63 Commits

Author SHA1 Message Date
Bryan Drewery
635718c0d9 Rename RELTOP since it will mean something else globally.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:37 +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
Warner Losh
7709b2ae16 Make _TO_CPUARCH macro for ARCH to CPUARCH conversions
Consolidate all the regular expressions to convert from MACHINE_ARCH
to MACHINE_CPUARCH into a variable and use that variable in preference
to the almost identical copies in the tree (which should have been
identical).

Differential Revision: https://reviews.freebsd.org/D11986
2017-08-12 17:07:27 +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
Justin Hibbits
dc9b124d66 Create a new MACHINE_ARCH for Freescale PowerPC e500v2
Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU.  The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive.  Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement.  setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used.  However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI.  Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By:	bdrewery, imp
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5683
2016-10-22 01:57:15 +00:00
Bryan Drewery
b987685fe0 Revert r302670 and r302671 for now.
MACHINE_CPUARCH smells like MACHINE except for arm64/aarch64 which
has it backwards.
2016-07-13 01:35:53 +00:00
Bryan Drewery
8a6bdc134d Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.
This also adds missing s/aarch64/arm64 to the sys.mk version and also
adds back armv6hf for universe since it was added to the sys.mk version
in r300438.

MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7159
2016-07-12 18:57:25 +00:00
Warner Losh
2c0e9e2a09 Make armv6 hard float abi by default. Kill armv6hf.
Allow CPUTYPE=soft to build the current soft-float abi libraries.
Add UPDATING entry to announce this.

Approved by: re@ (gjb)
2016-05-18 06:01:18 +00:00
Andrew Turner
73279d4113 Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.
This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit.
This is an optional coprocessors may not be present in all devices, however
it appears to be in all current SoCs we support.

armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too
old to support this. Because of this there are a number of WITH/WITHOUT
options that are unsupported and must be left as the default value. The
options and their required value are:
 * WITH_ARM_EABI
 * WITHOUT_GCC
 * WITHOUT_GNUCXX

In addition, without an external toolchain, the following need to be left
as their default:
 * WITH_CLANG
 * WITH_CLANG_IS_CC

As there is a different method of passing float and double values to
functions the ABI is incompatible with existing armv6 binaries. To use
this a full rebuild of world is required. Because no floating point values
are passed into the kernel an armv6 kernel with VFP enabled will work with
an armv6hf userland and vice versa.
2014-03-23 12:49:25 +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
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
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
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
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
9977fc32d1 Sync: merge r215319 through r215395 from ^/head, so ports can actually
build! :)
2010-11-16 10:33:41 +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
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
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
f74ef8307a Update VERSION to 2.17.50 [FreeBSD] 2007-07-03. 2010-11-01 19:39:10 +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
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
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
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
David E. O'Brien
7d0fc2f49e MAJOR cleanup of the Bmake framework.
This includes removing all vestiges of the old not-really supported
ability to build cross tools targeting non-FreeBSD systems, such as
m68k Lynx and NetBSD.  Move as much duplicated code from platform
Makefiles into the shared Makefiles.  Add a simple mechanism for
specifying ELF 'ldscripts'.  Also share as many .h files as possible
(now a single bfd.h vs. one per platform).
2004-07-08 17:05:34 +00:00
David E. O'Brien
e223c68bfc Updated Bmake framework for Binutils 2.15. 2004-06-16 07:09:44 +00:00
Andrey A. Chernov
7e433f006b Back out attempt to bypass contrib's getopt.h on the way,
it makes cross-build fail.
Prefer invisible incorrect -current build to visible failure.
2004-03-05 16:12:31 +00:00
Andrey A. Chernov
44fc52d2ac Add -I${DESTDIR}/usr/include before -I${SRCDIR}/include to pick right
getopt.h (as workaround until it will be removed from contrib)
2004-03-04 20:36:18 +00:00
Johan Karlsson
7ff8c436d3 style.Makefile(5):
Use WARNS?= instead of WARNS=

For this to work properly for all part is the subdirectories
the WARNS assignments in Makefile.inc0 are moved to the correspondning
Makefile.inc.

Approved by:	obrien (binutils maintainer)
Tested by:	make universe
2004-02-24 19:23:33 +00:00
David E. O'Brien
0f5a412173 Update for the 2.13.2 2002-11-27 snapshot import. 2002-12-02 09:40:02 +00:00
David E. O'Brien
b8ac217e31 Yesterday was the 10th month of the year, not the 11st. 2002-10-11 08:40:19 +00:00
David E. O'Brien
28d1796af8 Update for 2.13 10-Oct-2002 import - Identify the version correctly 2002-10-11 06:23:02 +00:00
David E. O'Brien
0e7fe4f6c0 There is need to have a special BINUTIL_ARCH when we can use our more
common place TARGET_ARCH.
2002-09-22 05:29:37 +00:00
David E. O'Brien
e0444818b2 Update for 2.12.1 20-July-2002 import. 2002-08-31 20:57:53 +00:00
David E. O'Brien
2af8b6958a Updated to a 10-April-2002 2.12 branch snapshot.
This fixes serious problems in ld's symbol handling.
2002-04-12 19:59:42 +00:00
David E. O'Brien
615836eeac Update to Binutils 2.12.0 release. 2002-03-20 23:05:19 +00:00
David E. O'Brien
b0627fcc77 Tune WARNS for Alpha. 2002-03-14 02:24:25 +00:00
David E. O'Brien
d46d3a1c02 Update for binutils_2_12_anoncvs_20020221. 2002-02-22 18:49:37 +00:00
David E. O'Brien
d85bf1887e We do not need to use -I- any longer.
Presumably the issue was with arparse.[ch].  Those are now in FREEBSD-Xlist
and FREEBSD-deletelist.  So we do not import the Bison produced files that
was causing the problem.

Submitted by:	ru
2002-02-07 17:35:49 +00:00
David E. O'Brien
a1a1118a96 Change the way the version strings are handled. 2002-01-27 22:47:22 +00:00
David E. O'Brien
23e896a740 We are now at a 2.12.0 pre-release snap version. 2002-01-27 13:02:31 +00:00
David E. O'Brien
462c450905 More cleaning. 2001-10-15 01:18:51 +00:00
David E. O'Brien
bbd7c7f077 Clean up the formatting. 2001-10-14 00:58:59 +00:00
David E. O'Brien
6f6c5dce4e Update the version string so I can identify this new variant. 2001-07-20 03:51:17 +00:00
David E. O'Brien
d4d994956c Upgrade to 2.11.2. 2001-06-26 17:13:11 +00:00
David E. O'Brien
f99372a0e4 Upgrade to Binutils 2.11.0. 2001-05-28 09:19:47 +00:00
David E. O'Brien
370d222b7f Remove MIPS support.
It has rotted quite badly and no one has provided updates for it.
2001-04-11 00:12:48 +00:00
David E. O'Brien
72b5e8cc9f Correct the Bintuils src path from the debugging version I accidently
committed.
2000-11-15 22:05:00 +00:00