Move all sources from the llvm project into contrib/llvm-project.This uses the new layout of the upstream repository, which was recentlymigrated to GitHub, and converted into a "monorepo". That i
Move all sources from the llvm project into contrib/llvm-project.This uses the new layout of the upstream repository, which was recentlymigrated to GitHub, and converted into a "monorepo". That is, most ofthe earlier separate sub-projects with their own branches and tags wereconsolidated into one top-level directory, and are now branched andtagged together.Updating the vendor area to match this layout is next.
show more ...
armv6 soft float build fixedAdd ifdefs in the assembler for soft-float compile case.Submitted by: Hiroki MoriReviewed by: ray@Differential Review: https://reviews.freebsd.org/D22352
libc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorp
libc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
Support armv7 builds for userlandMake armv7 as a new MACHINE_ARCH.Copy all the places we do armv6 and add armv7 as basically analias. clang appears to generate code for armv7 by default. armv7 h
Support armv7 builds for userlandMake armv7 as a new MACHINE_ARCH.Copy all the places we do armv6 and add armv7 as basically analias. clang appears to generate code for armv7 by default. armv7 hardfloat isn't supported by the the in-tree gcc, so it hasn't beenupdated to have a new default.Support armv7 as a new valid MACHINE_ARCH (and by extensionTARGET_ARCH).Add armv7 to the universe build.Differential Revision: https://reviews.freebsd.org/D12010
Publish __aeabi_uidiv and __aeabi_idiv as compatible symbols from libc.Due to bug[1] in libcompiler_rt, all symbols declared byDEFINE_AEABI_FUNCTION_ALIAS() are not hidden. All these but twoare e
Publish __aeabi_uidiv and __aeabi_idiv as compatible symbols from libc.Due to bug[1] in libcompiler_rt, all symbols declared byDEFINE_AEABI_FUNCTION_ALIAS() are not hidden. All these but twoare explicitly exported from libc and don't causes problems.Remaining two, __aeabi_uidiv and __aeabi_idiv, infecting allnon-versioned shared libraries. And these symbols are consumedby many (if not all) packages[2].As workaround, export these from libc as compatible symbols,in global namespace. With this, these are still visible forrtld, but static linker doesn't use then.[1]DEFINE_AEABI_FUNCTION_ALIAS() macro uses '.set' directive fordeclaration of aliased symbol. Unfortunately, '.set' doesn'tinherit visibility of base symbol, and macro don't explicitlysets visibility for aliased one.[2]Given symbols are exported from non-versioned libraries only iflibrary itself uses them. So, if world is built for CPU withHW divide, these function are not used and given symbols arenot exported. By this, contents of these libraries is not stable,and all packages fails to run.Note: Due to r313823 I'm forced to commit this too early, withoutleave enough time for proper review.MFC after: 1 monthDifferential Revision: https://reviews.freebsd.org/D9632
Replace dot-dot relative pathing with SRCTOP-relative paths where possibleThis reduces build output, need for recalculating paths, and makes it clearerwhich paths are relative to what areas in the
Replace dot-dot relative pathing with SRCTOP-relative paths where possibleThis reduces build output, need for recalculating paths, and makes it clearerwhich paths are relative to what areas in the source tree. The change inperformance over a locally mounted UFS filesystem was negligible in my testing,but this may more positively impact other filesystems like NFS.LIBC_SRCTOP was left alone so Juniper (and other users) can continue tomanipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) asinclude Makefiles with custom options.Discussed with: marcel, sjgMFC after: 1 weekReviewed by: emasteSponsored by: Dell EMC IsilonDifferential Revision: https://reviews.freebsd.org/D9207
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)
Revert a change that sneeked with 297619
Disable support for compat syscalls on arm64. These symbols were nevershipped since arm64 exists only on 11+.Submitted by: brooksReviewed by: emaste, imp
Annotate arm userspace assembler sources stating their tolerance tothe non-executable stack.Reviewed by: andrewSponsored by: The FreeBSD Foundation
Export the ARM __aeabi_mem* functions from libc, they are needed by the gccfrom ports as it doesn't include these in the copy of libgcc it installsuses.Obtained from: ABT Systems Ltd
Use a register to set the cpsr bits. The ip register is safe to be changedwithin all of these functions, and is only stored in some to correctly padthe stack.This will be needed to build as Thumb
Use a register to set the cpsr bits. The ip register is safe to be changedwithin all of these functions, and is only stored in some to correctly padthe stack.This will be needed to build as Thumb-2 as, unlike with ARM instructions,the msr instruction only takes a register as the input.
Teach bits of libc about Thumb. This adds the if-then instructions neededto handle the ARM conditional execution.While here fix a bug found by this in the hard-float code, cc is theopposite of cs
Teach bits of libc about Thumb. This adds the if-then instructions neededto handle the ARM conditional execution.While here fix a bug found by this in the hard-float code, cc is theopposite of cs. The former is used for 'less than' in floating-point codeand is executed when the C (carry) bit is clear, the latter is used whengreater than, equal, or unordered, and is executed when the C bit is set.
Apparently more Makefiles use stuff from compiler-rt, so fix them uptoo. (This did not show during a make universe, strangely.)
Add support for the __aeabi_c*cmp* functions. These are similar to theexisting functions with the exception they use the condition flags tostore the result.Differential Revision: https://reviews.
Add support for the __aeabi_c*cmp* functions. These are similar to theexisting functions with the exception they use the condition flags tostore the result.Differential Revision: https://reviews.freebsd.org/D872Silence from: current@ and numerics@MFC after: 1 week
Clean up detection of hard-float ABIs. As with big-endian in r272368 wecan check against arm*hf*.
From https://sourceware.org/ml/newlib/2014/msg00113.htmlBy Richard Earnshaw at ARM>>GCC has for a number of years provides a set of pre-defined macros for>use with determining the ISA and feature
From https://sourceware.org/ml/newlib/2014/msg00113.htmlBy Richard Earnshaw at ARM>>GCC has for a number of years provides a set of pre-defined macros for>use with determining the ISA and features of the target during>pre-processing. However, the design was always somewhat cumbersome in>that each new architecture revision created a new define and then>removed the previous one. This meant that it was necessary to keep>updating the support code simply to recognise a new architecture being>added.>>The ACLE specification (ARM C Language Extentions)>(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html)>provides a much more suitable interface and GCC has supported this>since gcc-4.8.>>This patch makes use of the ACLE pre-defines to map to the internal>feature definitions. To support older versions of GCC a compatibility>header is provided that maps the traditional pre-defines onto the new>ACLE ones.Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in thecouple of places in tree. clang already implements ACLE. Add a definethat says we implement version 1.1, even though the implementationisn't quite complete.
Add dl_unwind_find_exidx() for ARM EABI, required for C++ exceptionhandling. For statically linked apps this uses the __exidx_start/endsymbols set up by the linker. For dynamically linked apps it
Add dl_unwind_find_exidx() for ARM EABI, required for C++ exceptionhandling. For statically linked apps this uses the __exidx_start/endsymbols set up by the linker. For dynamically linked apps it finds theshared object that contains the given address and returns the location andsize of the exidx section in that shared object.The dl_unwind_find_exidx() name is used by other BSD projects and Android,and is mentioned in clang 3.5 comments as "the BSD interface" for findingexidx data. GCC (in libgcc_s) expects the exact same API and functionalityto be provided by a function named __gnu_Unwind_Find_exidx(), so we providethat with an alias ("strong reference").Reviewed by: kib@MFC after: 1 week
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 al
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, howeverit appears to be in all current SoCs we support.armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is tooold to support this. Because of this there are a number of WITH/WITHOUToptions that are unsupported and must be left as the default value. Theoptions and their required value are: * WITH_ARM_EABI * WITHOUT_GCC * WITHOUT_GNUCXXIn addition, without an external toolchain, the following need to be leftas their default: * WITH_CLANG * WITH_CLANG_IS_CCAs there is a different method of passing float and double values tofunctions the ABI is incompatible with existing armv6 binaries. To usethis a full rebuild of world is required. Because no floating point valuesare passed into the kernel an armv6 kernel with VFP enabled will work withan armv6hf userland and vice versa.
Remove an extra 1 in an #if lineReported by: ian@
Fix the spelling of function.Reported by: ian@
Add an optimised version of the float and double helper functions. Theseare only used on armv6 when the vfp unit is detected. They will also beavailable for the upcoming armv6hf platform, however w
Add an optimised version of the float and double helper functions. Theseare only used on armv6 when the vfp unit is detected. They will also beavailable for the upcoming armv6hf platform, however while not used bydefault there will need to be defined for any software that calls themdirectly.
Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}if not already defined. This allows building libc from outside oflib/libc using a reach-over makefile.A typical use-case is to
Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}if not already defined. This allows building libc from outside oflib/libc using a reach-over makefile.A typical use-case is to build a standard ILP32 version and a COMPAT32version in a single iteration by building the COMPAT32 version using areach-over makefile.Obtained from: Juniper Networks, Inc.
When clang builds libc it may insert calls to __aeabi_* functions. Normallythis is not a problem as they are resolved by libgcc. The exception is forthe __aeabi_mem* functions. These call back into
When clang builds libc it may insert calls to __aeabi_* functions. Normallythis is not a problem as they are resolved by libgcc. The exception is forthe __aeabi_mem* functions. These call back into libc to the appropriatefunction. This causes issues for static binaries as we only link againstlibc once so there is no way for it to call into libgcc and back.The fix for this is to include these symbols in libc but keep them hiddenso binaries use the libgcc version.
Add the required __aeabi_* functions to libc.The floating point functions are here rather than compiler-rt because thelibc softfloat code allows us to set the rounding mode.