Index: faq.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/faq.html,v retrieving revision 1.163 diff -c -3 -p -r1.163 faq.html *** faq.html 2001/06/16 11:03:00 1.163 --- faq.html 2001/07/01 14:01:11 *************** compiler and available in /usr/local/bin *** 261,301 **** to be the older gcc2 compiler and also available in /usr/local/bin.
The easiest way to do this is to configure the new GCC with ! --prefix=/usr/local/gcc ! and the older gcc2 with --prefix=/usr/local/gcc2. Build and install both ! compilers. Then make a symlink from /usr/local/bin/gcc to ! /usr/local/gcc/bin/gcc and from /usr/local/bin/gcc2 to /usr/local/gcc2/bin/gcc. Create similar links for the "g++", "c++" and "g77" compiler drivers.
An alternative to using symlinks is to configure with a ! --program-transform-name option. This option specifies a sed command to process installed program names with. Using it you can, for instance, have all the new GCC programs installed as "new-gcc" and the like. You ! will still have to specify different --prefix options for new GCC and old GCC, because it is only the executable program names that are transformed. The difference is that you (as administrator) do not have to set up symlinks, but must specify additional directories in your (as ! a user) PATH. A complication with --program-transform-name is that the sed command invariably contains characters significant to the shell, and these have to be escaped correctly, also it is not possible to use "^" or "$" in the command. Here is the option to prefix "new-" to the ! new GCC installed programs ! "--program-transform-name='s,\\\\(.*\\\\),new-\\\\1,'". With the above ! --prefix option, that will install the new GCC programs into ! /usr/local/gcc/bin with names prefixed by "new-". You can use ! --program-transform-name if you have multiple versions of GCC, and wish to be sure about which version you are invoking.
!If you use --prefix, GCC may have difficulty locating a GNU assembler or linker on your system, GCC can not find GNU as/GNU ld explains how to deal with this.
!Another option that may be easier is to use the --program-prefix= or
! --program-suffix= options to configure. So if you're installing GCC
2.95.2 and don't want to disturb the current version of GCC in
! /usr/local/bin/, you could do 'configure --program-suffix=-2.95.2
!
The easiest way to do this is to configure the new GCC with
! --prefix=/usr/local/gcc
! and the older gcc2 with --prefix=/usr/local/gcc2
. Build and install both
! compilers. Then make a symlink from /usr/local/bin/gcc
to
! /usr/local/gcc/bin/gcc
and from /usr/local/bin/gcc2
to /usr/local/gcc2/bin/gcc
.
Create similar links for the "g++", "c++" and "g77" compiler drivers.
An alternative to using symlinks is to configure with a
! --program-transform-name
option. This option specifies a sed command to
process installed program names with. Using it you can, for instance,
have all the new GCC programs installed as "new-gcc" and the like. You
! will still have to specify different --prefix
options for new GCC and
old GCC, because it is only the executable program names that are
transformed. The difference is that you (as administrator) do not have
to set up symlinks, but must specify additional directories in your (as
! a user) PATH. A complication with --program-transform-name
is that the
sed command invariably contains characters significant to the shell,
and these have to be escaped correctly, also it is not possible to use
"^" or "$" in the command. Here is the option to prefix "new-" to the
! new GCC installed programs:
!
--program-transform-name='s,\\\\(.*\\\\),new-\\\\1,'
! With the above
! --prefix
option, that will install the new GCC programs into
! /usr/local/gcc/bin
with names prefixed by "new-". You can use
! --program-transform-name
if you have multiple versions of GCC, and
wish to be sure about which version you are invoking.
! If you use --prefix
, GCC may have difficulty locating a GNU
assembler or linker on your system, GCC can not find GNU
as/GNU ld explains how to deal with this.
Another option that may be easier is to use the --program-prefix=
or
! --program-suffix=
options to configure. So if you're installing GCC
2.95.2 and don't want to disturb the current version of GCC in
! /usr/local/bin/
, you could do
!
configure --program-suffix=-2.95.2 <other cofigure options>
! This should result in GCC being installed
! as /usr/local/bin/gcc-2.95.2
instead of /usr/local/bin/gcc
.
This problem manifests itself by programs not finding shared libraries they depend on when the programs are started. Note this problem often manifests itself with failures in the libio/libstdc++ ! tests after configuring with --enable-shared and building GCC.
GCC does not specify a runpath so that the dynamic linker can find dynamic libraries at runtime.
--- 305,311 ----This problem manifests itself by programs not finding shared
libraries they depend on when the programs are started. Note this
problem often manifests itself with failures in the libio/libstdc++
! tests after configuring with --enable-shared
and building GCC.
GCC does not specify a runpath so that the dynamic linker can find dynamic libraries at runtime.
*************** NFS server goes down. *** 317,323 **** programs are going to hang no matter what you do. The problem is programs that do not require the directories. !SunOS effectively always passed a -R option for every -L option; this was a bad idea, and so it was removed for Solaris. We should not recreate it.
--- 319,325 ---- programs are going to hang no matter what you do. The problem is programs that do not require the directories. !SunOS effectively always passed a -R
option for every -L
option;
this was a bad idea, and so it was removed for Solaris. We should
not recreate it.