diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-11-19 21:17:58 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-11-19 21:17:58 +0300 |
commit | 4a481463a3d221d3c3b8d7d7aaa886fbe54e85de (patch) | |
tree | fca8637de644e39437a5d11abf031d32a26ec3f7 | |
parent | e771d1bd9b01f4b910a18c537624658ab91bdef9 (diff) | |
download | gcc-9-4a481463a3d221d3c3b8d7d7aaa886fbe54e85de.tar.gz |
Drop /lib from default library path
-rw-r--r-- | debian/patches/illumos-spec.diff | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/patches/illumos-spec.diff b/debian/patches/illumos-spec.diff index 3efd50f..fea5f99 100644 --- a/debian/patches/illumos-spec.diff +++ b/debian/patches/illumos-spec.diff @@ -40,3 +40,26 @@ Index: gcc-9.git/src/gcc/config/sol2.h #undef LINK_ARCH64_SPEC #ifndef USE_GLD +Index: gcc-9.git/src/gcc/gcc.c +=================================================================== +--- gcc-9.git.orig/src/gcc/gcc.c ++++ gcc-9.git/src/gcc/gcc.c +@@ -1559,7 +1559,17 @@ static const char *gcc_libexec_prefix; + /* Default prefixes to attach to command names. */ + + #ifndef STANDARD_STARTFILE_PREFIX_1 +-#define STANDARD_STARTFILE_PREFIX_1 "/lib/" ++/* This is a radical hack. In Debian (and Dyson) we should have all development libraries ++ under /usr/lib. But in Dyson there is at least libc.so under /lib. It is in there ++ specially for the sunld, which does not understand the GNU ld's linker script ++ found under disguise libc.so under /usr/lib. That linker script automatically ++ add other libraries as needed, like libsocket, libiconv, libssp, etc. ++ Unfortunately, if /lib goes first, the linker will find normal libc.so under /lib ++ and will miss the libraries we need on Dyson. This is not the case when ++ we use already built and installed gcc, but happens when buildting the gcc ++ package, namely with stage1 compiler xgcc. ++*/ ++#define STANDARD_STARTFILE_PREFIX_1 "" + #endif + #ifndef STANDARD_STARTFILE_PREFIX_2 + #define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" |