On Tue, Aug 07, 2007 at 06:41:33PM -0400, Daniel Jacobowitz wrote:
> On Tue, Aug 07, 2007 at 03:34:56PM -0700, H.J. Lu wrote:
> > > - tmake_file="$tmake_file i386/t-crtstuff i386/t-sol2-10"
> > > + tmake_file="$tmake_file i386/t-sol2-10"
>
> > CRTSTUFF_T_CFLAGS in config/i386/t-sol2 should override the one
> > in i386/t-crtstuff anyway. Why didn't it happen? If it does
> > override the correct CRTSTUFF_T_CFLAGS, we need this patch. Othewise,
> > we need something different.
>
> i386/t-sol2-10 != i386/t-sol2; t-sol2 came first. Looks like you need
> to move t-crtstuff up before the Solaris 10 check, maybe?
>
That is what I missed. Thanks.
This patch should work.
H.J.
----
2007-08-07 H.J. Lu <[EMAIL PROTECTED]>
* config/i386/t-sol2-10 (CRTSTUFF_T_CFLAGS): Add -fPIC -O2.
--- gcc/config/i386/t-sol2-10.sol2 2006-11-18 06:26:01.000000000 -0800
+++ gcc/config/i386/t-sol2-10 2007-08-07 15:47:28.000000000 -0700
@@ -5,6 +5,11 @@ MULTILIB_OSDIRNAMES = . amd64
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
+# We must also enable optimization to avoid having any code appear
+# after the call & alignment statement, but before we switch back
+# to the .text section.
+CRTSTUFF_T_CFLAGS += -fPIC -O2
+
# GCC contains i386 assembler sources for some of the startfiles
# which aren't appropriate for amd64. Just use the installed
# versions of: crt1.o crti.o crtn.o gcrt1.o