Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Copyright (C) 1991-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. #
  15. # Sub-makefile for socket portion of the library.
  16. #
  17. subdir := socket
  18. include ../Makeconfig
  19. headers := \
  20. bits/sockaddr.h \
  21. bits/socket.h \
  22. bits/socket2.h \
  23. bits/types/struct_osockaddr.h \
  24. net/if.h \
  25. sys/socket.h \
  26. sys/socketvar.h \
  27. sys/un.h \
  28. # headers
  29. routines := \
  30. accept \
  31. accept4 \
  32. bind \
  33. connect \
  34. getpeername \
  35. getsockname \
  36. getsockopt \
  37. isfdtype \
  38. listen \
  39. opensock \
  40. recv \
  41. recvfrom \
  42. recvmmsg \
  43. recvmsg \
  44. send \
  45. sendmmsg \
  46. sendmsg \
  47. sendto \
  48. setsockopt \
  49. shutdown \
  50. sockaddr_un_set \
  51. sockatmark \
  52. socket \
  53. socketpair \
  54. # routines
  55. # Exclude fortified routines from being built with _FORTIFY_SOURCE
  56. routines_no_fortify += \
  57. recv \
  58. recvfrom \
  59. # routines_no_fortify
  60. tests := \
  61. tst-accept4 \
  62. tst-cmsg_cloexec \
  63. tst-cmsghdr \
  64. tst-connect \
  65. tst-shutdown \
  66. tst-sockopt \
  67. # tests
  68. tests-internal := \
  69. tst-sockaddr_un_set \
  70. # tests-internal
  71. tests-time64 := \
  72. tst-sockopt-time64 \
  73. # tests
  74. aux := sa_len
  75. include ../Rules
  76. CFLAGS-recv.c += -fexceptions -fasynchronous-unwind-tables
  77. CFLAGS-recvfrom.c += -fexceptions -fasynchronous-unwind-tables
  78. CFLAGS-sendto.c += -fexceptions -fasynchronous-unwind-tables
  79. CFLAGS-recvmsg.c += -fexceptions -fasynchronous-unwind-tables
  80. CFLAGS-sendmsg.c += -fexceptions -fasynchronous-unwind-tables
  81. CFLAGS-send.c += -fexceptions -fasynchronous-unwind-tables
  82. CFLAGS-connect.c += -fexceptions -fasynchronous-unwind-tables
  83. CFLAGS-accept.c += -fexceptions -fasynchronous-unwind-tables