Commit Graph

24 Commits

Author SHA1 Message Date
John Baldwin
1ab9996fb5 libcompiler_rt/libgcc_s: Remove MIPS build glue.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39328
2023-03-29 15:05:42 -07:00
Dimitry Andric
8e5bcff58b Export _Unwind_Complete and _Unwind_VRS_Pop from arm's libgcc_s
Apparently some ports on arm require these symbols, and while they were
available in llvm's libunwind, they were never exported via the arm
specific Symbol.map. Put them in the same version block as gcc does
(GCC_3.5).

Reported by:	Robert Clausecker <fuz_at_fuz.su>
MFC after:	3 days
2022-04-27 11:04:10 +02:00
Jessica Clarke
7047568821 libgcc_s: Export 64-bit int to 128-bit float functions
The corresponding 32-bit int and 128-bit int functions were added in
790a6be5a1, as were all combinations of the float to int functions,
but these two were overlooked. __floatditf is needed to build curl for
riscv as there's a signed 64-bit int to 128-bit float conversion in
lib/progress.c's trspeed as of 7.77.0.

Reviewed by:	dim
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31997
2021-10-03 19:34:25 +01:00
Alex Richardson
7bc797e3f3 Add build system support for ASAN+UBSAN instrumentation
This adds two new options WITH_ASAN/WITH_UBSAN that can be set to
enable instrumentation of all binaries with AddressSanitizer and/or
UndefinedBehaviourSanitizer. This current patch is almost sufficient
to get a complete buildworld with sanitizer instrumentation but in
order to actually build and boot a system it depends on a few more
follow-up commits.

Reviewed By:	brooks, kib, markj
Differential Revision: https://reviews.freebsd.org/D31043
2021-08-02 14:33:24 +01:00
Dimitry Andric
790a6be5a1 Export various 128 bit long double functions from libgcc_s.so.1
These were already compiled for some time on aarch64 and riscv, by
including lib/libcompiler_rt/Makefile.inc, but never exported in the
shared library. Since gcc exports these under version GCC_4.6.0, we do
the same.

This review should replace D11482 for now. For e.g. amd64 more work is
still to be done, as compiler-rt does not seem to support 128 bit long
double math for that architecture.

Reviewed by:	cem
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D28690
2021-06-14 21:17:05 +02:00
Alex Richardson
7fa2f2a62f Rename NO_WERROR -> MK_WERROR=no
As suggested in D27598. This also supports MK_WERROR.clang=no and
MK_WERROR.gcc=no to support the existing NO_WERROR.<compiler> uses.

Reviewed By:	brooks
Differential Revision: https://reviews.freebsd.org/D27601
2021-01-07 09:31:03 +00:00
John Baldwin
371f3da616 Remove the SYMVER build option.
This option was added as a transition aide when symbol versioning was
first added.  It was enabled by default in 2007 and is supported even
by the old GPLv2 binutils.  Trying to disable it currently fails to
build in libc and at this point it isn't worth fixing the build.

Reported by:	Michael Dexter
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D24637
2020-04-30 22:08:40 +00:00
Michal Meloun
1fa29c42bb Fix LLVM libunwnwind _Unwind_Backtrace symbol version for ARM.
In original  GNU libgcc, _Unwind_Backtrace is published with GCC_3.3 version
for all architectures but ARM. For ARM should be publishes with GCC_4.3.0
version. This was originally omitted in r255095, fixed in r318024 and omitted
aging in LLVM libunwind implementation in r354347.

For ARM _Unwind_Backtrace should be published as default with GCC_4.3.0
version , (because this is right original version) and again as
normal(not-default) with GCC_3.3 version (to maintain ABI compatibility
compiled/linked with wrong pre r318024 libgcc)

PR:	233664
2019-12-16 14:08:49 +00:00
Simon J. Gerraty
2c9a9dfc18 Update Makefile.depend files
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22494
2019-12-11 17:37:53 +00:00
Conrad Meyer
c8b5e3de39 Fix llvm-libunwind userspace build on ARM
GCC's libgcc exports a few ARM-specific symbols for ARM EABI, AEABI, or
EHABI or whatever it's called.  Export the same ones from LLVM-libunwind's
libgcc_s, on ARM.  As part of this, convert libgcc_s from a direct
Version.map to one constructed from component Symbol.map files.  This allows
the ARM-specific Symbol.map to be included only on ARM.

Fix ARM-only oddities in struct name/aliases in LLVM-libunwind to match
non-ARM definitions and ARM-specific expectations in libcxxrt /
libcompiler_rt.

No functional change intended for non-ARM architectures.

This commit does not actually flip the switch for ARM defaults from libgcc
to llvm-libunwind, but makes it possible (to compile, anyway).
2019-11-05 03:20:40 +00:00
Glen Barber
9de4d0b11e Fix build by escaping a line break.
PR:		225597
Submitted by:	cbnfinley at gmail.com
Sponsored by:	The FreeBSD Foundation
2018-01-31 21:41:42 +00:00
John Baldwin
2c4bb7e326 Don't include long double routines on architectures with small long double.
Reviewed by:	emaste
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D13874
2018-01-31 18:13:33 +00:00
Bryan Drewery
a160cbfa07 DIRDEPS_BUILD: libgcc now depends on MK_LLVM_LIBUNWIND
The dependency on gnu/lib/libgcc or lib/libgcc* is determined
at 'make dirdeps' time.

Sponsored by:	Dell EMC Isilon
2017-10-31 00:03:36 +00:00
Ed Maste
8f99208721 Sort entries in libgcc_s Version.map 2017-07-05 13:13:38 +00:00
Enji Cooper
b0a39ef04d Apply r315689 to lib/libgcc_s as well to unbreak the gcc xtoolchain build
lib/libgcc_s consumes lib/libcompiler_rt/Makefile*. The NO_WERROR.gcc in
lib/libcompiler_rt/Makefile doesn't seem to have made a difference in being
able to build this, so sprinkle NO_WERROR.gcc here as well.

MFC after:	3 days
Reported by:	Jenkins (FreeBSD-head-amd64-gcc)
Tested with:	amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:	Dell EMC Isilon
2017-03-28 19:01:01 +00:00
Ed Maste
2f21ec0129 libgcc_s: add libc DT_NEEDED to fix underlinking
PR:		216012
Reported by:	jbeich
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2017-01-13 15:17:25 +00:00
Ed Maste
2ed1e385b0 libcc_{s,eh}: build without SSP
As in the gnu/lib/libgcc Makefile:
    libgcc is linked in last and thus cannot depend on ssp
    symbols coming from earlier libraries. Disable stack protection
    for this library.

Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
2016-11-11 23:28:07 +00:00
Glen Barber
0eaded92d0 Spell 'PACKAGE' correctly.
Submitted by:	Kyle Evans, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2016-11-11 18:47:53 +00:00
Ed Maste
199f4e8d68 add missing i386 symbols libgcc_s symbol version map
After r308294 they were missing on i386 (and previously were exported
only accidentally).

Reported by:	antoine
2016-11-08 17:36:19 +00:00
Ed Maste
7f35637063 add __divdi3 and __udivdi3 to libgcc_s symbol version map
After r308294 they were missing on i386 (and previously were exported
only accidentally).

Reported by:	antoine
2016-11-06 17:21:26 +00:00
Ed Maste
e8664a318d libgcc_s: make unspecified shlib symbols local
We want only symbols explicitly specified in the Version.map.

Sponsored by:	The FreeBSD Foundation
2016-11-04 15:44:00 +00:00
Ed Maste
6430a5fde0 Move the LLVM-based libgcc_s to /lib
When enabled, it should install in the same location as the existing
library.

Reported by:	antoine
2016-10-24 14:56:13 +00:00
Ed Maste
bff207520a libgcc_s: add libm dependencies from div{d,s,x}c3
compiler-rt's complex division support routines contain calls to
compiler builtins such as `__builtin_scalbnl`.  Unfortunately Clang
turns these back into a call to `scalbnl`.

For now link libm's C version of the required support routines.

Reviewed by:	ed
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8190
2016-10-13 19:18:00 +00:00
Ed Maste
49c5eacbbf Introduce lib/libgcc_eh and lib/libgcc_s for LLVM's implementation
They are not yet connected to the build, but I am adding them to allow
for easier testing, ports exp-runs, etc.

Reviewed by:	ed
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8188
2016-10-13 18:57:18 +00:00