linux.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Definitions of target support for Altera Nios II systems
  2. running GNU/Linux with ELF format.
  3. Copyright (C) 2012-2015 Free Software Foundation, Inc.
  4. Contributed by Mentor Graphics, Inc.
  5. This file is part of GCC.
  6. GCC is free software; you can redistribute it and/or modify it
  7. under the terms of the GNU General Public License as published
  8. by the Free Software Foundation; either version 3, or (at your
  9. option) any later version.
  10. GCC is distributed in the hope that it will be useful, but WITHOUT
  11. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  12. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  13. License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with GCC; see the file COPYING3. If not see
  16. <http://www.gnu.org/licenses/>. */
  17. #define TARGET_OS_CPP_BUILTINS() \
  18. do \
  19. { \
  20. GNU_USER_TARGET_OS_CPP_BUILTINS(); \
  21. } \
  22. while (0)
  23. #undef CPP_SPEC
  24. #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
  25. #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
  26. #undef LINK_SPEC
  27. #define LINK_SPEC LINK_SPEC_ENDIAN \
  28. "%{shared:-shared} \
  29. %{!shared: \
  30. %{!static: \
  31. %{rdynamic:-export-dynamic} \
  32. -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
  33. %{static:-static}}"
  34. /* This toolchain implements the ABI for Linux Systems documented in the
  35. Nios II Processor Reference Handbook. */
  36. #define TARGET_LINUX_ABI 1