Commit Graph

160 Commits

Author SHA1 Message Date
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
Nathan Whitehorn
eb90003fa8 After the binutils 2.17.50 import, the assembler supports AS_REL16
relocations.
2012-07-08 17:02:14 +00:00
Oleksandr Tymoshenko
5989db894d Enable TLS support for ARM toolchain
Reviewed by:	cognet
2012-02-14 00:18:18 +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
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
Nathan Whitehorn
af1fdf0dbf Fix a missing underscore. 2010-12-09 17:39:40 +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
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
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
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 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
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
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
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
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
David E. O'Brien
55738a1aa4 Remove gratuitous white space change. 2006-11-06 02:49:19 +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
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
Warner Losh
ba15c568ab Fix three whitespace nits.
I think these are from kan@...
2006-09-11 05:12:12 +00:00
David E. O'Brien
9c82c2e2b6 The platform name is ARM not StrongARM.
Submitted by:	cognet
2006-07-22 14:12:02 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
David E. O'Brien
a1cfcf9970 Locate __FreeBSD_cc_version's value beside __FreeBSD__'s value to make it
easier to keep them in sync.
2005-10-30 19:04:47 +00:00
David E. O'Brien
67ae096798 Catch up with FreeBSD 7. 2005-10-29 09:13:31 +00:00
Alexander Kabaev
5f6d880564 Update bmake glue for GCC 3.4.4. 2005-06-03 04:21:04 +00:00
Ruslan Ermilov
7c996c4acc A fix from rev. 1.52 of gnu/usr.bin/cc/cc_tools/Makefile was lost
in rev. 1.57.  Fix this regression by making cc_tools a new-style
build-tool in Makefile.inc1.  For details of what has been fixed,
please see the gnu/usr.bin/cc/cc_tools/Makefile,v 1.52 commit log.

Caught this by accidentally touching param.h while in the process
of cross-buildworld for amd64.
2004-08-18 13:21:40 +00:00
Alexander Kabaev
3b76f3bcca Consolidate libiberty files in one place and avoid listing some
of them in several places.

Noticed by:	bsdimp
2004-08-12 16:36:52 +00:00
Alexander Kabaev
81efba8c9e Bmake glue for GCC 3.4.2-prerelease. 2004-07-28 05:27:21 +00:00
Peter Wemm
20fe68acb9 Revise previous commit - I managed to mess up a 1-line change and broke
amd64 world.  The csu code evalues this Makefile with a different origin.
2004-06-11 00:35:29 +00:00
Peter Wemm
aabc36c5b8 The gcc/config/i386/freebsd64.h file neglects to override the default
(bogus, application name space) mcount function name on amd64.  Override
it here instead.

I've done it this way to avoid touching gcc source while 3.4 is in
progress, and this is the smallest, lowest impact I could come up with.
Adding a patch touches about 10-14 lines of Makefile, this touches only 1.
This will likely go away with the 3.4 import.

I spoke with Alexander about this a few days ago, but waited until after
sorting out some of the other bugs in the userland profiling.
2004-06-10 22:18:33 +00:00
Bruce Evans
c561816b66 Backed out the residue of rev.1.13 (bogus addition of -static to CFLAGS).
Makeworld will add -static in the correct place if needed and possible.
Self-hosted builds can just use the system default.

Fixed some nearby style bugs (code unrelated to its comment, and comment
formatting).
2004-02-26 07:08:33 +00:00
Alexander Kabaev
1d38183672 Do not treat make variables as Perl variables. 2004-01-26 16:12:29 +00:00
Ruslan Ermilov
0161ff2670 Fixed "make clean". 2004-01-15 10:07:59 +00:00
Ruslan Ermilov
1b427c9cd4 Removed duplicate SRCS. 2004-01-12 07:46:20 +00:00
Alexander Kabaev
cd3d9d6c3c Use __cxa_atexit, rather than atexit, to register C++ destructors for local
statics and global objects.  This is essential for fully standards-compliant
handling of destructors, and requires __cxa_atexit in libc.
2003-12-19 18:20:48 +00:00
Alexander Kabaev
0810229e75 Including dynamically generated osreldate.h wasn't such a good
idea after all.

Fix cross-builds and ia64 builds. gnu/lib/csu/Makefile is modified to
pre-include osreldate.h and gnu/usr.bin/cc/cc_tools/auto-host.h
will avoid including sys/param.h if __FreeBSD_version is already defined.
2003-07-13 02:41:48 +00:00
Alexander Kabaev
00041cf539 Include osreldate.h instead of sys/param.h to get __FreeBSD_version
definition. This fixes buildworld breakage on ia64.
2003-07-11 18:55:58 +00:00
Alexander Kabaev
e67810e696 Update bmake bits to build GCC 3.3.1-prerelease. 2003-07-11 05:37:23 +00:00