public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* success gcc-3.1-20020423 on macosx
@ 2002-04-28 20:23 Konstantin Olchanski
  2002-04-28 21:25 ` PPC multilibs [Re: success gcc-3.1-20020423 on macosx] Bryce McKinlay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Konstantin Olchanski @ 2002-04-28 20:23 UTC (permalink / raw)
  To: gcc


This is a report of a successful bootstrap of gcc-3.1-20020423.tar.bz2 on
macosx 10.1.4 using the stock Apple gcc (version?).

I was unable to run the testsuite because it requires additional
software (dejagnu(?)) that I do not have (yet).

I wish the gcc test suite had a trivial to use perl-ish "make test" and
I wish all the required pieces were part of the snapshot.

These kludges had to be applied to the gcc tree before I could bootstrap:
 1) add real functions for isalnum() and friends (if libstdc++ authors wants
    them to be real functions, why do *I* have to provide the silly
    wrappers?)
 2) defeat silly games with size_t in Apple's /usr/include/string.h

Also:
 3) why is gcc building the soft-float libraries (multilib?)?
    Does macosx and Darwin run on any FPU-less systems?

My build instructions are below- hopefully somebody more knowledgable
than I can produce and submit them as patches to gcc-3.1.x:

1) untar the gcc tarball, mkdir and cd to the build directory
   as per gcc instructions
2) configure gcc:
   ../gcc-3.1-20020423/configure --prefix=/usr/local/gcc-3.1-20020423
3) run "make bootstrap". This will build the N stages of gcc
   and eventually bomb-out in libstdc++ because of missing isalnum() & co
   functions.
4) apply the kludges:
   a) in powerpc-apple-darwin5.4/libstdc++-v3/include/cctype
      add these wrappers right after the "#undef isxxx" block:
int isalnum(const char c) { return __istype((c), (_A|_D)); }
int isalpha(const char c) { return __istype((c),     _A); }
int iscntrl(const char c) { return __istype((c),     _C); }
int isdigit(const char c) { return __isctype((c),    _D); }
int isgraph(const char c) { return __istype((c),     _G); }
int islower(const char c) { return __istype((c),     _L); }
int isprint(const char c) { return __istype((c),     _R); }
int ispunct(const char c) { return  __istype((c),     _P); }
int isspace(const char c) { return  __istype((c),     _S); }
int isupper(const char c)  { return __istype((c),     _U); }
int isxdigit(const char c) { return __isctype((c),    _X); }
   
   b) cp /usr/include/string.h powerpc-apple-darwin5.4/libstdc++-v3/include/
      cp /usr/include/string.h powerpc-apple-darwin5.4/soft-float/libstdc++-v3/include/
      in both copies of string.h, bracket the "typedef size_t" block
      in "#if 0/#endif":
#if 0
#ifndef	_BSD_SIZE_T_DEFINED_
#define	_BSD_SIZE_T_DEFINED_
typedef	_BSD_SIZE_T_	size_t;
#endif
#endif

5) run "make bootstrap" again. This will resume building libstdc++
   and all the other libaries.
6) run "sudo make install". This will install gcc.

Random technical details:

- "uname -a" output:
Darwin localhost 5.4 Darwin Kernel Version 5.4: Wed Apr 10 09:27:47 PDT 2002; root:xnu/xnu-201.19.3.obj~1/RELEASE_PPC  Power Macintosh powerpc

- gcc configuration from config.status:
../gcc-3.1-20020423/configure --with-gcc-version-trigger=/Users/olchansk/src/gcc/gcc-3.1-20020423/gcc/version.c --host=powerpc-apple-darwin5.4 --prefix=/usr/local/gcc-3.1-20020423 --norecursion 

- "gcc -v" output:
% /usr/local/gcc-3.1-20020423/bin/gcc -v
Reading specs from /usr/local/gcc-3.1-20020423/lib/gcc-lib/powerpc-apple-darwin5.4/3.1/specs
Configured with: ../gcc-3.1-20020423/configure --prefix=/usr/local/gcc-3.1-20020423
Thread model: single
gcc version 3.1 20020423 (prerelease)

-- 
Konstantin Olchanski
Email: olchansk@triumf.ca
Snail mail: 4004 Wesbrook Mall, TRIUMF, Vancouver, B.C., V6T 2A3, Canada

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

* PPC multilibs [Re: success gcc-3.1-20020423 on macosx]
  2002-04-28 20:23 success gcc-3.1-20020423 on macosx Konstantin Olchanski
@ 2002-04-28 21:25 ` Bryce McKinlay
  2002-04-29  8:40 ` success gcc-3.1-20020423 on macosx Stan Shebs
  2002-04-29  9:00 ` Janis Johnson
  2 siblings, 0 replies; 4+ messages in thread
From: Bryce McKinlay @ 2002-04-28 21:25 UTC (permalink / raw)
  To: Konstantin Olchanski; +Cc: gcc

Konstantin Olchanski wrote:

>Also:
> 3) why is gcc building the soft-float libraries (multilib?)?
>    Does macosx and Darwin run on any FPU-less systems?
>

That is a good question. Linux PPC also builds soft-float libraries, I 
believe. I configure with --disable-multilib to avoid them. I think PPC 
linux and darwin should not multilib by default. Neither the linux nor 
darwin kernels need libgcc, afaik, and if they did it should only be 
libgcc that is multilibed and not libstdc++, libjava, etc.

regards

Bryce.


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

* Re: success gcc-3.1-20020423 on macosx
  2002-04-28 20:23 success gcc-3.1-20020423 on macosx Konstantin Olchanski
  2002-04-28 21:25 ` PPC multilibs [Re: success gcc-3.1-20020423 on macosx] Bryce McKinlay
@ 2002-04-29  8:40 ` Stan Shebs
  2002-04-29  9:00 ` Janis Johnson
  2 siblings, 0 replies; 4+ messages in thread
From: Stan Shebs @ 2002-04-29  8:40 UTC (permalink / raw)
  To: Konstantin Olchanski; +Cc: gcc

Konstantin Olchanski wrote:
> 
> These kludges had to be applied to the gcc tree before I could bootstrap:
>  1) add real functions for isalnum() and friends (if libstdc++ authors wants
>     them to be real functions, why do *I* have to provide the silly
>     wrappers?)

Because it's a bug in Apple's ctype.h which has already been fixed
and will appear in a future release of the OS.  I have a first pass
at the necessary fixincludes fix, but it needs more testing.

>  2) defeat silly games with size_t in Apple's /usr/include/string.h

I need to submit the patch for this, am more inclined to submit
it for a 3.1.1 than to let 3.1 drag out though.

>  3) why is gcc building the soft-float libraries (multilib?)?
>     Does macosx and Darwin run on any FPU-less systems?

Darwin does not need soft-float libraries - another patch that
is in Apple's sources and needs to be extracted.

Stan

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

* Re: success gcc-3.1-20020423 on macosx
  2002-04-28 20:23 success gcc-3.1-20020423 on macosx Konstantin Olchanski
  2002-04-28 21:25 ` PPC multilibs [Re: success gcc-3.1-20020423 on macosx] Bryce McKinlay
  2002-04-29  8:40 ` success gcc-3.1-20020423 on macosx Stan Shebs
@ 2002-04-29  9:00 ` Janis Johnson
  2 siblings, 0 replies; 4+ messages in thread
From: Janis Johnson @ 2002-04-29  9:00 UTC (permalink / raw)
  To: Konstantin Olchanski; +Cc: gcc

On Sun, Apr 28, 2002 at 07:13:14PM -0700, Konstantin Olchanski wrote:
> 
> This is a report of a successful bootstrap of gcc-3.1-20020423.tar.bz2 on
> macosx 10.1.4 using the stock Apple gcc (version?).
> 
> I was unable to run the testsuite because it requires additional
> software (dejagnu(?)) that I do not have (yet).

To run the testsuite you need to build and install Tcl, expect, and
DejaGNU, and to define some environment variables with their locations.
I would expect them all to build and install cleanly on your system.

> I wish the gcc test suite had a trivial to use perl-ish "make test" and
> I wish all the required pieces were part of the snapshot.

Other than including the tools mentioned above in the GCC distribution,
is there something we could add to the testing documentation to make it
more likely for you (and others) to install these tools and run the
tests?

Janis

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

end of thread, other threads:[~2002-04-29 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-28 20:23 success gcc-3.1-20020423 on macosx Konstantin Olchanski
2002-04-28 21:25 ` PPC multilibs [Re: success gcc-3.1-20020423 on macosx] Bryce McKinlay
2002-04-29  8:40 ` success gcc-3.1-20020423 on macosx Stan Shebs
2002-04-29  9:00 ` Janis Johnson

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).