macppc (in Japanese) | cvsweb | cvs anon access | www.gnu.org -- gcc home | Build Status | DRAFT toolchain upgrade plan | GCC HOWTO (.ja)

gcc for NetBSD/macppc

3.2developfast
3.1.1 release (7/27/2002)slow ?
3.1release (5/16/2002)
3.0.4releaseslow
2.95.3OS includedfastnecessary to compile gcc-3
egcs-1.1.2Old OS includes ( < 2001/11)fast necessary to compile X11

gcc-3.2

This version is said to be released Dec 2002, and you can get experimental version from cvs. Compiled on iBook. (2002/05/29)
Experimental binary = ftp://ftp.ki.nu/pub/NetBSD/port-macppc/gcc-3.2.tar.gz .. following patch is NOT included.

patch at nandra: ftp://nandra.iri.co.jp/pub/NetBSD/macppc/ (2002/08/15)

gcc-3.1.1

2002/07/27 gcc-3.1.1 is released.

But there seems to be still optimization (-O2) bugs for macppc. Kernel compiled with 3.1.* has problem on TCP (because -O2 is used).

To get gcc-3.1.1 compiled, you need:

  1. to have 20020407-1.5ZC or later installed. (1.6_BETA or 1.6D etc)
  2. Have following prerequisites stuff installed or package added.
    If the stuff with white lines made on pkgsrc, other stuff are automatically made also.
    package & versionwhat I took comment
    digest-20010807pkgsrc
    bison-1.28pkgsrc
    m4-1.4pkgsrcautoconf requires these
    perl-5.6.1nb6pkg_add
    autoconf-devel-2.52pkgsrc
    gettext-lib-0.10.35nb1pkg_addgmake wants this
    gmake-3.79.1pkg_add cd /usr/lib; ln -s libutils.so.6.0 libutils.so.5
  3. make sure you have gcc-2.95.3 as cc (or gcc-3.0.4), and binutils-2.11.2 as ld etc.
    gcc --version
    ld --version
    
    will tell you their versions.
  4. tar zxf $STOCK/gcc-3.1.1/gcc-3.1.1.tar.gz
    cd  gcc-3.1.1
    mkdir objdir
    cd    objdir
    setenv LANG C
    ../configure
    time gmake bootstrap
    ... 
    
    If you don't use objdir, you will get 'install-sh not found' problem later. You may have following warning at configure, but may be OK.
    configure: warning: 
    *** Makeinfo is missing or too old.
    *** Info documentation will not be built.
    
    With G4/800 MP, it will take about an hour to complete:
    2521.526u 470.896s 55:45.17 89.4%       0+0k 493+54999io 2906pf+0w
    ttyp0:makoto@quick  23:41:08/020728(...gcc-3.1.1/objdir)> 
    
  5. To make check, have some requirements first and
      dejagnu
         $ cvs -z3 -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/dejagnu login
         Password: [Hit EnterKey]
         $ cvs -z3 -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/dejagnu co dejagnu
      cd dejagnu ; ./configure; make ; make install
      cd /usr/pkgsrc/lang/tcl-expect ; make ; make install
      rehash
      time make check
    

    make install

    make install will put following files on /usr/local/bin ( if PREFIX= not specified).
     171099 Jul 29 06:38 grepjar
     193657 Jul 29 06:38 jar
     274230 Jul 29 06:38 gcc
     274230 Jul 29 06:38 powerpc-unknown-netbsd1.5ZC-gcc
     278121 Jul 29 06:38 cpp
      15518 Jul 29 06:38 gccbug
     106059 Jul 29 06:38 gcov
     281102 Jul 29 06:38 jcf-dump
     182455 Jul 29 06:38 jv-scan
     290651 Jul 29 06:38 gcjh
     285676 Jul 29 06:38 gcj
     282567 Jul 29 06:38 g77
     207894 Jul 29 06:38 c++filt
     277830 Jul 29 06:38 c++
     277830 Jul 29 06:38 g++
     277830 Jul 29 06:38 powerpc-unknown-netbsd1.5ZC-c++
     277830 Jul 29 06:38 powerpc-unknown-netbsd1.5ZC-g++
    

Errors

gmake[1]: Entering directory `/export/local-src/gcc-3.1/objdir/libiberty'
if [ x"" != x ]; then \
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include -W -Wall -Wtraditional -pedantic ../../libiberty/concat.c -o pic/concat.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include -W -Wall -Wtraditional -pedantic ../../libiberty/concat.c
../../libiberty/concat.c: In function `concat_length':
../../libiberty/concat.c:115: __builtin_saveregs not supported by this target
../../libiberty/concat.c: In function `concat_copy':
../../libiberty/concat.c:130: __builtin_saveregs not supported by this target
../../libiberty/concat.c: In function `concat_copy2':
../../libiberty/concat.c:147: __builtin_saveregs not supported by this target
../../libiberty/concat.c: In function `concat':
../../libiberty/concat.c:161: __builtin_saveregs not supported by this target
../../libiberty/concat.c: In function `reconcat':
../../libiberty/concat.c:198: __builtin_saveregs not supported by this target
gmake[1]: *** [concat.o] Error 1
gmake[1]: Leaving directory `/export/local-src/gcc-3.1/objdir/libiberty'
gmake: *** [all-libiberty] Error 2
Include files in /usr/include/powerpc mismatch with cc binary. Below is for 2.95.3 and you may be using gcc-3.
 4210 Apr  8 05:07 ansi.h
 4783 Apr  8 05:07 stdarg.h
 2102 Apr  8 05:07 varargs.h
Using 20020407-1.5ZC included gcc (2.95.3) is recommended instead.

to compile kernel

You should have gcc-3.1 installed in /usr/local/bin.

To use gcc3 for compiling kernel,

  1. Rename or link gcc to gcc3 to use new version specifically.
  2. Have following line in GENERIC configure file
    makeoptions CC="gcc3"
    

gcc-3.0.4

To get gcc-3.0.4 compiled on NetBSD/port-mappc, you may need
  1. -current with NEW_TOOLCHAIN enabled, say after Nov. 2001
  2. That -current includes gcc-2.95.3 and binutils-2.11.2
  3. Also, tsubai patch named gcc-3.0.4.diff may be necessary
pkgsrc style (private) setup
http://cvsweb.ki.nu/mef/personal-pkgsrc/gcc/
binary package
ftp://ftp.ki.nu/pub/NetBSD/packages/1.5ZA/
This may produce following lines ( which may be wrong and to be corrected -- 2002/05/13 ? )
pkg_add: Overwriting /usr/pkg/bin/c++filt - pkg binutils-2.11.2 bogus/conflicting?
pkg_add: Overwriting /usr/pkg/lib/libiberty.a - pkg binutils-2.11.2 bogus/conflicting?
By the way, this binary package should be created on 1.5ZC or arround.

There were combinations on

2 x 2 x 3 x 2 = 24 combinations in total. Common things to all are: Thus, for manual invocation, do:
tar zxf $STOCK/gcc-3.0.4.tar.gz
cd  gcc-3.0.4
patch -s -p1 < $STOCK/gcc-3.0.4.diff 
mkdir objdir
cd    objdir
setenv LANG C
../configure; time gmake _POSIX_C_SOURCE=yes bootstrap
../configure; time gmake                     bootstrap

Release Date

2002/05/15 gcc-3.1
2002/02/21 gcc-3.0.4
2001/12/20 gcc-3.0.3
2001/10/25 gcc-3.0.2

NetBSD bundled status

You may know the Version by following command.
makoto@u  10:27:10/020202(~)> gcc --version
egcs-1.1.2
makoto@u  10:48:01/020202(~)> gcc -v
Using builtin specs.
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
NetBSD/macppc and gcc version
VersionOS included ?Status
3.2 DRAFT toolchain upgrade plan
3.1Not Yet
3.0.4 Port master recommends this version.
3.0.3
2.95.3From 2001/11 Switches as with NEW TOOLCHAIN introduction to macppc
It is said the kernel compiled by this version freezes with NFS.
2.91.66 (egcs-1.1.2)till 2001/11 Good Reputation with many installation

misc note in chronological order

20020715 2.95.3 xkbcomp problem fix
http://mail-index.netbsd.org/port-powerpc/2002/07/13/0000.html
See also:
http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/gnusrc/gnu/dist/toolchain/gcc/expr.c
20020529
Making anoncvs version of gcc (as of today) 2973.136u 798.587s 1:14:52.21 83.9% 0+0k 740+49853io 1562pf+32w
20020528
Making gcc-3.0.4 ( for /usr/loca/bin ) on gcc-2.95.3, 1.6_BETA1 host fails at,
/usr/local/src/gcc-3.0.4/objdir/gcc/xgcc -B/usr/local/src/gcc-3.0.4/objdir/gcc/ -B/usr/local/powerpc-apple-netbsd1.6./bin/ -B/usr/local/powerpc-apple-netbsd1.6./lib/ -isystem /usr/local/powerpc-apple-netbsd1.6./include -c -DHAVE_CONFIG_H -g -O2 -I. -I../../../libiberty/../include -W -Wall -Wtraditional -pedantic ../../../libiberty/concat.c
../../../libiberty/concat.c: In function `concat':
../../../libiberty/concat.c:96: incompatible types in assignment
../../../libiberty/concat.c:107: request for member `__gpr' in something not a structure or union
.....
.....
gmake[1]: *** [concat.o] Error 1
gmake[1]: Leaving directory `/usr/local/src/gcc-3.0.4/objdir/powerpc-apple-netbsd1.6./libiberty'
gmake: *** [all-target-libiberty] Error 2
4194.271u 698.757s 1:30:42.80 89.8% 0+0k 281+29857io 3445pf+45w
ttyp0:makoto@gw2 19:28:02/020528(...gcc-3.0.4/objdir)>
     96   va_start (args, first);
    107       while ((arg = va_arg (args, const char *)) != NULLP)
    120       va_start (args, first);
    133           while ((arg = va_arg (args, const char *)) != NULLP)
20020527
Making gcc-3.0.4 ( for /usr/loca/bin ) on gcc-3.1 , fails at
/export/local-src/gcc-3.0.4/objdir/gcc/xgcc -B/export/local-src/gcc-3.0.4/objdir/gcc/ -B/usr/local/powerpc-apple-netbsd1.5ZC/bin/ -B/usr/local/powerpc-apple-netbsd1.5ZC/lib/ -isystem
/usr/local/powerpc-apple-netbsd1.5ZC/include -c -DHAVE_CONFIG_H -g -O2 -I. -I../../../libiberty/../include -W -Wall -Wtraditional -pedantic ../../../libiberty/concat.c
../../../libiberty/concat.c: In function `concat':
../../../libiberty/concat.c:96: incompatible types in assignment
../../../libiberty/concat.c:107: request for member `__gpr' in something not a structure or union
....
20020526
Another pkgsrc make failed on 20020407-1.5ZC machine
stage1/xgcc -Bstage1/ -B/usr/pkg/powerpc--netbsd/bin/ -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I. -I./. -I./config -I./../include rtl.c -o rtl.o
rtl.c: In function `fatal_with_file_and_line':
rtl.c:712: incompatible types in assignment
gmake[2]: *** [rtl.o] Error 1
gmake[2]: Leaving directory `/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/gcc'
gmake[1]: *** [stage2_build] Error 2
gmake[1]: Leaving directory `/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/gcc'
gmake: *** [bootstrap] Error 2
*** Error code 2

Stop.
make: stopped in /export/pkgsrc/personal-pkgsrc/gcc
*** Error code 1

Stop.
make: stopped in /export/pkgsrc/personal-pkgsrc/gcc
ttyp6:makoto@ibook 23:36:52/020525(...personal-pkgsrc/gcc)> make clean
gcc/rtl.c:
712 VA_START (ap, msg);
The macro is defined in gcc-3.0.4/include/ansidecl.h
117 #define VA_START(va_list,var) va_start(va_list,var)
gcc-3.0.4/gcc/ginclude/varargs.h
gcc-3.0.4/gcc/include/varargs.h
66 #define va_start(v) __builtin_varargs_start((v))
See also http://gcc.gnu.org/onlinedocs/gccint/Varargs.html
If the include -I./../include is -I./include instead, things become different. This seems because make objdir is not done in pkgsrc.
20020408 3.0.4, WITH tsubai patch, binutils(2.11.2), /usr/pkgsrc
userland (20020114) kernel (20020328-tsb)
Eliminating -D_POSIX_C_SOURCE from my Makefile seems OK now.

See following pkgsrc: http://cvsweb.ki.nu/mef/personal-pkgsrc/gcc/

ttyp0:makoto@quick  10:13:36/020408(...personal-pkgsrc/gcc)> make clean && time make
...
1698.407u 409.374s 40:15.70 87.2%       0+0k 370+84918io 1600524pf+17w
make package 
...
`/export/pkgsrc/personal-pkgsrc/gcc/work/.PLIST' is up to date.
===> [Automatic ELF shared object handling]
===> Registering installation for gcc-3.0.4
gcc-3.0.4 requires installed package autoconf-devel-2.52
gcc-3.0.4 requires installed package m4-1.4
gcc-3.0.4 requires installed package perl-5.6.1nb6
===> Packaging gcc-3.0.4
===> Becoming root@quick to package gcc-3.0.4.
su Password:
===> Building binary package for gcc-3.0.4
Creating package /export/pkgsrc/packages/All/gcc-3.0.4.tgz
Using SrcDir value of /usr/pkg
Registering depends: autoconf-devel>=2.5 m4-1.4 perl>=5.0.
Creating gzip'd tar ball in '/export/pkgsrc/packages/All/gcc-3.0.4.tgz'
ttyp0:makoto@quick  10:29:36/020408(...personal-pkgsrc/gcc)> 
20020404 3.0.4, WITH tsubai patch, binutils(2.12), /usr/pkgsrc
userland (20020114) kernel (20020328-tsb)
stdarg.h is replaced.
/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/gcc/xgcc
-B/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/gcc/ -nostdinc++
-L/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/powerpc--netbsd/libstdc++-v3/src
-L/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/powerpc--netbsd/libstdc++-v3/src/.libs
-B/usr/pkg/powerpc--netbsd/bin/ -B/usr/pkg/powerpc--netbsd/lib/
-isystem /usr/pkg/powerpc--netbsd/include -nostdinc++
-I/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/powerpc--netbsd/libstdc++-v3/include/powerpc--netbsd
-I/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/powerpc--netbsd/libstdc++-v3/include
-I../libsupc++ -I../libmath -O2 -DNETBSD_NATIVE -D_POSIX_C_SOURCE
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-g -c cmath.cc -fPIC -DPIC -o .libs/cmath.o

In file included from cmath.cc:35:
/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/powerpc--netbsd/libstdc++-v3/include/bits/std_cmath.h: In
   function `float std::acos(float)':
/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/powerpc--netbsd/libstdc++-v3/include/bits/std_cmath.h:95: `::acosf'
   undeclared (first use here)
(Dual/800) 1512.085u 304.843s 34:20.71 88.1% 0+0k 159+73869io 1194343pf+20w

See: View Problem Report: 4563

Currently here is what happens: we test support for features without turning on -ansi and then we build the library on top of them. Latter, users specify -ansi and boom we get confused...
20020404 3.0.4, without tsubai patch, binutils(2.12), /usr/pkgsrc
(userland + kernel = 20020114)
 
stage1/xgcc -Bstage1/ -B/usr/pkg/powerpc--netbsd/bin/ -DIN_GCC
-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
-DHAVE_CONFIG_H -DGENERATOR_FILE -o gengenrtl \ gengenrtl.o ` case
"obstack.o" in ?*) echo obstack.o ;; esac ` ` case "" in ?*) echo ;;
esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `
` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `

./gengenrtl -h >tmp-genrtl.h
./gengenrtl: 1: Syntax error: ")" unexpected
g
It turned out that it was misfortune I had wrong decision to have this cc overridden by snapshot/20011016/binary/sets/comp.tgz
cc --version
egcs-1.1.2
20020320 3.0.4, WITH tsubai patch, binutils(2.9.1), /usr/local/src
If I say just gmake, instead of gmake 'bootstrap' it will take
703.816u 103.835s 16:03.45 83.8%        0+0k 39+9460io 727279pf+0w
to stop at Configuring in powerpc-apple-netbsd1.5ZA/libiberty
20020320 3.0.4, WITH tsubai patch, binutils(2.9.1), /usr/local/src
stage1/xgcc -Bstage1/ -B/usr/local/powerpc-apple-netbsd1.5ZA/bin/
 -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
 -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
 -DHAVE_CONFIG_H -DGENERATOR_FILE -o gengenrtl \ gengenrtl.o ` case
 "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "" in ?*) echo ;;
 esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac
 ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `

/usr/lib/crt0.o: In function `_start':
/usr/lib/crt0.o(.text+0xc8): undefined reference to `_init'
collect2: ld returned 1 exit status
20020320 3.0.4, no tsubai patch, binutils(2.9.1), /usr/local/src
Exactly the same thing with binutils(2.11.2)
20020317 3.0.4, no tsubai patch, binutils(2.11.2), /usr/local/src
7 minutes to get:
stage1/xgcc -Bstage1/ -B/usr/local/powerpc-apple-netbsd1.5ZA/bin/
-DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
-DHAVE_CONFIG_ H -DGENERATOR_FILE -o gengenrtl \

 gengenrtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case
"" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in
?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*)
echo ;; esac `

./gengenrtl -h >tmp-genrtl.h
./gengenrtl: 1: Syntax error: "(" unexpected
gmake[2]: *** [s-genrtl] Error 2
gmake[2]: Leaving directory `/usr/local/src/gcc-3.0.4-no-patch/gcc'
gmake[1]: *** [stage2_build] Error 2
20020314 (3.0.4), binutils-2.11.2
stage1/xgcc won't generate executable
stage1/xgcc -Bstage1/ -B/usr/pkg/powerpc--netbsd/bin/ -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o gengenrtl \ gengenrtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `

./gengenrtl -h >tmp-genrtl.h
./gengenrtl: 1: Syntax error: "(" unexpected
gmake[2]: *** [s-genrtl] Error 2

20020313 (3.0.4) replace ld (binutils-2.12)
The expert suggested the necessity of new ld. binutils-2.12 package installed now.

Some sys_error related error ask me to add -D_POSIX_C_SOURCE

cc -DIN_GCC -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -o cpp0 cppmain.o intl.o libcpp.a obstack.o -lintl ../libiberty/libiberty.a

./xgcc -B./ -B/usr/pkg/powerpc--netbsd/bin/ -isystem /usr/pkg/powerpc--netbsd/include -isystem /usr/pkg/powerpc--netbsd/sys-include -dumpspecs > tmp-specs mv tmp-specs specs echo "int xxy_us_dummy;" >tmp-dum.c

./xgcc -B./ -B/usr/pkg/powerpc--netbsd/bin/ -isystem /usr/pkg/powerpc--netbsd/include -isystem /usr/pkg/powerpc--netbsd/sys-include -S tmp-dum.c

gmake[2]: *** [s-under] Illegal instruction (core dumped)
gmake[2]: Leaving directory `/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/gcc'
gmake[1]: *** [stage1_build] Error 2
gmake[1]: Leaving directory `/export/pkgsrc/personal-pkgsrc/gcc/work/gcc-3.0.4/gcc'
gmake: *** [bootstrap] Error 2
*** Error code 2

ttyq3:makoto@u 13:48:07/020313(...gcc-3.0.3/gcc)> gdb xgcc xgcc.core
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc--netbsd"...
Core was generated by `xgcc'.
Program terminated with signal 4, Illegal instruction.
Reading symbols from /usr/libexec/ld.elf_so...done.
Reading symbols from /usr/lib/libintl.so.0...done.
Reading symbols from /usr/lib/libc.so.12...done.
#0 0x182dc8c in wait ()
Breakpoint 1 at 0x41828bcc
Breakpoint 2 at 0x18121dc: file ./gcc.c, line 6146.
Breakpoint 3 at 0x418295d0
(gdb) where
#0 0x182dc8c in wait ()
#1 0x18157ac in pwait ()
#2 0x1806064 in execute () at ./gcc.c:2706
#3 0x180af28 in do_spec (
spec=0x1818248 "%{E|M|MM:%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)} %{!E:%{!M:%{!MM:\t %{save-temps:%(trad_capable_cpp) -l
ng-c %{ansi:-std=c89}\t\t%(cpp_options) %b.i \n\t\t cc1 -fpreprocessed %"...)
at ./gcc.c:4016
#4 0x1811a2c in main (argc=9, argv=0x7fffcfa4) at ./gcc.c:5931
#5 0x1801138 in _start ()
#6 0x4182292c in ?? () from /usr/libexec/ld.elf_so
(gdb)
  1. xgcc stops (Ilegal instruction) with and without tsubai patch (It took about 6 or 7 mins upto that point on G4/400.)
  2. ttyp2:makoto@u 9:44:14/020315(...personal-pkgsrc/gcc)> find . -name xgcc -ls
    1922065    480 -rwxr-xr-x    1 makoto   wheel       229929 Mar 15 09:44 ./work/gcc-3.0.4/gcc/xgcc
    ttyp2:makoto@u  9:44:23/020315(...personal-pkgsrc/gcc)> 
    
20020311 (3.0.4) look into further
stage1/xgcc -Bstage1/ -B/usr/local/powerpc-apple-netbsd1.5ZA/bin/ -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/cppmain.c -o cppmain.o
This will execute
stage1/xgcc -Bstage1/ -B/usr/local/powerpc-apple-netbsd1.5ZA/bin/ -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedanti c -Wno-long-long -DHAVE_CONFIG_H -o cpp0 cppmain.o intl.o libcpp.a obstack.o ./intl/libintl.a ../libiberty/libiberty.a
This will also execute, but very next step as
/usr/local/src/gcc-3.0.4/objdir/gcc/xgcc -B/usr/local/src/gcc-3.0.4/objdir/gcc/ -B/usr/local/powerpc-apple-netbsd1.5ZA/bin/ -B/usr/local/powerpc-apple-netbsd1.5ZA/lib/ -isyst em /usr/local/powerpc-apple-netbsd1.5ZA/include -dumpspecs > tmp-specs
won't execute
/usr/local/src/gcc-3.0.4/objdir/gcc/xgcc: 1: Syntax error: "(" unexpected
20020310 (3.0.4) + tsubai patch
makoto@u  13:28:51/020310(...src/gcc-3.0.4)> find . -name xgcc -ls
 723846    544 -rwxr-xr-x    1 makoto   wheel       263561 Mar 10 12:29 ./objdir/gcc/xgcc
 723409    544 -rwxr-xr-x    1 makoto   wheel       263834 Mar 10 11:57 ./objdir/gcc/stage1/xgcc

makoto@u  13:29:07/020310(...src/gcc-3.0.4)> ./objdir/gcc/stage1/xgcc
xgcc: No input files

makoto@u  13:29:37/020310(...src/gcc-3.0.4)> ./objdir/gcc/xgcc
./objdir/gcc/xgcc: Exec format error. Binary file not executable.
The binary created by ./objdir/gcc/stage1/xgcc won't create executable ?
20020310 (3.0.4)
port-macppc 2002/03/09
./configure
make bootstrap 
...
/usr/local/src/gcc-3.0.4/gcc/xgcc -B/usr/local/src/gcc-3.0.4/gcc/
-B/usr/local/powerpc-apple-netbsd1.5ZA/bin/
-B/usr/local/powerpc-apple-netbsd1.5ZA/lib/ -isystem
/usr/local/powerpc-apple-netbsd1.5ZA/include -dumpspecs > tmp-specs

/usr/local/src/gcc-3.0.4/gcc/xgcc: 1: Syntax error: "(" unexpected
*** Error code 2

makoto@u 10:36:51/020310(...src/gcc-3.0.4)> file /usr/local/src/gcc-3.0.4/gcc/xgcc
/usr/local/src/gcc-3.0.4/gcc/xgcc: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
makoto@u 10:37:07/020310(...src/gcc-3.0.4)> /usr/local/src/gcc-3.0.4/gcc/xgcc
/usr/local/src/gcc-3.0.4/gcc/xgcc: Exec format error. Binary file not executable.
makoto@u 10:37:12/020310(...src/gcc-3.0.4)>
makoto@u 10:39:30/020310(...src/gcc-3.0.4)> mv /usr/local/src/gcc-3.0.4/gcc/xgcc /usr/local/src/gcc-3.0.4/gcc/xgcc-ooo
makoto@u 10:40:00/020310(...src/gcc-3.0.4)> make
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/bin/sh /usr/local/src/gcc-3.0.4/install-sh -c" "INSTALL_DATA=/bin/sh /usr/local/src/gcc-3.0.4/install-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh /usr/local/src/gcc-3.0.4/install-sh -c " "INSTALL_SCRIPT=/bin/sh /usr/local/src/gcc-3.0.4/install-sh -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/info" "libdir=/usr/local/lib" "prefix=/usr/local" "tooldir=/usr/local/powerpc-apple-netbsd1.5ZA" "AR=ar" "AS=as" "CC=gcc" "CXX=c++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do
(cd intl && make all)
(cd po && make all)
gcc -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -o xgcc gcc.o gccspec.o intl.o prefix.o version.o obstack.o -lintl ../libiberty/libiberty.a
../libiberty/libiberty.a(choose-temp.o): In function `choose_temp_base':
/usr/local/src/gcc-3.0.4/libiberty/choose-temp.c:140: warning: mktemp() possibly used unsafely, use mkstemp() or mkdtemp()
/usr/local/src/gcc-3.0.4/gcc/xgcc -B/usr/local/src/gcc-3.0.4/gcc/ -B/usr/local/powerpc-apple-netbsd1.5ZA/bin/ -B/usr/local/powerpc-apple-netbsd1.5ZA/lib/ -isystem /usr/local/powerpc-apple-netbsd1.5ZA/include -dumpspecs > tmp-specs
Trace/BPT trap - core dumped
*** Error code 133
20020221 (3.0.3 + diff)
make bootstrap doesn't make any changes.
gmake[2]: Entering directory `/export/pkgsrc/personal/gcc/work/gcc-3.0.3/gcc' 

stage1/xgcc -Bstage1/
-B/usr/pkg/powerpc--netbsd/bin/ -DIN_GCC -g -O2 -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional
-pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o gengenrtl
\ gengenrtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` `
case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case
"" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in
?*) echo ;; esac `

/usr/lib/crt0.o: In function `_start':
/usr/lib/crt0.o(.text+0xc8): undefined reference to `_init'
collect2: ld returned 1 exit status
gmake[2]: *** [gengenrtl] Error 1
gmake[2]: Leaving directory `/export/pkgsrc/personal/gcc/work/gcc-3.0.3/gcc'
gmake[1]: *** [stage2_build] Error 2
gmake[1]: Leaving directory `/export/pkgsrc/personal/gcc/work/gcc-3.0.3/gcc'
gmake: *** [bootstrap] Error 2
*** Error code 2
20020202
I haven't checked with make bootstrap... I have to try.
20020202 gcc-3.0.3 (pkgsrc/personal/gcc)
Trying with pkgsrc pkgsrc/personal/gcc which prepared by myself.
makoto@u  11:03:01/020202(...work/gcc-3.0.3)> ./configure; gmake
....
checking whether the C compiler
(/export/pkgsrc/personal/gcc/work/gcc-3.0.3/gcc/xgcc
-B/export/pkgsrc/personal/gcc/work/gcc-3.0.3/gcc/
-B/usr/local/powerpc-apple-netbsd1.5ZA/bin/
-B/usr/local/powerpc-apple-netbsd1.5ZA/lib/ -isystem
/usr/local/powerpc-apple-netbsd1.5ZA/include -O2 ) works... no

configure: error: installation or configuration problem: C compiler cannot create executables.
gmake: *** [configure-target-libiberty] Error 1
makoto@u  11:20:32/020202(...work/gcc-3.0.3)> 
makoto@u  11:46:21/020202(...work/gcc-3.0.3)> tail ./powerpc-apple-netbsd1.5ZA/libiberty/config.log
configure:1950: /export/pkgsrc/personal/gcc/work/gcc-3.0.3/gcc/xgcc
-B/export/pkgsrc/personal/gcc/work/gcc-3.0.3/gcc/
-B/usr/local/powerpc-apple-netbsd1.5ZA/bin/
-B/usr/local/powerpc-apple-netbsd1.5ZA/lib/ -isystem
/usr/local/powerpc-apple-netbsd1.5ZA/include -o conftest -O2 conf
test.c 1>&5

/usr/lib/crt0.o: In function `_start':
/usr/lib/crt0.o(.text+0xc8): undefined reference to `_init'
collect2: ld returned 1 exit status
configure: failed program was:

#line 1945 "configure"
#include "confdefs.h"

main(){return(0);}
The files containing the string _init are as follows.
gcc/ncrti.S
gcc/config/m68k/crti.s
gcc/config/fr30/crti.asm
gcc/config/i386/osf1-ci.asm
gcc/config/i386/sol2-c1.asm
gcc/config/i386/sol2-ci.asm
gcc/config/i386/sol2-gc1.asm
gcc/config/mcore/crti.asm
gcc/config/sh/crt1.asm
gcc/config/sh/crti.asm
gcc/config/sparc/sol2-c1.asm
gcc/config/sparc/sol2-ci.asm
gcc/config/sparc/sol2-g1.asm
Last Update
10:52:54 03/12/08
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Apache/2.4.46 (Unix) PHP/7.4.15
Count.cgi
(since 2002/02/02)