Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright (C) 1993-2026 Free Software Foundation, Inc.
  2. # This file is part of the GNU C Library.
  3. # The GNU C Library is free software; you can redistribute it and/or
  4. # modify it under the terms of the GNU Lesser General Public
  5. # License as published by the Free Software Foundation; either
  6. # version 2.1 of the License, or (at your option) any later version.
  7. # The GNU C Library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. # Lesser General Public License for more details.
  11. # You should have received a copy of the GNU Lesser General Public
  12. # License along with the GNU C Library. If not, see
  13. # <https://www.gnu.org/licenses/>.
  14. ifeq ($(subdir),debug)
  15. # Consider making this GCC's default...
  16. CFLAGS-backtrace.c = -fasynchronous-unwind-tables
  17. endif
  18. ifeq ($(subdir),gmon)
  19. sysdep_routines += _mcount
  20. endif
  21. ifeq ($(subdir),gnulib)
  22. sysdep_routines += divl divlu divq divqu reml remlu remq remqu
  23. endif
  24. ifeq ($(subdir),string)
  25. sysdep_routines += stxcpy stxncpy
  26. endif
  27. ifeq ($(subdir),stdlib)
  28. sysdep_routines += udiv_qrnnd
  29. endif
  30. ifeq ($(subdir),elf)
  31. # The ld.so startup code cannot use literals until it self-relocates.
  32. CFLAGS-rtld.c = -mbuild-constants
  33. endif
  34. ifeq ($(subdir),math)
  35. # The following routines rely on inexact being raised for correct results.
  36. CFLAGS-s_fma.c = -mieee-with-inexact
  37. CFLAGS-s_fmaf.c = -mieee-with-inexact
  38. CFLAGS-s_llrintf.c += -mieee-with-inexact
  39. CFLAGS-s_llrint.c += -mieee-with-inexact
  40. CFLAGS-s_lrintf.c += -mieee-with-inexact
  41. CFLAGS-s_lrint.c += -mieee-with-inexact
  42. # This test tries to check for inexact being raised by arithmetic.
  43. CFLAGS-test-misc.c += -mieee-with-inexact
  44. # Avoid "conflicting types for built-in function" warnings
  45. CFLAGS-s_isnan.c += -fno-builtin-isnanf
  46. endif
  47. # Build everything with full IEEE math support, and with dynamic rounding;
  48. # there are a number of math routines that are defined to work with the
  49. # "current" rounding mode, and it's easiest to set this with all of them.
  50. sysdep-CFLAGS += -mieee -mfp-rounding-mode=d
  51. # Software floating-point emulation.
  52. ifeq ($(subdir),soft-fp)
  53. sysdep_routines += ots_add ots_sub ots_mul ots_div ots_cmp ots_cmpe \
  54. ots_cvtxq ots_cvtqx ots_cvtqux ots_cvttx ots_cvtxt ots_nintxq \
  55. fraiseexcpt
  56. endif
  57. ifeq ($(subdir),math)
  58. CPPFLAGS += -I../soft-fp
  59. endif