| 1 | # Copyright (C) 1991-2026 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 | |
| 18 | ifeq ($(subdir),gnulib) |
| 19 | sysdep_routines = dotmul umul $(divrem) alloca |
| 20 | shared-only-routines += umul $(divrem) |
| 21 | endif # gnulib |
| 22 | |
| 23 | divrem := sdiv udiv rem urem |
| 24 | |
| 25 | # libgcc __divdi3 and __moddi3 uses .udiv and since it is also exported by |
| 26 | # libc.so linker will create PLTs for the symbol. To avoid it we strong alias |
| 27 | # the exported libc one to __wrap_.udiv and use linker option --wrap to make any |
| 28 | # call to .udiv to call the wrapper symbol. |
| 29 | libc.so-gnulib += -Wl,--wrap=.udiv |
| 30 | |
| 31 | ifeq ($(subdir),soft-fp) |
| 32 | sparc32-quad-routines := q_add q_cmp q_cmpe q_div q_dtoq q_feq q_fge \ |
| 33 | q_fgt q_fle q_flt q_fne q_itoq q_mul q_neg q_qtod q_qtoi \ |
| 34 | q_qtos q_qtou q_qtoull q_qtoll q_sqrt q_stoq q_sub q_utoq \ |
| 35 | q_ulltoq q_lltoq q_util |
| 36 | sysdep_routines += $(sparc32-quad-routines) |
| 37 | |
| 38 | endif |