public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem bootstrapping gcc-3.3.1 (snapshot) on Sparc Solaris2.8
@ 2003-05-22 15:59 ` Josh
  2003-08-29 17:02   ` macros to detect endiannes? Kimmo Fredriksson
  0 siblings, 1 reply; 4+ messages in thread
From: Josh @ 2003-05-22 15:59 UTC (permalink / raw)
  To: gcc-help

I've configured with the following options in a separate objects directory (gcc-objs), using gcc-3.2.3 as the starting compiler:
../gcc-3.3/configure --prefix=/compiler/gcc-3.3 \
--with-ld=/compiler/gcc-3.2.3/bin/ld
--with-gnu-ld \
--with-as=compiler/gcc-3.2.3/bin/as \
--with-gnu-as \
--disable-nls \
--enable-threads=posix

Then:
make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' boostrap-lean

The build goes through, completes stage3 compiler, then the following error in eh_alloc.cc:

/home/fird3/gcc-objs/gcc/xgcc -shared-libgcc -B/home/fird3/gcc-objs/gcc/ -nostdinc++ -L/home/fird3/gcc-objs/spar
c-sun-solaris2.8/sparcv9/libstdc++-v3/src -L/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/libstdc++-v3/src/.
libs -B/prod/fir/compile/sol8/gcc-3.3/sparc-sun-solaris2.8/bin/ -B/prod/fir/compile/sol8/gcc-3.3/sparc-sun-solar
is2.8/lib/ -isystem /prod/fir/compile/sol8/gcc-3.3/sparc-sun-solaris2.8/include -m64 -I../../../../../gcc-200305
19/libstdc++-v3/../gcc -I../../../../../gcc-20030519/libstdc++-v3/../include -I/home/fird3/gcc-objs/sparc-sun-so
laris2.8/sparcv9/libstdc++-v3/include/sparc-sun-solaris2.8 -I/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/l
ibstdc++-v3/include -I../../../../../gcc-20030519/libstdc++-v3/libsupc++ -g -O2 -m64 -fno-implicit-templates -Wa
ll -Wno-format -W -Wwrite-strings -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c ../../
../../../gcc-20030519/libstdc++-v3/libsupc++/eh_aux_runtime.cc  -fPIC -DPIC -o eh_aux_runtime.o
../../../../../gcc-20030519/libstdc++-v3/libsupc++/eh_alloc.cc:81: error: too
   many initializers for `_pthread_mutex::<anonymous struct>'
make[7]: *** [eh_alloc.lo] Error 1
make[7]: *** Waiting for unfinished jobs....
make[7]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/libstdc++-v3/libsupc++'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/libstdc++-v3'
make[5]: *** [all-recursive-am] Error 2
make[5]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/libstdc++-v3'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/libstdc++-v3'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/libstdc++-v3'
make[2]: *** [all-recursive-am] Error 2
make[2]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/home/fird3/gcc-objs'
make: *** [bootstrap-lean] Error 2


Any insights?  I tried configuring w/ --enable-threads=single, but that also fails.  Thanks in advance.

Regards,
Josh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* macros to detect endiannes?
  2003-05-22 15:59 ` Problem bootstrapping gcc-3.3.1 (snapshot) on Sparc Solaris2.8 Josh
@ 2003-08-29 17:02   ` Kimmo Fredriksson
  2003-08-29 17:14     ` Rupert Wood
  2003-08-29 18:35     ` Eljay Love-Jensen
  0 siblings, 2 replies; 4+ messages in thread
From: Kimmo Fredriksson @ 2003-08-29 17:02 UTC (permalink / raw)
  To: gcc-help

Hi,

I have some source that makes assumptions on the endiannes of the
architecture. To make it more portable I'd like write specific code for
both little and big endian machines. Are there any predefined macros that
could be used to detect the endiannes at compile time, that I could use in
conditional compilation?

Thanks,

kf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: macros to detect endiannes?
  2003-08-29 17:02   ` macros to detect endiannes? Kimmo Fredriksson
@ 2003-08-29 17:14     ` Rupert Wood
  2003-08-29 18:35     ` Eljay Love-Jensen
  1 sibling, 0 replies; 4+ messages in thread
From: Rupert Wood @ 2003-08-29 17:14 UTC (permalink / raw)
  To: 'Kimmo Fredriksson'; +Cc: gcc-help

Kimmo Fredriksson wrote:

> Are there any predefined macros that could be used to detect the
> endiannes at compile time, that I could use in conditional
> compilation?

No, not by default. If your project uses autoconf you can use macro
AC_C_BIGENDIAN to create a define in the generated config.h; see the manual
and the 'autobook':

    http://www.gnu.org/manual/autoconf/autoconf.html
    http://sources.redhat.com/autobook/

If you're compiling for a large set of platforms you should really consider
autoconf etc.; if you're only compiling for a small set you can test for
platform specific defines (e.g. _WIN32 and _M_IX86 or __sun__) and then make
your own defines and #error if nothing matches.

Rup.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: macros to detect endiannes?
  2003-08-29 17:02   ` macros to detect endiannes? Kimmo Fredriksson
  2003-08-29 17:14     ` Rupert Wood
@ 2003-08-29 18:35     ` Eljay Love-Jensen
  1 sibling, 0 replies; 4+ messages in thread
From: Eljay Love-Jensen @ 2003-08-29 18:35 UTC (permalink / raw)
  To: Kimmo Fredriksson, gcc-help

Hi Kimmo,

GCC is a very good optimizing compiler.  A very, very good optimizing compiler.

Before you invest in making endian-aware subroutines, I strongly urge you to consider writing endian-agnostic routines.

And if code profiling IN THE OPTIMIZED CODE bears out that those routines need to be & can be made more efficient by being crafted as endian-aware routines, then-and-only-then take the next step by writing non-portable endian-aware code.

Even if the portability is subsumed by macro-triggers of endian-ness to preprocess-in the correct endian-aware code, that code is still less-than-portable.

Also the big-endian and little-endian code needs to be maintained in tandem.  That can be a source of problems, via code rot.

KISS is applicable in situations like these.  Tricky is not necessarily better.  Nor necessarily more efficient.

Sincerely,
--Eljay

More insights at <http://mindprod.com/unmain.html>. 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-29 18:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <" <8184363.1053619149459.JavaMail.nobody"@wamui02.slb.atl.earthlink.net>
2003-05-22 15:59 ` Problem bootstrapping gcc-3.3.1 (snapshot) on Sparc Solaris2.8 Josh
2003-08-29 17:02   ` macros to detect endiannes? Kimmo Fredriksson
2003-08-29 17:14     ` Rupert Wood
2003-08-29 18:35     ` Eljay Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).