Navigation Menu

Skip to content

Commit

Permalink
config: Do not force runpath entries unless necessary
Browse files Browse the repository at this point in the history
Sun patched their GCC3 to force /lib:/usr/lib:/usr/sfw/lib into the runpath, in
that order, such that /usr/sfw libraries did not take precedence over system
libraries, but nevertheless libgcc did not need a specific -R entry to be added
to the command line when building.

This has caused us nothing but trouble when patching it forward, since suddenly
we need our _own_ prefix in thre too, and it must beat /usr/sfw, and because
it's using -R it means that LD_RUN_PATH doesn't function, and because it's
unexpected it causes confusion for 3rd party software.

This change only uses -R to force the runpath in the BSD compat environment, as
GCC upstream does, leaving the sole artifact of Sun's change being the addition
of /lib to the default library search path. (-YP)
  • Loading branch information
richlowe committed Dec 14, 2011
1 parent e8dcc98 commit 43d517e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions gcc/config/i386/sol2-10.h
Expand Up @@ -93,12 +93,12 @@ along with GCC; see the file COPYING3. If not see
%{YP,*} \
%{R*} \
%{compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64 -R /usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64} \
%{!p:%{!pg:-Y P,/usr/ucblib/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64 -R /usr/ucblib/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64}}} \
} \
%{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64} \
%{!p:%{!pg:-Y P,/usr/ucblib/64:/lib/64:/usr/lib/64}}} \
-R /usr/ucblib/64} \
%{!compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64 -R /usr/lib/libp/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64} \
%{!p:%{!pg:-Y P,/lib/64:/usr/lib/64:/usr/sfw/lib/64 -R /lib/64:/usr/lib/64:/usr/sfw/lib/64}}}}"
%{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \
%{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}"

#undef LINK_ARCH64_SPEC
#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
Expand Down
10 changes: 5 additions & 5 deletions gcc/config/sol2.h
Expand Up @@ -123,12 +123,12 @@ along with GCC; see the file COPYING3. If not see
%{YP,*} \
%{R*} \
%{compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib -R /usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib} \
%{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib -R /usr/ucblib:/usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib}}} \
} \
%{!YP,*:%{p|pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib} \
%{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/lib:/usr/lib}}} \
-R /usr/ucblib} \
%{!compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib -R /usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib} \
%{!p:%{!pg:-Y P,/usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib -R /usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib}}}}"
%{!YP,*:%{p|pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib} \
%{!p:%{!pg:-Y P,/usr/ccs/lib:/lib:/usr/lib}}}}"

#undef LINK_ARCH32_SPEC
#define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE
Expand Down
10 changes: 5 additions & 5 deletions gcc/config/sparc/sol2-bi.h
Expand Up @@ -172,12 +172,12 @@
%{YP,*} \
%{R*} \
%{compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64 -R /usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64} \
%{!p:%{!pg:-Y P,/usr/ucblib/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64 -R /usr/ucblib/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64}}} \
} \
%{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64} \
%{!p:%{!pg:-Y P,/usr/ucblib/64:/lib/64:/usr/lib/64}}} \
-R /usr/ucblib/sparcv9} \
%{!compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64 -R /usr/lib/libp/64:/lib/64:/usr/lib/64:/usr/sfw/lib/64} \
%{!p:%{!pg:-Y P,/lib/64:/usr/lib/64:/usr/sfw/lib/64 -R /lib/64:/usr/lib/64:/usr/sfw/lib/64}}}}"
%{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \
%{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}"

#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE

Expand Down

0 comments on commit 43d517e

Please sign in to comment.