gcc2: Add missing library and header search paths

* For /boot/common[/non-packaged] the standard include paths should be
  develop/headers/ as well instead of include/.
* Build the standard library search paths (the system and common ones)
  into the compiler as well. This makes setting the BELIBRARIES
  environment variable superfluous.
* The obsolete search paths (/boot/common[/non-packaged]/include/ and
  /boot/common/lib/ respectively) are still built in as well. They will
  be removed after a grace period, when all packages have been adjusted
  accordingly.
This commit is contained in:
Ingo Weinhold 2013-04-25 16:36:08 +02:00
parent 278de7bc92
commit 1f1e659bdb
2 changed files with 18 additions and 3 deletions

View File

@ -361,8 +361,12 @@ extern union tree_node *i386_pe_merge_decl_attributes ();
{ \
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },\
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },\
{ "/boot/common/non-packaged/develop/headers", 0, 0, 0 },\
{ "/boot/common/non-packaged/include", 0, 0, 0 },\
/* TODO: To be removed. */\
{ "/boot/common/develop/headers", 0, 0, 0 },\
{ "/boot/common/include", 0, 0, 0 },\
/* TODO: To be removed. */\
{ "/boot/common/develop/headers", 0, 0, 0 },\
{ "/boot/system/develop/headers/os", 0, 0, 1 },\
{ "/boot/system/develop/headers/os/app", 0, 0, 1 },\
@ -440,6 +444,16 @@ extern union tree_node *i386_pe_merge_decl_attributes ();
cause nasty problems if we override it. */
#define LIBRARY_PATH_ENV "BELIBRARIES"
/* With STANDARD_STARTFILE_PREFIX_{1,2} set to "/boot/common/develop/lib/"
and "/boot/system/develop/lib/", MD_STARTFILE_PREFIX adds the last one of the
standard paths. The user specific paths are set via LIBRARY_PATH_ENV. */
#undef MD_STARTFILE_PREFIX
#define MD_STARTFILE_PREFIX "/boot/common/non-packaged/develop/lib/"
/* TODO: To be removed. */
#undef MD_STARTFILE_PREFIX_1
#define MD_STARTFILE_PREFIX_1 "/boot/common/lib/"
/* Haiku doesn't have a separate math library. */
#define MATH_LIBRARY ""

View File

@ -1410,7 +1410,10 @@ static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
#endif
static const char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
#if !defined(__BEOS__) && !defined(__HAIKU__)
#if defined(__HAIKU__)
static const char *standard_startfile_prefix_1 = "/boot/common/develop/lib/";
static const char *standard_startfile_prefix_2 = "/boot/system/develop/lib/";
#else
static const char *standard_startfile_prefix_1 = "/lib/";
static const char *standard_startfile_prefix_2 = "/usr/lib/";
#endif
@ -4943,12 +4946,10 @@ main (argc, argv)
NULL_PTR, 0, 0, NULL_PTR);
}
#if !defined(__BEOS__) && !defined(__HAIKU__)
add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
"BINUTILS", 0, 0, NULL_PTR);
add_prefix (&startfile_prefixes, standard_startfile_prefix_2,
"BINUTILS", 0, 0, NULL_PTR);
#endif
#if 0 /* Can cause surprises, and one can use -B./ instead. */
add_prefix (&startfile_prefixes, "./", NULL_PTR, 0, 1, NULL_PTR);
#endif