Commit graph

47 commits

Author SHA1 Message Date
Brooks Davis f0bd655a61 libc/quad: further narrow list of i386 symbols
It's unclear to me why lld didn't complain about these are they aren't
present and haven't been.  Instead ld.bfd complained.

Reviewed by:	dim
Fixes:		6e6cd03c91 libc/quad: narrow list of symbols exposed on i386
Differential Revision:	https://reviews.freebsd.org/D44879
2024-04-19 22:56:13 +01:00
Brooks Davis 6e6cd03c91 libc/quad: narrow list of symbols exposed on i386
These symbols aren't present on i386 so don't try to expose them.

Given the structure of quad/Makefile.inc, it might make more sense to
have per-arch symbol maps here, but this is sufficent to build with
WITHOUT_UNDEFINED_VERSION on i386.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44243
2024-03-07 20:12:22 +00:00
Warner Losh 0b8224d1cc Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by:		Netflix
2023-11-26 22:23:58 -07:00
Warner Losh dc36d6f9bb lib: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:28 -07:00
Brooks Davis 1ca63a8219 libc: Remove empty comments in Symbol.map
These were left over from $FreeBSD$ removal.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D42612
2023-11-15 17:51:03 +00:00
Warner Losh 559a218c9b libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42385
2023-11-01 16:44:30 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh 42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -06:00
Hans Petter Selasky 1024bb2633 qdivrem: Predict division by zero as false.
Division by zero triggers an arithmetic exception and should not be very
common. Predict this.

No functional change intended.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-10-04 13:51:06 +02:00
Dimitry Andric feb1d5507e Add casts and L suffixes to libc quad support, to work around various
-Werror warnings from clang 10.0.0, such as:

lib/libc/quad/fixdfdi.c:57:12: error: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
                if (x >= QUAD_MAX)
                      ~~ ^~~~~~~~
/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/limits.h:89:19: note: expanded from macro 'QUAD_MAX'
#define QUAD_MAX        (__QUAD_MAX)    /* max value for a quad_t */
                         ^~~~~~~~~~
/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:91:20: note: expanded from macro '__QUAD_MAX'
#define __QUAD_MAX      __LLONG_MAX     /* max value for a quad_t */
                        ^~~~~~~~~~~
/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:75:21: note: expanded from macro '__LLONG_MAX'
#define __LLONG_MAX     0x7fffffffffffffffLL    /* max value for a long long */
                        ^~~~~~~~~~~~~~~~~~~~

and many instances of:

lib/libc/quad/fixunsdfdi.c:73:17: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
        toppart = (x - ONE_HALF) / ONE;
                       ^~~~~~~~
lib/libc/quad/fixunsdfdi.c:45:19: note: expanded from macro 'ONE_HALF'
#define ONE_HALF        (ONE_FOURTH * 2.0)
                         ^~~~~~~~~~
lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH'
#define ONE_FOURTH      (1 << (LONG_BITS - 2))
                           ^  ~~~~~~~~~~~~~~~
lib/libc/quad/fixunsdfdi.c:73:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
        toppart = (x - ONE_HALF) / ONE;
                                   ^~~
lib/libc/quad/fixunsdfdi.c:46:15: note: expanded from macro 'ONE'
#define ONE             (ONE_FOURTH * 4.0)
                         ^~~~~~~~~~
lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH'
#define ONE_FOURTH      (1 << (LONG_BITS - 2))
                           ^  ~~~~~~~~~~~~~~~
2020-02-17 20:14:59 +00:00
Kyle Evans a78c1027d7 Revert r351078, r351085: stand/quad.h eviction
It did not go well; further examination is required...
2019-08-15 17:15:32 +00:00
Kyle Evans 14a286867e libc quad.h: one last _STANDALONE correction 2019-08-15 16:28:05 +00:00
Kyle Evans 7ddaee2559 stand: kick out quad.h
Use quad.h from libc instead for the time being. This reduces the number of
nearly-identical-quad.h we have in tree to two with only minor changes.

Prototypes for some *sh*di3 have been added to match the copy in libkern.
The differences between the two are likely few enough that they can perhaps
be merged with little additional effort to bring us down to 1.

MFC after:	3 days
2019-08-15 15:47:48 +00:00
Ed Maste 6492be46b8 ANSIfy libc/quad
Some of these routines exist in both lib/libc/quad/ and sys/libkern/.
r325988 ANSIfied sys/libkern.  Update libc/quad to match.

PR:		223641
Reported by:	bde
Sponsored by:	The FreeBSD Foundation
2018-10-21 00:20:40 +00:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Warner Losh fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Andrew Turner 6d4766c1b8 Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support
the oabi is still in the tree, but it is expected this will be removed
as developers work on surrounding code.

With this commit the ARM EABI is the only supported supported ABI by
FreeBSD on ARMa 32-bit processors.

X-MFC after:	never
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D876
2014-10-01 08:26:51 +00:00
Marcel Moolenaar 8876613dc5 Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}
if not already defined. This allows building libc from outside of
lib/libc using a reach-over makefile.

A typical use-case is to build a standard ILP32 version and a COMPAT32
version in a single iteration by building the COMPAT32 version using a
reach-over makefile.

Obtained from:	Juniper Networks, Inc.
2014-03-04 02:19:39 +00:00
Andrew Turner 850e744187 For ARM EABI we only need a subset of the quad functions, the rest are
provided by libgcc.
2013-01-19 02:33:57 +00:00
Warner Losh 2c0959ae6b Powerpc is special here. powerpc and powerpc64 use different ABIs, so
their implementations aren't in the same files.  Introduce LIBC_ARCH
and use that in preference to MACHINE_CPUARCH.  Tested by amd64 and
powerpc64 builds (thanks nathanw@)
2010-08-24 20:54:43 +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
Daniel Eischen 76390742ee Fix a typo that prevented the quad symbols from being exported
(s/SYM_MAP/SYM_MAPS/).

Reported by:	kan
Approved by:	re@ (Ken Smith)
2007-07-06 13:42:24 +00:00
Daniel Eischen 2a43680e9f Export quad symbols. They were previously commented out. These symbols
really shouldn't be exported since they should be pulled from libgcc, but
the build of some applications is broken and they expect to see them in
libc.  glibc exports these symbols, although Solaris doesn't appear to,
so export them for compatibility's sake.

After discussion with:	kan
2007-05-31 13:07:37 +00:00
Daniel Eischen 5f864214bb Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
Warner Losh c879ae3536 Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
Daniel Eischen 6fad3aaf15 Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
Daniel Eischen cce72e8860 Add symbol maps and initial symbol version definitions to libc.
Reviewed by:	davidxu
2006-03-13 00:53:21 +00:00
Stefan Farfeleder a3b5200e71 - Add prototypes for __cmpdi2() and __ucmpdi2().
- Remove GCC 1 stuff.
2005-09-12 16:16:12 +00:00
Ruslan Ermilov c51d717f0c libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
David E. O'Brien 333fc21e3c Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
2002-03-22 21:53:29 +00:00
David E. O'Brien c05ac53b8b Remove __P() usage. 2002-03-21 22:49:10 +00:00
David E. O'Brien 8fb3f3f682 Remove 'register' keyword. 2002-03-21 18:49:23 +00:00
Peter Wemm 7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Nate Williams 738006fa2c - Fix modulo bug that was masked by the correct code in libgcc.a which is
used in almost all programs unless a shared library specifically
  ignores libgcc.a.
1998-11-30 20:25:37 +00:00
Warner Losh aa1b326112 $@ -> ${.TARGET} 1998-09-11 05:34:37 +00:00
John Birrell 0107877e04 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:23:55 +00:00
Bruce Evans b86be9d1f7 Put the .PATH statement first as in all other libc Makefile.inc's. 1997-12-19 21:56:38 +00:00
John Birrell 870039320f Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
1997-05-03 03:50:06 +00:00
Peter Wemm 7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans 432889653c Added prototypes. 1995-12-26 13:25:13 +00:00
Bruce Evans 1d064c3b2d Restored [u]cmpdi2.c which are needed for switching on [unsigned] long
long values.
1995-12-01 09:38:35 +00:00
Bruce Evans dce5165a30 Removed cmpdi2.c from ${SRCS}. I think it is no more needed than ucmpdi2.
Restored order in ${SRCS}.
1995-11-29 15:11:43 +00:00
Poul-Henning Kamp e2a4bdf63c limit the number of functions we pull in for 'i386'.
I still belive this stuff should go back into gcc.
1995-10-22 14:40:17 +00:00
Rodney W. Grimes 6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Rodney W. Grimes 58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00