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