Skip to content

Gcc System Paths Patch

Peter Saunderson edited this page Jul 26, 2016 · 2 revisions

Home / parallella-yoctobuild / meta-exotic / Design Guide / Introduction / Interesting defaults / Gcc System Paths Patch

gcc-4.8

The location of the libraries path (seen in the output of gcc --print-search-dirs) is modified with patch target-gcc-includedir.patch and a patch in gcc-configure-common.inc to move the following to gcc/defaults.h

#define NATIVE_SYSTEM_HEADER_DIR "${SYSTEMHEADERS}"
#define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
#define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
#endif /* ! GCC_DEFAULTS_H */

Note: for epiphany-elf cross compile build setting SYSTEMHEADERS ensures that epiphany-elf-gcc picks up the correct header files from:

  • SYSTEMHEADERS="/usr/epiphany-elf/include"

Unfortunately setting SYSTEMLIBS1 up to the correct default moves the library files to the wrong directory:

  • The following does not work: SYSTEMLIBS1 = "${target_libdir}" = "/usr/lib/epiphany-elf/"
  • results in library search paths /usr/lib/epiphany-elf/epiphany-elf/4.8.2 and /usr/lib/epiphany-elf
  • The following does not work: SYSTEMLIBS1 = "${target_libdir}" = "/usr/lib/"
  • results in library search path /usr/lib/epiphany-elf/4.8.2 and /usr/lib/
Clone this wiki locally