Commit Graph

699 Commits

Author SHA1 Message Date
Dimitry Andric
f289fa663b For building GNU libstdc++ and libsupc++, filter out libc++-specific and
-std= flags above c++98 or gnu++98 from CXXFLAGS *after* including
bsd.lib.mk, otherwise some additions to CXXFLAGS done in bsd.*.mk might
not be preserved.

MFC after:	1 week
2012-10-23 18:57:20 +00:00
Nathan Whitehorn
2a664c03e5 Update dialog to 20120706: includes minor useability enhancements and
fixes for warnings encountered with clang.
2012-10-21 18:25:12 +00:00
Dimitry Andric
69714daa44 For building libstdc++ and libsupc++, filter out any -stdlib=libc++
option from CXXFLAGS, otherwise these libraries will not build.
Similarly, filter out any -std=xxx options that aren't supported.

Submitted by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
MFC after:	2 weeks
2012-08-25 23:08:24 +00:00
Marius Strobl
acc743293d Turn on TLS support for arm on here as it is supported since r231618/
r231619 and working since r233106.
2012-06-14 20:27:28 +00:00
David Chisnall
fe13239287 Clean up some symbol versions for libsupc++ / libcxxrt.
MFC after:	1 week
Reviewed by:	kan
2012-06-11 15:40:57 +00:00
Dag-Erling Smørgrav
87b8d8bbc9 Add mangled symbols for operator new / delete on 64-bit platforms.
Reported by:	decke@
MFC after:	1 week
2012-06-05 12:34:08 +00:00
David Chisnall
523f54dd4a Correctly export operator new / delete for things linking against libsupc++ but
not libstdc++.

Unfortunately, it appears that libsupc++ / libstdc++ have a different idea of
the type of size_t to the rest of the world, which may cause problems later
on...

Reported by:	des
MFC after:	1 week
2012-05-28 12:11:00 +00:00
Marcel Moolenaar
450ea99db7 Don't recurse into libssp when MK_SSP is set to no. 2012-05-21 16:03:44 +00:00
Marcel Moolenaar
c7a6b0911b Build the "S" objects with the same name they get installed under.
That is, build crtbeginS.o and crtendS.o instead of crtbegin.So and
crtend.So. Remove the name substitution during install.

Obtained from:	Juniper Networks, Inc.
2012-05-17 20:38:01 +00:00
Marius Strobl
45e2c46b37 Switch sparc64 to using libcompiler_rt; since r230021 we have a workaround
in place allowing it to be used there and since r235388 (see also r235486)
we also have usable div/mod optimizations like libgcc has.
2012-05-15 22:47:34 +00:00
Dimitry Andric
db3212b375 Revert r234356 for now, as it leads to run-time problems on 32-bit
PowerPC.  Note this will break world.

Reported by:	andreast
Pointy hat to:	dim
2012-04-23 06:33:27 +00:00
Warner Losh
01712ae93a Replace a bare use of nm with ${NM} for easier cross compilation in
environments where nm is spelled differently.
2012-04-21 16:02:00 +00:00
Dimitry Andric
4f78aa4725 Work around an issue on 32-bit PowerPC, where clang executable can get
too big, causing 'relocation truncated to fit' errors at link time.

Reviewed by:	nwhitehorn
2012-04-16 21:36:55 +00:00
David Chisnall
cf56074e52 Make libsupc++ build as a shared library and make libstdc++ a filter library
for it.

This allows people to swap out libsupc++ for libcxxrt easily, so we can begin
the libstdc++ -> libc++ migration.

Approved by:	dim (mentor)
2012-03-31 14:25:12 +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
Max Khon
46968249f1 libodialog: Remove no longer used library. 2011-11-24 20:34:50 +00:00
Max Khon
24d1b19ec4 libodialog: disconnect from the build and obsolete. 2011-11-24 20:31:06 +00:00
Dimitry Andric
130515293b When one attempts to compile the tree with -march=i386, which also used
to be gcc's default before r198344, calls to atomic builtins will not be
expanded inline.  Instead, they will be generated as calls to external
functions (e.g. __sync_fetch_and_add_N), leading to linking errors later
on.

Put in a seatbelt that disables use of atomic builtins in libstdc++ and
llvm, when tuning specifically for the real i386 CPU.  This does not
protect against all possible issues, but it is better than nothing.
2011-11-06 14:07:23 +00:00
Nathan Whitehorn
682c9e0fed Update dialog to 1.1-20110707. 2011-07-14 14:01:36 +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
Nathan Whitehorn
7a1c0d9633 Update dialog to version 1.1-20110302. 2011-04-17 17:28:17 +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
2774633be1 Enable wide character support in libdialog. 2011-02-05 16:23:32 +00:00
Warner Losh
39bf09d2a0 Make the generated files depend on the Makefile so new platforms are easier
to add than mipsn32 was when I was working on it...
2011-02-02 03:27:31 +00:00
Warner Losh
4ef48a113b Revert last change now that the reason for it is no more...
MACHINE_ARCH is now always mipsel when building mips/mips.
2011-02-02 03:24:52 +00:00
Jayachandran C.
1fb145a629 Rewrite the ARCH check another way for backward compatibility.
Compilation fails now, if TARGET_ARCH=mips instead of mipsel/mipseb.
2011-01-29 10:32:00 +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
Nathan Whitehorn
4c8945a06b Update dialog to version 20100428. This changes the license under which
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new
features and a new and better libdialog API. The existing libdialog will
be kept temporarily as libodialog for compatibility purposes until sade,
sysinstall and tzsetup have been either updated or replaced.

__FreeBSD_version is now 900030.

Discussed on:	-current
Approved by:	core
Obtained from:	http://invisible-island.net/dialog
2011-01-12 14:55:02 +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
Alexander Kabaev
d933fa1a10 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
Dimitry Andric
29d0dcddab Sync: merge r215273 through r215318 from ^/head. 2010-11-14 20:47:30 +00:00
Warner Losh
cf3b7dd35b These two cases should be different...
Submitted by:	nathanw@
2010-11-14 01:50:40 +00:00
Dimitry Andric
5fbbc222c8 Sync: merge r215141 through r215188 from ^/head. 2010-11-12 17:20:18 +00:00
Ed Schouten
585d4a8062 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
Dimitry Andric
1170f3d12e Sync: merge r214895 through r215140 from ^/head. 2010-11-11 20:52:24 +00:00
Ed Schouten
39cd938c39 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 Schouten
b70519663c 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
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
162972bcf5 Garbage collect gnu/lib/libiberty and gnu/lib/libg2c, these have not
been used for years.
2010-10-22 18:11:17 +00:00
Dimitry Andric
d205253515 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 Coosemans
2751839107 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
Dimitry Andric
c05f0da034 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
Nathan Whitehorn
b12277d1d4 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
Warner Losh
b57429d082 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
Warner Losh
25faff346c 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
Rui Paulo
3a060e4a1a 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 Andrews
4be3feb212 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
Rui Paulo
fcfec2f998 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
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