Subject: Re: corss-building on osx
To: Bruce O'Neel <edoneel@sdf.lonestar.org>
From: matthew sporleder <msporleder@gmail.com>
List: current-users
Date: 01/29/2006 09:14:27
gcc_select 3.3 got me much further along the way.

I am now failing at normal areas of the build, instead of in the tools.

_Matt

On 1/28/06, matthew sporleder <msporleder@gmail.com> wrote:
> Unfortunately, this caused gas to not work properly:
> /Users/msporleder/Documents/netbsd/tools/bin/i386--netbsdelf-gcc -O2
> -fPIC  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
> -Wno-sign-compare -Wno-traditional -Wreturn-type -Wswitch -Wshadow
> -Werror   -I- -I/Users/msporleder/Documents/netbsd/src/lib/csu/i386_elf
> -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=3D32
> -I/Users/msporleder/Documents/netbsd/src/libexec/ld.elf_so
> -I/Users/msporleder/Documents/netbsd/src/lib/csu/i386_elf/../common_elf
> -I/Users/msporleder/Documents/netbsd/src/lib/libc/dlfcn -DDWARF2_EH
> -DJCR -DDSO_HANDLE  -nostdinc -isystem
> /Users/msporleder/Documents/netbsd/obj/Users/msporleder/Documents/netbsd/=
src/destdir.i386/usr/include
>  -c -DCRT0 /Users/msporleder/Documents/netbsd/src/lib/csu/i386_elf/crt0.c
> -o crt0.o
> i386--netbsdelf-gcc: Internal error: Bus error (program as)
> Please submit a full bug report.
> See <URL:http://www.netbsd.org/Misc/send-pr.html> for instructions.
>
>
> On 1/28/06, matthew sporleder <msporleder@gmail.com> wrote:
> > Here's how I got around my error:
> > In tc-i386.h and tc-i386.c, I changed:
> > extern const struct relax_type md_relax_table[];
> > to
> > extern const struct relax_type * md_relax_table;
> >
> > This caused a lot of gcc warnings, but didn't cause any errors.
> >
> > On 1/27/06, matthew sporleder <msporleder@gmail.com> wrote:
> > > My gcc version on os x is gcc version 4.0.1 (Apple Computer, Inc.
> > > build 5247), which is one minor-minor newer than one that seems to be
> > > working.
> > >
> > > On 1/27/06, matthew sporleder <msporleder@gmail.com> wrote:
> > > > I keep getting this:
> > > > msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dist/binut=
ils/gas/../include
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas/..
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas/../bfd
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas/../intl
> > > > -I../intl -DLOCALEDIR=3D"\"/Users/msporleder/Documents/netbsd/src/.=
./tools/share/locale\""
> > > >    -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O2
> > > > -no-cpp-precomp -c
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/app.c
> > > > In file included from
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/as.h:94,
> > > >                  from
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/app.c:30:
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/../include/getopt.h:116:
> > > > warning: function declaration isn't a prototype
> > > > In file included from
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/as.h:134,
> > > >                  from
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/app.c:30:
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/../include/libiberty.h:80:
> > > > warning: function declaration isn't a prototype
> > > > In file included from ./targ-cpu.h:1,
> > > >                  from
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/config/obj-elf.h:42,
> > > >                  from ./obj-format.h:1,
> > > >                  from
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/config/te-nbsd.h:24,
> > > >                  from ./targ-env.h:1,
> > > >                  from
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/as.h:626,
> > > >                  from
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/app.c:30:
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/dis=
t/binutils/gas/config/tc-i386.h:451:
> > > > error: array type has incomplete element type
> > > >
> > > > *** Failed target:  app.o
> > > > *** Failed command: cc -DHAVE_CONFIG_H -I.
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas
> > > > -I. -D_GNU_SOURCE -I.
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas
> > > > -I../bfd -I/Users/msporleder/Documents/netbsd/src/tools/binutils/..=
/../gnu/dist/binutils/gas/config
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas/../include
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas/..
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas/../bfd
> > > > -I/Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/d=
ist/binutils/gas/../intl
> > > > -I../intl -DLOCALEDIR=3D"\"/Users/msporleder/Documents/netbsd/src/.=
./tools/share/locale\""
> > > > -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -no-cpp-preco=
mp
> > > > -c /Users/msporleder/Documents/netbsd/src/tools/binutils/../../gnu/=
dist/binutils/gas/app.c
> > > > *** Error code 1
> > > >
> > > > Stop.
> > > > nbmake: stopped in
> > > > /Users/msporleder/Documents/netbsd/obj/Users/msporleder/Documents/n=
etbsd/src/tools/binutils/build/gas
> > > >
> > > > *** Failed target:  all-recursive
> > > > *** Failed command: set fnord $MAKEFLAGS; amf=3D$2; dot_seen=3Dno;
> > > > target=3D`echo all-recursive | sed s/-recursive//`; list=3D'doc po'=
; for
> > > > subdir in $list; do echo "Making $target in $subdir"; if test
> > > > "$subdir" =3D "."; then dot_seen=3Dyes; local_target=3D"$target-am"=
; else
> > > > local_target=3D"$target"; fi; (cd $subdir &&
> > > > /Users/msporleder/Documents/netbsd/src/../tools/bin/nbmake -X -f
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../Makefile.g=
nuwrap
> > > > $local_target) || case "$amf" in *=3D*) exit 1;; *k*) fail=3Dyes;; =
*) exit
> > > > 1;; esac; done; if test "$dot_seen" =3D "no"; then
> > > > /Users/msporleder/Documents/netbsd/src/../tools/bin/nbmake -X -f
> > > > /Users/msporleder/Documents/netbsd/src/tools/binutils/../Makefile.g=
nuwrap
> > > > "$target-am" || exit 1; fi; test -z "$fail"
> > > > *** Error code 1
> > > >
> > > >
> > > > On 1/27/06, Bruce O'Neel <edoneel@sdf.lonestar.org> wrote:
> > > > >
> > > > > While I can't say for OS/X, for other systems the -m flag tells y=
ou what
> > > > > target you want to build for, and build.sh builds the native tool=
s
> > > > > for what ever system you are running on.
> > > > >
> > > > > It does this even when you are building on the same system that i=
s the
> > > > > target in order to get the right versions of everything :-)
> > > > >
> > > > > cheers
> > > > >
> > > > > bruce
> > > > >
> > > > >
> > > > > On Thu, Jan 26, 2006 at 10:05:14PM -0800, Jeff Rizzo wrote:
> > > > > > matthew sporleder wrote:
> > > > > > > I actually reformatted to case sensitive hfs.  I guess I'm tr=
ying to
> > > > > > > figure out if -m i386 will correctly build tools and the rest=
 of the
> > > > > > > system.
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > It always has for me... I've built for i386 on OS X.4 within th=
e last 3
> > > > > > months, with a commandline approximating:
> > > > > >
> > > > > > ./build.sh -U -M /path/to/obj -T /path/to/tools -m i386 release
> > > > > >
> > > > > > +j
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > edoneel@sdf.lonestar.org
> > > > > SDF Public Access UNIX System - http://sdf.lonestar.org
> > > > >
> > > >
> > >
> >
>