This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #22127] get(av|cv|hv|sv) added to Devel::PPPort
[perl5.git] / README.solaris
index 0243f85..69d0505 100644 (file)
@@ -132,15 +132,18 @@ If you use Sun's C compiler, make sure the correct directory
 
 =head3 GCC
 
-If you use gcc, make sure your installation is recent and
-complete.  As a point of reference, perl-5.6.0 built fine with
-gcc-2.8.1 on both Solaris 2.6 and Solaris 8.  You'll be able to
-Configure perl with
+If you use gcc, make sure your installation is recent and complete.
+Perl versions since 5.6.0 build fine with gcc > 2.8.1 on Solaris >=
+2.6.
+
+You must Configure perl with
 
        sh Configure -Dcc=gcc
 
+If you don't, you may experience strange build errors.
+
 If you have updated your Solaris version, you may also have to update
-your GCC.  For example, if you are running Solaris 2.6 and your gcc is
+your gcc.  For example, if you are running Solaris 2.6 and your gcc is
 installed under /usr/local, check in /usr/local/lib/gcc-lib and make
 sure you have the appropriate directory, sparc-sun-solaris2.6/ or
 i386-pc-solaris2.6/.  If gcc's directory is for a different version of
@@ -153,14 +156,31 @@ your Solaris release.
 
 =head3 GNU as and GNU ld
 
+The following information applies to gcc version 2.  Volunteers to
+update it as appropropriate for gcc version 3 would be appreciated.
+
 The versions of as and ld supplied with Solaris work fine for building
-perl.  There is normally no need to install the GNU versions.
+perl.  There is normally no need to install the GNU versions to
+compile perl.
 
 If you decide to ignore this advice and use the GNU versions anyway,
 then be sure that they are relatively recent.  Versions newer than 2.7
 are apparently new enough.  Older versions may have trouble with
 dynamic loading.
 
+If you wish to use GNU ld, then you need to pass it the -Wl,-E flag.
+The hints/solaris_2.sh file tries to do this automatically by executing
+the following commands:
+
+       ccdlflags="$ccdlflags -Wl,-E"
+       lddlflags="$lddlflags -Wl,-E -G"
+
+However, over the years, changes in gcc, GNU ld, and Solaris ld have made
+it difficult to automatically detect which ld ultimately gets called.
+You may have to manually edit config.sh and add the -Wl,-E flags
+yourself, or else run Configure interactively and add the flags at the
+appropriate prompts.
+
 If your gcc is configured to use GNU as and ld but you want to use the
 Solaris ones instead to build perl, then you'll need to add
 -B/usr/ccs/bin/ to the gcc command line.  One convenient way to do