needed-list & libstdc++/stdlist problem
Casper Dik
casper@holland.sun.com
Sat Jul 31 23:33:00 GMT 1999
>On Jul 15, 1999, Casper Dik <casper@holland.sun.com> wrote:
>
>> Ah, ok; I just downloaded the 07-12 snapshot yesterday and didnt' expect
>> a new one to be present.
>
>We're in release mode :-) Yet another snapshot should be available in
>the next few hours, and it will hopefully be the last one before the
>release. You'll probably be better off checking out current CVS -r
>gcc-2_95-branch, if you have CVS access.
Right. I would like to smuggle in a patch that enables bi-arch
for Solaris 7+ by default, even though I know that the
SPARCv9 code generator/runtime support isn't finished yet. It works
for a lot of code, though (most notably missing is quad fp support)
(patch was posted to egcs-patches before; the thing most up for discussion
is defaulting to bi-arch mode for SPARC for anything over 2.0-2.6)
A sticky problem is teh assmebler; the S8 and patched S& assembler
require %g[23] registers to be declared w/ the .register pseudo op;
the S7 FCS assembler doesn't know that option.
If gcc is configured on a system with that patch, it will fail on
one installed without and vice versa.
Workaround is using -fno-app-regs; in principle, all GNU libraries
should be compiled w/ -fno-app-regs as well (as libraries are
not allowed to use the %g2 and %g3 registers for their own
purposes, not even as scratch.
*** ./gcc/config/sparc/sol2-sld-64.h.orig Wed Jul 14 15:47:22 1999
--- ./gcc/config/sparc/sol2-sld-64.h Wed Jul 14 15:53:11 1999
***************
*** 361,363 ****
--- 361,387 ----
fprintf (FILE, "\n"); \
} while (0)
+ /* This is necessary if the assembler supports .register, but doesn't work
+ otherwise. */
+
+ #ifdef HAVE_AS_REGISTER_PSEUDO_OP
+
+ /* This is how to begin an assembly language file, from svr4.h.
+
+ The registers g2-g3, g6-g7 need to be declared as scratch or temporary
+ in v9 code with the .register pseudo-op, starting with the Solaris 7
+ assembler patch 107058-01. This is explained in Sun WorkShop 5.0's
+ /opt/SUNWspro/READMEs/64bit_Compilers (SPARC ASSEMBLER).
+
+ gcc on v9 uses g2-g3 only, see sparc.h (FIXED_REGISTERS). */
+ #undef ASM_FILE_START
+ #define ASM_FILE_START(FILE) \
+ do { \
+ output_file_directive ((FILE), main_input_filename); \
+ if (TARGET_ARCH64 && TARGET_APP_REGS) \
+ { \
+ fputs ("\t.register %g2, #scratch\n", FILE); \
+ fputs ("\t.register %g3, #scratch\n", FILE); \
+ } \
+ } while (0)
+ #endif /* HAVE_AS_REGISTER_PSEUDO_OP */
*** ./gcc/configure.in.orig Thu Jun 24 23:45:45 1999
--- ./gcc/configure.in Wed Jul 14 15:51:22 1999
***************
*** 3120,3125 ****
--- 3120,3134 ----
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
case $machine in
changequote(,)dnl
+ *-*-solaris2.[0-6]*) ;;
+ changequote([,])dnl
+ *-*-solaris2*)
+ tm_file=sparc/sol2-sld-64.h
+ tmake_file="$tmake_file sparc/t-sol2-64"
+ ;;
+ esac
+ case $machine in
+ changequote(,)dnl
*-*-solaris2.[0-4])
changequote([,])dnl
float_format=i128
***************
*** 4039,4044 ****
--- 4048,4066 ----
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
AC_MSG_RESULT($gcc_cv_as_subsections)
+
+ AC_MSG_CHECKING(assembler .register pseudo-op support)
+ gcc_cv_as_register_pseudo_op=
+ if test x$gcc_cv_as != x; then
+ # Check if we have .register
+ echo ".register %g2, #scratch" > conftest.s
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+ gcc_cv_as_register_pseudo_op=yes
+ AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP)
+ fi
+ rm -f conftest.s conftest.o
+ fi
+ AC_MSG_RESULT($gcc_cv_as_register_pseudo_op)
AC_MSG_CHECKING(assembler instructions)
gcc_cv_as_instructions=
*** ./gcc/acconfig.h.orig Wed Jul 14 15:47:22 1999
--- ./gcc/acconfig.h Wed Jul 14 15:47:37 1999
***************
*** 29,34 ****
--- 29,37 ----
/* Define if your assembler supports .balign and .p2align. */
#undef HAVE_GAS_BALIGN_AND_P2ALIGN
+ /* Define if your assembler supports .register. */
+ #undef HAVE_AS_REGISTER_PSEUDO_OP
+
/* Define if your assembler supports .subsection and .subsection -1 starts
emitting at the beginning of your section */
#undef HAVE_GAS_SUBSECTION_ORDERING
*** ./config-ml.in.orig Wed Jul 14 15:47:22 1999
--- ./config-ml.in Wed Jul 14 16:39:14 1999
***************
*** 401,406 ****
--- 401,430 ----
done
fi
;;
+ sparc*-*-*)
+ case " $multidirs " in
+ *" m64 "*)
+ # We will not be able to create libraries with -m64 if
+ # we cannot even link a trivial program. It usually
+ # indicates the 64bit libraries are missing.
+ if echo 'main() {}' > conftest.c &&
+ ${CC-gcc} -m64 conftest.c -o conftest; then
+ :
+ else
+ echo Could not link program with -m64, disabling it.
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *m64* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ rm -f conftest.c conftest
+ ;;
+ esac
+ ;;
esac
# Remove extraneous blanks from multidirs.
More information about the Gcc-bugs
mailing list