Re: difficulty building a cross-compiler with a fresh install

2008-07-30 Thread Wyatt Neal
the cross compiler i'm looking to build is one to produce  i386
compatable system v elf executables for freebsd.  the default gcc
installed with freebsd 6.1 produces i386 compatible freebsd elf
executables, not system v.

i've also found that i'm apparently building gcc improperly and with
the wrong version of binutils; however, changing the binutils to the
correct version hasn't helped and i'm still waiting on gcc's build to
get to/past the point where it's been crashing out.

On 7/30/08, Roland Smith <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 29, 2008 at 08:47:42PM -0400, Wyatt Neal wrote:
> > greetings,
> >
> > i've been running with a freebsd 6.1 system for a few days and i'm
> > having some oddities when trying to build a cross compiler on the
> > system.
>
> You don't say _what_ kind of cross-compiler you want.
>
> Use the available cross-compilers from ports. There is a good chance
> someone else has already sorted it out.
>
> You can find a complete list of cross-compilers with
> 'ls /usr/ports/devel/*-gcc/Makefile':
>
> /usr/ports/devel/arm-rtems-gcc/Makefile
> /usr/ports/devel/avr-gcc/Makefile
> /usr/ports/devel/cross-gcc/Makefile
> /usr/ports/devel/djgpp-gcc/Makefile
> /usr/ports/devel/i386-rtems-gcc/Makefile
> /usr/ports/devel/i960-rtems-gcc/Makefile
> /usr/ports/devel/m68k-rtems-gcc/Makefile
> /usr/ports/devel/mingw32-gcc/Makefile
> /usr/ports/devel/mips-rtems-gcc/Makefile
> /usr/ports/devel/msp430-gcc/Makefile
> /usr/ports/devel/powerpc-gcc/Makefile
> /usr/ports/devel/powerpc-rtems-gcc/Makefile
> /usr/ports/devel/sh-rtems-gcc/Makefile
> /usr/ports/devel/sparc-rtems-gcc/Makefile
>
> Note that cross-gcc is a master port for most of the others except
> mingw32-gcc. If you want to cross-compile for win32, use mingw32-gcc.
>
> Roland
> --
> R.F.Smith   http://www.xs4all.nl/~rsmith/
> [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
> pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: difficulty building a cross-compiler with a fresh install

2008-07-30 Thread Roland Smith
On Tue, Jul 29, 2008 at 08:47:42PM -0400, Wyatt Neal wrote:
> greetings,
> 
> i've been running with a freebsd 6.1 system for a few days and i'm
> having some oddities when trying to build a cross compiler on the
> system.

You don't say _what_ kind of cross-compiler you want.

Use the available cross-compilers from ports. There is a good chance
someone else has already sorted it out.

You can find a complete list of cross-compilers with 
'ls /usr/ports/devel/*-gcc/Makefile':

/usr/ports/devel/arm-rtems-gcc/Makefile
/usr/ports/devel/avr-gcc/Makefile
/usr/ports/devel/cross-gcc/Makefile
/usr/ports/devel/djgpp-gcc/Makefile
/usr/ports/devel/i386-rtems-gcc/Makefile
/usr/ports/devel/i960-rtems-gcc/Makefile
/usr/ports/devel/m68k-rtems-gcc/Makefile
/usr/ports/devel/mingw32-gcc/Makefile
/usr/ports/devel/mips-rtems-gcc/Makefile
/usr/ports/devel/msp430-gcc/Makefile
/usr/ports/devel/powerpc-gcc/Makefile
/usr/ports/devel/powerpc-rtems-gcc/Makefile
/usr/ports/devel/sh-rtems-gcc/Makefile
/usr/ports/devel/sparc-rtems-gcc/Makefile

Note that cross-gcc is a master port for most of the others except
mingw32-gcc. If you want to cross-compile for win32, use mingw32-gcc.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpycRTpqCH4t.pgp
Description: PGP signature


Re: difficulty building a cross-compiler with a fresh install

2008-07-29 Thread Dan Nelson
In the last episode (Jul 29), Wyatt Neal said:
> i've been running with a freebsd 6.1 system for a few days and i'm
> having some oddities when trying to build a cross compiler on the
> system.
> 
> the first issue that shows is:
> 
> In file included from archive.c:132:
> sysdep.h:173:21: libintl.h: No such file or directory
> 
> this comes from the libintl.h being located in /usr/local/include
> instead of /usr/include.  a simple modification to the CFLAGS as so:
> 
> export CFLAGS="-I /usr/local/include"
> 
> has resolved binutils building correctly.  a build of gcc shows the
> same issue; however, gcc fails to build with the following error:
> 
> gcc -c   -I /usr/local/include -DIN_GCC -DCROSS_COMPILE  -W -Wall
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
> -Wno-long-long-DHAVE_CONFIG_H-I. -I. -I. -I./. -I./../include
> ./config/i386/i386.c -o i386.o
> ./config/i386/i386.c:1033: error: `ix86_svr3_asm_out_constructor' undeclared 
> here (not in a function)
> ./config/i386/i386.c:1033: error: initializer element is not constant
> ./config/i386/i386.c:1033: error: (near initialization for 
> `targetm.asm_out.constructor')
> ./config/i386/i386.c:1033: error: initializer element is not constant
> ./config/i386/i386.c:1033: error: (near initialization for `targetm.asm_out')
> ./config/i386/i386.c:1033: error: initializer element is not constant
> ./config/i386/i386.c:1033: error: (near initialization for `targetm.sched')
> ./config/i386/i386.c:1033: error: initializer element is not constant
> ./config/i386/i386.c:1033: error: (near initialization for `targetm.calls')
> ./config/i386/i386.c: In function `ix86_file_end':
> ./config/i386/i386.c:4839: warning: implicit declaration of function 
> `ASM_DECLARE_FUNCTION_NAME'
> gmake[1]: *** [i386.o] Error 1
> 
> both binutils and gcc are being built from the source from
> ftp.gnu.org following along with
> http://docs.freebsd.org/info/gcc/gcc.info.Cross-Compiler.html
> 
> i've not encountered this error before on the various linux systems
> so i'm assuming it's something that i'm doing with being new to
> freebsd. i've been able to compile the above code on my ubuntu system
> without issue as well so i'm fairly certain it's something i'm
> screwing up on freebsd.
> 
> bintuils 2.18 config string:
> ./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local
> 
> gcc 3.4.4 config string:
> ./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local
> --program-suffix=""
> 
> thoughts?

Take a look at the devel/cross-binutils and devel/cross-gcc ports.  The
cross-gcc port is at 4.2.3, so you may have to just copy what it does and
build gcc-3.4.4 manually.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


difficulty building a cross-compiler with a fresh install

2008-07-29 Thread Wyatt Neal
greetings,

i've been running with a freebsd 6.1 system for a few days and i'm
having some oddities when trying to build a cross compiler on the
system.

the first issue that shows is:

In file included from archive.c:132:
sysdep.h:173:21: libintl.h: No such file or directory

this comes from the libintl.h being located in /usr/local/include
instead of /usr/include.  a simple modification to the CFLAGS as so:

export CFLAGS="-I /usr/local/include"

has resolved binutils building correctly.  a build of gcc shows the
same issue; however, gcc fails to build with the following error:

gcc -c   -I /usr/local/include -DIN_GCC -DCROSS_COMPILE  -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
-Wno-long-long-DHAVE_CONFIG_H-I. -I. -I. -I./. -I./../include
\
./config/i386/i386.c -o i386.o
./config/i386/i386.c:1033: error: `ix86_svr3_asm_out_constructor'
undeclared here (not in a function)
./config/i386/i386.c:1033: error: initializer element is not constant
./config/i386/i386.c:1033: error: (near initialization for
`targetm.asm_out.constructor')
./config/i386/i386.c:1033: error: initializer element is not constant
./config/i386/i386.c:1033: error: (near initialization for `targetm.asm_out')
./config/i386/i386.c:1033: error: initializer element is not constant
./config/i386/i386.c:1033: error: (near initialization for `targetm.sched')
./config/i386/i386.c:1033: error: initializer element is not constant
./config/i386/i386.c:1033: error: (near initialization for `targetm.calls')
./config/i386/i386.c: In function `ix86_file_end':
./config/i386/i386.c:4839: warning: implicit declaration of function
`ASM_DECLARE_FUNCTION_NAME'
gmake[1]: *** [i386.o] Error 1


both binutils and gcc are being built from the source from ftp.gnu.org
following along with
http://docs.freebsd.org/info/gcc/gcc.info.Cross-Compiler.html

i've not encountered this error before on the various linux systems so
i'm assuming it's something that i'm doing with being new to freebsd.
i've been able to compile the above code on my ubuntu system without
issue as well so i'm fairly certain it's something i'm screwing up on
freebsd.

bintuils 2.18 config string:
./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local

gcc 3.4.4 config string:
./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local
--program-suffix=""

thoughts?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"