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.
show more ...
For now, compile all of contrib/gdtoa without requiring strict aliasing,since it is using type punning of union members, and clang does not yetsupport gcc's extensions which allow this (refer toht
For now, compile all of contrib/gdtoa without requiring strict aliasing,since it is using type punning of union members, and clang does not yetsupport gcc's extensions which allow this (refer tohttps://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Type%2dpunningfor more information).This should fix strtod(3) return values for the lang/julia port, so itdoes not fail on an assertion during its build.PR: 216770
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
META MODE: Don't create .meta files when symlinking sources into the obj directory.Tracking these leads to situations where meta mode will consider thefile to be out of date if /bin/sh or /bin/ln
META MODE: Don't create .meta files when symlinking sources into the obj directory.Tracking these leads to situations where meta mode will consider thefile to be out of date if /bin/sh or /bin/ln are newer than the sourcefile. There's no reason for meta mode to do this as make is alreadyhandling the rebuild dependency fine.Sponsored by: EMC / Isilon Storage Division
Add missing include to eliminate -Wmissing-prototypes warning
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.
Implement xlocale APIs from Darwin, mainly for use by libc++. This adds aload of _l suffixed versions of various standard library functions that usethe global locale, making them take an explicit
Implement xlocale APIs from Darwin, mainly for use by libc++. This adds aload of _l suffixed versions of various standard library functions that usethe global locale, making them take an explicit locale parameter. Alsoadds support for per-thread locales. This work was funded by the FreeBSDFoundation.Please test any code you have that uses the C standard locale functions!Reviewed by: das (gdtoa changes)Approved by: dim (mentor)
Unbreak the build for arm and powerpc.Pointy hat to yours truly.
Make several changes to the way printf handles hex floating point (%a):1. Previously, printing the number 1.0 could produce 0x1p+0, 0x2p-1, 0x4p-2, or 0x8p-3, depending on what happened to be co
Make several changes to the way printf handles hex floating point (%a):1. Previously, printing the number 1.0 could produce 0x1p+0, 0x2p-1, 0x4p-2, or 0x8p-3, depending on what happened to be convenient. This meant that printing a value as a double and printing the same value as a long double could produce different (but equivalent) results. The change is to always make the leading digit a 1, unless the number is 0. This solves the aforementioned problem and has several other advantages.2. Use the FPU to do rounding. This is far simpler and more portable than manipulating the bits, and it fixes an obsure round-to-even bug. It also raises the exceptions now required by IEEE 754R. The drawbacks are that it is usually slightly slower, and it makes printf less effective as a debugging tool when the FPU is hosed (e.g., due to a buggy softfloat implementation).3. On i386, twiddle the rounding precision so that (2) works properly for long doubles.4. Make several simplifications that are now possible due to (2).5. Split __hldtoa() into a separate file.Thanks to remko for access to a sparc64 box for testing.
Export gdtoa's __ULto{x,Q}_D2A routine in a private namespace solibm can use it.
Fix handling of subnormals on i386/ia64/amd64.PR: 85080
In scanf, round according to the current rounding mode.
Use an intermediate pointer to avoid a strict aliasing warning.Note that ULong in this code is actually defined as an unsigned integer acrossall arches so that the gdtoa() function always processe
Use an intermediate pointer to avoid a strict aliasing warning.Note that ULong in this code is actually defined as an unsigned integer acrossall arches so that the gdtoa() function always processes 32 bit datadespite the unfortunate naming of "ULong".
Remove symbols that should not be exported.Submitted by: dasMFC after re@ approval
Fix a rounding error.Reported by: Bruno Haible
Use C comments since we now preprocess these files with CPP.
Fix rounding of 0xf for hex fp formats.PR: 90333
Don't export __gdtoa. The only known ports that rely onthis or the deprecated POSIX functions {e,g,f}cvt() havenewer versions that do not (rely on them).Requested by: marius
Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,this is used by some 3rd party applications when {e,f,g}cvt() arenot found. POSIX defines the xcvt() funtions but says they ared
Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,this is used by some 3rd party applications when {e,f,g}cvt() arenot found. POSIX defines the xcvt() funtions but says they aredeprecated in favor or sprintf(). We'll import these functionsfrom OpenBSD and remove __gdtoa() from the exported interfaceswhen libc version is bumped.
Add each directory's symbol map file to SYM_MAPS.
Add symbol maps and initial symbol version definitions to libc.Reviewed by: davidxu
Don't compile the gdtoa package's strtoIg.c into libc.I never got around to making use of it.
Cut out the gordian handling of subnormals by bit fiddling, andinstead use the FPU to convert subnormals to normals. (NB: Furthersimplification is possible, such as using the FPU for the rounding
Cut out the gordian handling of subnormals by bit fiddling, andinstead use the FPU to convert subnormals to normals. (NB: Furthersimplification is possible, such as using the FPU for the roundingstep.)This fixes a bug reported by stefanf where long double subnormals inthe Intel 80-bit format would be output with one fewer digit thannecessary when the default precision was used.
Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.The purpose of having a separate file involved an abandoned scheme thatwould have kept contrib/gdtoa out of the include path
Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.The purpose of having a separate file involved an abandoned scheme thatwould have kept contrib/gdtoa out of the include path for the rest of libc.
Updated manh shift constant type to 'ULL' for PPC to fixshift-too-large compile errorreviewed by: das
12