self-contained cross-compiler?
Roman Duka
rduka@mail.ru
Tue Dec 16 17:03:00 GMT 2003
Ken Wolcott wrote:
> Hi Guys;
>
> Thanks for the suggestions...
>
> I placed LDFLAGS="-all-static" in the make for binutils and the following
> happened...why is it looking for i686-pc-linux-xxx tools instead of xxx?
>
> How do I fix this?
>
> Thanks,
> Ken
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ...
> + echo Build binutils
> Build binutils
> + mkdir -p build-binutils
> + cd build-binutils
> + test '!' -f Makefile
> +
> /tuba_local/static_cross_tools/build/arm-arm9-linux-gnu/gcc-3.2.1-glibc-2.3.1-binutils-2.14.90.0.7-linux-2.4.22/binutils-2.14.90.0.7/configure
> --target=ar
> m-arm9-linux-gnu
> --prefix=/tuba_local/static_cross_tools/result/arm-arm9-linux-gnu/gcc-3.2.1-glibc-2.3.1-binutils-2.14.90.0.7-linux-2.4.22
> creating cache ./config.cache
> checking host system type... i686-pc-linux-gnu
> checking target system type... arm-arm9-linux-gnu
> checking build system type... i686-pc-linux-gnu
> checking for a BSD compatible install... /usr/bin/install -c
> checking for i686-pc-linux-gnu-ar... no
> checking for ar... ar
> checking for i686-pc-linux-gnu-as... no
> checking for as... as
> checking for i686-pc-linux-gnu-dlltool... no
> checking for dlltool... dlltool
> checking for i686-pc-linux-gnu-ld... no
> checking for ld... ld
> checking for i686-pc-linux-gnu-nm... no
> checking for nm... nm
> checking for i686-pc-linux-gnu-ranlib... no
> checking for ranlib... ranlib
> checking for i686-pc-linux-gnu-windres... no
> checking for windres... windres
> checking for i686-pc-linux-gnu-objcopy... no
> checking for objcopy... objcopy
> checking for i686-pc-linux-gnu-objdump... no
> checking for objdump... objdump
> checking for arm-arm9-linux-gnu-ar... no
> checking for arm-arm9-linux-gnu-as... no
> checking for arm-arm9-linux-gnu-dlltool... no
> checking for arm-arm9-linux-gnu-ld... no
> checking for arm-arm9-linux-gnu-nm... no
> checking for arm-arm9-linux-gnu-ranlib... no
> checking for arm-arm9-linux-gnu-windres... no
> checking whether to enable maintainer-specific portions of Makefiles... no
> updating cache ./config.cache
> creating ./config.status
> creating Makefile
> + make LDFLAGS=-all-static all
> Configuring in libiberty
> configure: loading cache .././config.cache
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking for makeinfo... makeinfo
> checking for perl... perl
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking for i686-pc-linux-gnu-ar... ar
> checking for i686-pc-linux-gnu-ranlib... ranlib
> checking whether ln -s works... yes
> checking for i686-pc-linux-gnu-gcc... gcc
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking how to run the C preprocessor... gcc -E
> checking whether gcc and cc understand -c and -o together... yes
> checking for an ANSI C-conforming const... yes
> checking for inline... inline
> checking whether byte ordering is bigendian... no
> checking for a BSD-compatible install... (cached) /usr/bin/install -c
> checking for sys/file.h... yes
> checking for sys/param.h... yes
> checking for limits.h... yes
> checking for stdlib.h... yes
> checking for malloc.h... yes
> checking for string.h... yes
> checking for unistd.h... yes
> checking for strings.h... yes
> checking for sys/time.h... yes
> checking for time.h... yes
> checking for sys/resource.h... yes
> checking for sys/stat.h... yes
> checking for sys/mman.h... yes
> checking for fcntl.h... yes
> checking for alloca.h... yes
> checking for sys/pstat.h... no
> checking for sys/sysmp.h... no
> checking for sys/sysinfo.h... yes
> checking for machine/hal_sysinfo.h... no
> checking for sys/table.h... no
> checking for sys/sysctl.h... yes
> checking for sys/systemcfg.h... no
> checking for dlfcn.h... yes
> checking for sys/wait.h that is POSIX.1 compatible... yes
> checking whether time.h and sys/time.h may both be included... yes
> checking whether errno must be declared... no
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... (cached) yes
> checking for stdlib.h... (cached) yes
> checking for string.h... (cached) yes
> checking for memory.h... yes
> checking for strings.h... (cached) yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... (cached) yes
> checking for uintptr_t... yes
> checking whether weak symbol works... yes
> checking for library containing dlopen... configure: error: Link tests are not
> allowed after GCC_NO_EXECUTABLES.
> make: *** [configure-libiberty] Error 1
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> On Tuesday 16 December 2003 10:25, Roman Duka wrote:
>
>>Dan Kegel wrote:
>>
>>>By the way, if just linking -static doesn't work out, Ken might
>>>consider building his tools in the LSB build environment,
>>>assuming he can coax his users to load the LSB support package.
>>>- Dan
>>
>>i think Ken managed to build static gcc compiler, only binutils were
>>dynamically linked, that's because he used "LDFLAGS=-static" when
>>building binutils, which doesn't create all statically linked binutils,
>>he should use "LDFLAGS=-all-static" instead, when building binutils,
>>that should do the trick.
>>
>>
>>------
>>Want more information? See the CrossGCC FAQ,
>>http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to
>>crossgcc-unsubscribe@sources.redhat.com
>
>
>
>
don't edit Makefile, you need to edit script which runs the "configure"
and "make" commands
try the following sequence of lines when configuring and building
binutils (note: make sure to run "make configure-host" or a static build
will fail. Ref
http://linuxfromscratch.mirror.ac.uk/lfs/view/stable/chapter05/binutils-pass1.html)
configure --prefix=<yourprefix> <other_args> --disable-nls
make configure-host
make LDFLAGS="-all-static"
make install
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list