Incorrect options passed to ld on i386-pc-solaris2 with -mimpure-text

David Daney daney@ibw.com.ni
Sun May 9 20:25:00 GMT 1999


The sparc version of gcc has the -mimpure-text option that causes -z
text not to be passed to ld.  The i386 version does not do this.  This
causes problems when compiling the java 1.2 sources on Solaris 2.7/i386.

The following patch seems to correct the problem (the change was copied
in from the sparc version of the file):

bash-2.02$ gcc -v
Reading specs from
/opt/gnu/lib/gcc-lib/i386-pc-solaris2.7/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

bash-2.02$ cat sol2.h.diff 
*** gcc/config/i386/sol2.h.orig Tue Jul 14 04:38:50 1998
--- gcc/config/i386/sol2.h      Sun May  9 20:59:21 1999
***************
*** 66,72 ****
    "%{h*} %{v:-V} \
     %{b} %{Wl,*:%*} \
     %{static:-dn -Bstatic} \
!    %{shared:-G -dy -z text} \
     %{symbolic:-Bsymbolic -G -dy -z text} \
     %{G:-G} \
     %{YP,*} \
--- 66,72 ----
    "%{h*} %{v:-V} \
     %{b} %{Wl,*:%*} \
     %{static:-dn -Bstatic} \
!    %{shared:-G -dy %{!mimpure-text:-z text}} \
     %{symbolic:-Bsymbolic -G -dy -z text} \
     %{G:-G} \
     %{YP,*} \


-- 
David S. Daney        Managua Nicaragua +505 265-7318
daney@ibw.com.ni


More information about the Gcc-bugs mailing list