support_paths.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Various paths that might be needed.
  2. Copyright (C) 2018-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  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. The GNU C Library 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 GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #include <support/support.h>
  16. #include <support/check.h>
  17. /* The idea here is to make various makefile-level paths available to
  18. support programs, as canonicalized absolute paths. */
  19. /* These point to the TOP of the source/build tree, not your (or
  20. support's) subdirectory. */
  21. #ifdef SRCDIR_PATH
  22. const char support_srcdir_root[] = SRCDIR_PATH;
  23. #else
  24. # error please -DSRCDIR_PATH=something in the Makefile
  25. #endif
  26. #ifdef OBJDIR_PATH
  27. const char support_objdir_root[] = OBJDIR_PATH;
  28. #else
  29. # error please -DOBJDIR_PATH=something in the Makefile
  30. #endif
  31. #ifdef OBJDIR_ELF_LDSO_PATH
  32. /* Corresponds to the path to the runtime linker used by the testsuite,
  33. e.g. OBJDIR_PATH/elf/ld-linux-x86-64.so.2 */
  34. const char support_objdir_elf_ldso[] = OBJDIR_ELF_LDSO_PATH;
  35. #else
  36. # error please -DOBJDIR_ELF_LDSO_PATH=something in the Makefile
  37. #endif
  38. #ifdef INSTDIR_PATH
  39. /* Corresponds to the --prefix= passed to configure. */
  40. const char support_install_prefix[] = INSTDIR_PATH;
  41. #else
  42. # error please -DINSTDIR_PATH=something in the Makefile
  43. #endif
  44. #ifdef LIBDIR_PATH
  45. /* Corresponds to the install's lib/ or lib64/ directory. */
  46. const char support_libdir_prefix[] = LIBDIR_PATH;
  47. #else
  48. # error please -DLIBDIR_PATH=something in the Makefile
  49. #endif