freebsd.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* Base configuration file for all FreeBSD targets.
  2. Copyright (C) 1999-2015 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. GCC is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. /* Common FreeBSD configuration.
  16. All FreeBSD architectures should include this file, which will specify
  17. their commonalities.
  18. Adapted from gcc/config/i386/freebsd-elf.h by
  19. David O'Brien <obrien@FreeBSD.org>.
  20. Further work by David O'Brien <obrien@FreeBSD.org> and
  21. Loren J. Rittle <ljrittle@acm.org>. */
  22. /* In case we need to know. */
  23. #define USING_CONFIG_FREEBSD 1
  24. #undef TARGET_OS_CPP_BUILTINS
  25. #define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS()
  26. #undef CPP_SPEC
  27. #define CPP_SPEC FBSD_CPP_SPEC
  28. #undef STARTFILE_SPEC
  29. #define STARTFILE_SPEC FBSD_STARTFILE_SPEC
  30. #undef ENDFILE_SPEC
  31. #define ENDFILE_SPEC FBSD_ENDFILE_SPEC
  32. #undef LIB_SPEC
  33. #define LIB_SPEC FBSD_LIB_SPEC
  34. #if defined(HAVE_LD_EH_FRAME_HDR)
  35. #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
  36. #endif
  37. #ifdef TARGET_LIBC_PROVIDES_SSP
  38. #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
  39. "|fstack-protector-strong|fstack-protector-explicit" \
  40. ":-lssp_nonshared}"
  41. #endif
  42. #undef TARGET_LIBC_HAS_FUNCTION
  43. #define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
  44. /* Use --as-needed -lgcc_s for eh support. */
  45. #ifdef HAVE_LD_AS_NEEDED
  46. #define USE_LD_AS_NEEDED 1
  47. #endif
  48. /************************[ Target stuff ]***********************************/
  49. /* All FreeBSD Architectures support the ELF object file format. */
  50. #undef OBJECT_FORMAT_ELF
  51. #define OBJECT_FORMAT_ELF
  52. /* Don't assume anything about the header files. */
  53. #undef NO_IMPLICIT_EXTERN_C
  54. #define NO_IMPLICIT_EXTERN_C 1
  55. /* Follow FreeBSD's standard headers (<sys/_types.h> etc...). */
  56. #undef WCHAR_TYPE
  57. #define WCHAR_TYPE "int"
  58. #undef WINT_TYPE
  59. #define WINT_TYPE "int"
  60. #define MATH_LIBRARY_PROFILE "m_p"
  61. /* Code generation parameters. */
  62. /* Use periods rather than dollar signs in special g++ assembler names.
  63. This ensures the configuration knows our system correctly so we can link
  64. with libraries compiled with the native cc. */
  65. #undef NO_DOLLAR_IN_LABEL
  66. /* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW.
  67. This enables the test coverage code to use file locking when exiting a
  68. program, which avoids race conditions if the program has forked. */
  69. #define TARGET_POSIX_IO