Subject: 64 bit bootstrap tools.
To: None <tech-pkg@NetBSD.org>
From: Charlie Allom <charlie@rubberduck.com>
List: tech-pkg
Date: 02/25/2004 22:54:06
--Apple-Mail-2-618598891
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed
Anyone know how to make 64 bit bmake.. etc from bootstrap?
it seem that parts of the build for bmake are picking up my
/etc/mk.conf additions to CFLAGS, but others aren't.
22:52 lazy:/home/yeled/bootstrap-pkgsrc# cat /etc/mk.conf
CC= cc
CXX= CC
CFLAGS+= -xtarget=ultra2 -xarch=v9a
the first build of bmake.boot doesnt pick up..
[...]
cc *.o lst.lib/*.o -o bmake.boot rm -f *.[ado] */*.[ado] CC="cc"
MAKESYSPATH=/usr/pkg/share/mk ./bmake.boot -f Makefile
cc -O -I. -I. -DHAVE_CONFIG_H -I./missing -D__EXTENSIONS__
"-D_PATH_DEFSYSPATH=\"/usr/pkg/share/mk\"" -DSIGNAL_FLAGS=SA_RESTART
-xtarget=ultra2 -xarch=v9a -c arch.c
[...]
So when we get here, it dies:
cc -O -I. -I. -DHAVE_CONFIG_H -I./missing -D__EXTENSIONS__
"-D_PATH_DEFSYSPATH=
\"/usr/pkg/share/mk\"" -DSIGNAL_FLAGS=SA_RESTART -xtarget=ultra2
-xarch=v9a
-c getenv.c
"getenv.c", line 90: warning: empty translation unit
cc -O -I. -I. -DHAVE_CONFIG_H -I./missing -D__EXTENSIONS__
"-D_PATH_DEFSYSPATH=
\"/usr/pkg/share/mk\"" -DSIGNAL_FLAGS=SA_RESTART -xtarget=ultra2
-xarch=v9a
-c sigcompat.c
"sigcompat.c", line 212: warning: implicit function declaration: memcpy
"sigcompat.c", line 222: warning: implicit function declaration: memset
cc -o bmake arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o
main.o make.
o parse.o str.o suff.o targ.o trace.o var.o util.o lstAppend.o
lstAtEnd.o lstAtF
ront.o lstClose.o lstConcat.o lstDatum.o lstDeQueue.o lstDestroy.o
lstDupl.o lst
EnQueue.o lstFind.o lstFindFrom.o lstFirst.o lstForEach.o
lstForEachFrom.o lstIn
it.o lstInsert.o lstIsAtEnd.o lstIsEmpty.o lstLast.o lstMember.o
lstNext.o lstOp
en.o lstRemove.o lstReplace.o lstSucc.o getenv.o sigcompat.o
ld: fatal: file arch.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to bmake
*** Error code 1
Stop.
bmake.boot: stopped in /home/yeled/bootstrap-pkgsrc/bmake
*** Error code 1
make: Fatal error: Command failed for target `bootstrap'
===> exited with status 1
so I edit thusly:
--- bmake/makefile.boot.in.orig Wed Feb 25 22:32:43 2004
+++ bmake/makefile.boot.in Wed Feb 25 22:40:36 2004
@@ -14,7 +14,7 @@
MK=${prefix}/share/mk
MKSRC=${srcdir}/mk
-CFLAGS=-I. -I$(srcdir) @DEFS@ @CPPFLAGS@ -DMAKE_BOOTSTRAP ${XDEFS}
+CFLAGS=-I. -I$(srcdir) -xtarget=ultra2 -xarch=v9a @DEFS@ @CPPFLAGS@
-DMAKE_BOOTSTRAP ${XDEFS}
MDEFS="-D@force_machine@MACHINE=\"@machine@\""
"-DMACHINE_ARCH=\"@machine_arch@\""
OBJ=arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o main.o
make.o \
@@ -27,7 +27,7 @@
bmake.boot: ${OBJ}
(cd lst.lib; $(MAKE) -f makefile.boot CC="$(CC)" CFLAGS="-I..
-I${srcdir}/.. ${CFLAGS}" )
- ${CC} *.o lst.lib/*.o -o $@ @LIBS@
+ ${CC} -xtarget=ultra2 -xarch=v9a *.o lst.lib/*.o -o $@ @LIBS@
rm -f *.[ado] */*.[ado]
bootstrap: bmake.boot
and it errors:
cc -O -I. -I. -DHAVE_CONFIG_H -I./missing -D__EXTENSIONS__
"-D_PATH_DEFSYSPATH=\"/usr/pkg/share/mk\"" -DSIGNAL_FLAGS=SA_RESTART
-xtarget=ultra2 -xarch=v9a -c getenv.c
"getenv.c", line 90: warning: empty translation unit
cc -O -I. -I. -DHAVE_CONFIG_H -I./missing -D__EXTENSIONS__
"-D_PATH_DEFSYSPATH=\"/usr/pkg/share/mk\"" -DSIGNAL_FLAGS=SA_RESTART
-xtarget=ultra2 -xarch=v9a -c sigcompat.c
"sigcompat.c", line 212: warning: implicit function declaration: memcpy
"sigcompat.c", line 222: warning: implicit function declaration: memset
cc -o bmake arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o
main.o make.o parse.o str.o suff.o targ.o trace.o var.o util.o
lstAppend.o lstAtEnd.o lstAtFront.o lstClose.o lstConcat.o lstDatum.o
lstDeQueue.o lstDestroy.o lstDupl.o lstEnQueue.o lstFind.o
lstFindFrom.o lstFirst.o lstForEach.o lstForEachFrom.o lstInit.o
lstInsert.o lstIsAtEnd.o lstIsEmpty.o lstLast.o lstMember.o lstNext.o
lstOpen.o lstRemove.o lstReplace.o lstSucc.o getenv.o sigcompat.o
ld: fatal: file arch.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to bmake
*** Error code 1
I can't find out where this one is called from?? and then it all goes
to shit if I try and run that command with the v9 stuff.
cc -xtarget=ultra2 -xarch=v9a *.o lst.lib/*.o -o bmake.boot
ld: fatal: symbol `Lst_Append' is multiply-defined:
(file lstAppend.o type=FUNC; file lst.lib/lstAppend.o
type=FUNC);
ld: fatal: symbol `Lst_AtEnd' is multiply-defined:
(file lstAtEnd.o type=FUNC; file lst.lib/lstAtEnd.o type=FUNC);
ld: fatal: symbol `Lst_AtFront' is multiply-defined:
(file lstAtFront.o type=FUNC; file lst.lib/lstAtFront.o
type=FUNC);
ld: fatal: symbol `Lst_Close' is multiply-defined:
(file lstClose.o type=FUNC; file lst.lib/lstClose.o type=FUNC);
ld: fatal: symbol `Lst_Concat' is multiply-defined:
(file lstConcat.o type=FUNC; file lst.lib/lstConcat.o
type=FUNC);
etc etc
help?
TIA,
C.
--
charlie@rubberduck.com - Melbourne, Australia
http://rubberduck.com/~yeled/
PGP: 0x14AA7941 || finger yeled@lazy.spodder.com
--Apple-Mail-2-618598891
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAPIzeqiZDwhSqeUERAmnUAJ0Z+GkvNVxHYZXNCsx+NIiOnVVESACgkc0n
/b98i9wgInA6Nw1Y9scH/vY=
=RI48
-----END PGP SIGNATURE-----
--Apple-Mail-2-618598891--