Date: Tue, 29 Jul 2008 23:07:48 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Wyatt Neal <wyattnealster@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: difficulty building a cross-compiler with a fresh install Message-ID: <20080730040748.GD38660@dan.emsphone.com> In-Reply-To: <437096a00807291747k4f524f78h148ecd88704060ad@mail.gmail.com> References: <437096a00807291747k4f524f78h148ecd88704060ad@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080730040748.GD38660>