Commit Graph

426 Commits

Author SHA1 Message Date
Pedro F. Giffuni
d92873b834 gcc: install AMD intrinsics header ammintrin.h
This file was included in the changes from r251212 and originated
in the pre-GPLv3 gcc43 branch.

MFC after:	2 weeks
2013-06-07 00:48:01 +00:00
Dimitry Andric
ffd564d5d9 When gcc 4.2.0 was imported, the 3DNow intrinsics header <mm3dnow.h> was
not added to the list of intrinsics headers to install, so belatedly (5
years :) add it.

MFC after:	1 week
2013-05-08 22:54:53 +00:00
Rui Paulo
db62a45d65 Remove the Fortran directories. 2013-04-25 06:05:43 +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
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
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
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
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
Nathan Whitehorn
eb90003fa8 After the binutils 2.17.50 import, the assembler supports AS_REL16
relocations.
2012-07-08 17:02:14 +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
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
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
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
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
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
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
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
Nathan Whitehorn
af1fdf0dbf Fix a missing underscore. 2010-12-09 17:39:40 +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
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
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
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
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
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
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
Warner Losh
56ac80ce81 Make little endian compiles produce little endian binaries on mips.
Submitted by:	neel@
2010-03-05 21:24:41 +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
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
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
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
David E. O'Brien
4bdc01a9f9 Add FreeBSD/MIPS support to GCC. 2008-09-01 18:46:03 +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
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
David E. O'Brien
29e0f3f543 Welcome FreeBSD 8. 2007-10-12 17:49:12 +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
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