This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Solaris 8/SPARC V9]

I've just tried to bootstrap a bi-arch sparcv9-sun-solaris2.8 compiler from
current CVS branch sources.  The bootstrap failed when configuring in

Adding multilib support to Makefile in /vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3
running mkc++config
running mknumeric_limits
/vol/gcc/obj/gcc-3.0-20010523/8-sparcv9-cc/gcc/xgcc -B/vol/gcc/obj/gcc-3.0-20010523/8-sparcv9-cc/gcc/ -B/vol/gcc/sparcv9-sun-solaris2.8/bin/ -B/vol/gcc/sparcv9-sun-solaris2.8/lib/ -isystem /vol/gcc/sparcv9-sun-solaris2.8/include  -m32 -I.  -I/vol/gcc/obj/gcc-3.0-20010523/8-sparcv9-cc/sparcv9-sun-solaris2.8/sparcv7/libstdc++-v3/include -DHAVE_CONFIG_H -fno-exceptions     -o /vol/gcc/obj/gcc-3.0-20010523/8-sparcv9-cc/sparcv9-sun-solaris2.8/sparcv7/libstdc++-v3/src/gen-num-limits /vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/src/
In file included from /vol/gcc/obj/gcc-3.0-20010523/8-sparcv9-cc/gcc/include/signal.h:32,
                 from /vol/gnu/src/gcc/gcc-3.0-branch-dist/libstdc++-v3/src/
/vol/gcc/obj/gcc-3.0-20010523/8-sparcv9-cc/gcc/include/sys/types.h:118: syntax
   error before `;' token
gen-num-limits failed to build, exiting.
mknumeric_limits failed to execute properly: exiting
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/vol/gcc/obj/gcc-3.0-20010523/8-sparcv9-cc'
make: *** [bootstrap] Error 2

Running through xgcc -g3 -E reveals that __PTRDIFF_TYPE__
isn't defined any longer ;-(  I.e. gen-num-limits.ii contains this:

typedef __PTRDIFF_TYPE__ ptrdiff_t;

Running a minimal testfile through both xgcc -E and g++ -E shows that this
error exists only for g++.  Comparing the invokations of cpp0 gave this

g++ has


instead of (with xgcc)

-D__SIZE_TYPE__=long unsigned int -D__PTRDIFF_TYPE__=long int -D__arch64__ -Acpu=sparc64 -Amachine=sparcv9

I could trace this down to the following: when Mark introduced
CPLUSPLUS_CPP_SPEC (which is the variant of CPP_SPEC to be used for C++
programs), this consisted of a copy of the CPP_CPU_SPEC, preceded by the
_XOPEN_SOURCE etc. defines, while CPP_SPEC is defined (in sparc.h) as

	"%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget)"

Thus the %(cpp_cpu) part is taken care of for C++ (though it shouldn't have
been copied, just referenced to avoid two different versions drifting
apart), while the three others are lost.  Among them is %(cpp_arch), which
contains the missing definition of __PTRDIFF_TYPE__, among others.  Since
%(cpp_endian) and %(cpp_subtarget) didn't seem to contain anything that
could harm C++ programs or violate namespace rules, the following patch
should be safe: it replaces the copy of CPP_CPU_SPEC by a reference to
CPP_SPEC.  Bootstrap on both sparc-sun-solaris2.8 and
sparcv9-sun-solaris2.8 is underway, but the sparcv9-* stage1 g++ behaves as
expected, so this should be just the patch we need to get along with the


Rainer Orth, Faculty of Technology, Bielefeld University

Email: ro@TechFak.Uni-Bielefeld.DE

Thu May 24 00:15:17 2001  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* sparc/sol2.h (CPLUSPLUS_CPP_SPEC): Add all of CPP_SPEC instead
	of just copying CPP_CPU_SPEC.

Index: sol2.h
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2.h,v
retrieving revision
diff -u -p -r1.24.4.1 sol2.h
--- sol2.h	2001/05/16 01:01:12
+++ sol2.h	2001/05/23 23:24:38
@@ -40,21 +40,7 @@ Boston, MA 02111-1307, USA.  */
-%{mcypress:} \
-%{msparclite:-D__sparclite__} \
-%{mf930:-D__sparclite__} %{mf934:-D__sparclite__} \
-%{mv8:-D__sparc_v8__} \
-%{msupersparc:-D__supersparc__ -D__sparc_v8__} \
-%{mcpu=sparclet:-D__sparclet__} %{mcpu=tsc701:-D__sparclet__} \
-%{mcpu=sparclite:-D__sparclite__} \
-%{mcpu=f930:-D__sparclite__} %{mcpu=f934:-D__sparclite__} \
-%{mcpu=v8:-D__sparc_v8__} \
-%{mcpu=supersparc:-D__supersparc__ -D__sparc_v8__} \
-%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
-%{mcpu=sparclite86x:-D__sparclite86x__} \
-%{mcpu=v9:-D__sparc_v9__} \
-%{mcpu=ultrasparc:-D__sparc_v9__} \
-%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
+%(cpp) \
 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]