Chief, your suggestion was brilliant in its simplicity. I found two places that prepare gcc for BeOS:
[1] http://www.geekgadgets.org [2] http://www.toyoshima-house.net
I had a little luck with the latter, but not enough to complete the task. GeekGadgets provides all the source for gcc 2.95.1, but all the necessary changes were made to accommodate installation on BeOS.
So, configuration now works perfectly:
% cd ~/buildarea % make distclean % /..../configure --enable-languages=pascal --prefix=/boot/testloc
Needless to say, this gave way to much whooping and hollering! :)
--BUT-- (the inevitable 'BUT')
Here is the problem I'm having now, and I'm POSITIVE that it's a simple one to resolve. I just can't quite get my brain around it:
When I run 'make' after a successful configuration, it churns on it for about 5 minutes, spitting out the usual DHAVE_THIS and DHAVE_THAT, looking for the most part like a successful compilation in the works.... BUT... all of a sudden the whole thing comes to a screeching halt at:
make[1]: *** [winnt.o] Error 1 make[1]: Leaving directory `/boot/home/buildarea/gcc' make: *** [all-gcc] Error 2 %
I am including the output, but only the last 7 or 8 lines, since the rest seems okay:
gcc -c -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I/boot/home/fred/fsf/gcc/gcc -I/boot/home/fred/fsf/gcc/gcc/config -I/boot/home/fred/fsf/gcc/gcc/../include /boot/home/fred/fsf/gcc/gcc/config/i386/winnt.c /boot/home/fred/fsf/gcc/gcc/config/i386/winnt.c: In function `i386_pe_dllimport_p': /boot/home/fred/fsf/gcc/gcc/config/i386/winnt.c:201: `TARGET_NOP_FUN_DLLIMPORT' undeclared (first use in this function) /boot/home/fred/fsf/gcc/gcc/config/i386/winnt.c:201: (Each undeclared identifier is reported only once /boot/home/fred/fsf/gcc/gcc/config/i386/winnt.c:201: for each function it appears in.) make[1]: *** [winnt.o] Error 1 make[1]: Leaving directory `/boot/home/buildarena/gcc' make: *** [all-gcc] Error 2
What I need to know is what flags I need to use with 'configure' and/or 'make' to specify that I don't want anything related to Windows compiled in. Isn't this possible? That would effectively skip right over these headers and source files, right?
Again, thanks in advance for any/all assistance.
- pgeorge
There are a couple threads about installing GPC onto Mac OS X and BeOS. The main one for BeOS ends with "just try it," which I did... and it didn't work.
[...]
• The failure is the same on both platforms when running 'configure' - 'Configuration i586-pc-beos not supported' (BeOS) - 'Configuration powerpc-apple-bsd not supported' (Mac OS X)
You may be able to solve this by amending the various configure.* scripts, first, to remove the error being reported, and secondly, to tell them what to do with BeOS and Mac OSX. You will find various sections and entries which relate to the various platforms supported by gcc (try searching for "linux" in the various "configure.in" scripts, and you will see what I mean). Since you are writing an OS under BeOS, you obviously know a lot about the system internals. You should be able to supply the scripts with entries for BeOS.
I'm using GCC 2.95.2 source and GPC 20020417 (tried ...410 also) from which to attempt the builds and I'm cleaning between failed attempts. I am following the installation instructions to the T, right down to the folder called 'fred'.
For those who are wondering, BeOS 5 is about 99% POSIX compliant (the other 1% is GUI-related I believe). Maybe that's the hitch; is there possibly a --posix flag or something like that??? HHHmmmmm.... Not sure. It's primary language is C/C++ and the default tools are gnu gcc and the rest of the gang, so one would thing that we could slide GPC right in there beside it without a problem.
If you can build gcc under BeOS, then you are on your way. If gcc is the default tool, then someone has obviously been able to build gcc. My advice is - find that someone and ask them how they did it. It is necessary for building GPC that gcc can be built on the system. Presumably, whoever built the gcc compilers for BeOS have (under the GPL) to make their gcc sources available. Use those sources instead of the pristine GNU sources, and you may well have greater success.
PS: it may well be that the GPC patches will fail under a patched gcc version (if there had been too many changes), but I doubt that they will fail.