Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 2009 09:24:21 -0700
From:      Steve Franks <bahamasfranks@gmail.com>
To:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Cc:        Stanislav Sedov <stas@freebsd.org>
Subject:   Fixed: Re: another cross-gcc question ("can't compute suffix of  object files")
Message-ID:  <539c60b90906150924v6c199b28h10e7ed866a063418@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
On Fri, Jun 12, 2009 at 9:48 AM, Steve Franks<bahamasfranks@gmail.com> wrot=
e:
> Sorry to be such a pest, =A0I'm trying to go from being a good hardware
> programmer to a good OS programmer, but there's alot to pick up to be
> FreeBSD proficient...
>
> Can't seem to do a vanilla cross-gcc on my home system, which works
> fine on my work machine, both of them are recent 7.2 installs...
>
> I don't even know what other info would be needed to track this down.
> My machine is pretty much useless without an arm compiler - that's
> what I do for work.
>
> Best,
> Steve
>
> [steve@terra /usr/ports/devel/cross-gcc]$ sudo make
> MULTILIB_OPTIONS=3D"mno-thumb-interwork/mthumb-interwork"
> MULTILIB_DIRNAMES=3D"normal interwork" TGTARCH=3Darm TGTABI=3Delf
> WITH_FLOAT_TYPE=3Dsoft install
>
> ...
>
> gmake[2]: Leaving directory `/usr/ports/devel/cross-gcc/work/build/gcc'
> Checking multilib configuration for libgcc...
> mkdir arm-elf
> mkdir arm-elf/libgcc
> Configuring in arm-elf/libgcc
> checking for --enable-version-specific-runtime-libs... no
> checking for a BSD-compatible install... /usr/bin/install -c -o root -g w=
heel
> checking for gawk... gawk
> checking build system type... i386-portbld-freebsd7.2
> checking host system type... arm-unknown-elf
> checking for arm-elf-ar... /usr/local/arm-elf/bin/ar
> checking for arm-elf-lipo... arm-elf-lipo
> checking for arm-elf-nm... /usr/ports/devel/cross-gcc/work/build/./gcc/nm
> checking for arm-elf-ranlib... /usr/local/arm-elf/bin/ranlib
> checking for arm-elf-strip... /usr/local/arm-elf/bin/strip
> checking whether ln -s works... yes
> checking for arm-elf-gcc...
> /usr/ports/devel/cross-gcc/work/build/./gcc/xgcc
> -B/usr/ports/devel/cross-gcc/work/build/./gcc/ -nostdinc
> -B/usr/ports/devel/cross-gcc/work/build/arm-elf/newlib/ -isystem
> /usr/ports/devel/cross-gcc/work/build/arm-elf/newlib/targ-include
> -isystem /usr/ports/devel/cross-gcc/work/gcc-4.3.2/newlib/libc/include
> -B/usr/ports/devel/cross-gcc/work/build/arm-elf/libgloss/arm
> -L/usr/ports/devel/cross-gcc/work/build/arm-elf/libgloss/libnosys
> -L/usr/ports/devel/cross-gcc/work/gcc-4.3.2/libgloss/arm
> -B/usr/local/arm-elf/bin/ -B/usr/local/arm-elf/lib/ -isystem
> /usr/ports/devel/cross-gcc/work/build/./gcc -isystem
> /usr/local/arm-elf/include -isystem /usr/local/arm-elf/sys-include
> checking for suffix of object files... configure: error: cannot
> compute suffix of object files: cannot compile
> See `config.log' for more details.
> gmake[1]: *** [configure-target-libgcc] Error 1
> gmake[1]: Leaving directory `/usr/ports/devel/cross-gcc/work/build'
> gmake: *** [all] Error 2
> *** Error code 1
>
> Stop in /usr/ports/devel/cross-gcc.
> *** Error code 1
>
> Stop in /usr/ports/devel/cross-gcc.
> [steve@terra /usr/ports/devel/cross-gcc]$ which gcc
> /usr/bin/gcc
> [steve@terra /usr/ports/devel/cross-gcc]$ gcc --version
> gcc (GCC) 4.2.1 20070719 =A0[FreeBSD]
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. =A0There is=
 NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS=
E.
>
> [steve@terra /usr/ports/devel/cross-gcc]$
>

Did a fresh csup and make/build/install world, to no avail.

Figured out I had to export
LD_LIBRARY_PATH=3D/usr/local/lib:/usr/lib:/lib before the make command
and then it worked fine.  Don't know if I fubarred my system, or if
that's expected behavior, but the problem was that building libgcc
(soft floating point routines) couldn't find libmpfr ... the
opensolaris people report this issue all over google, with many gcc
versions.  I think they're one of the few dists besides bsd that uses
/usr/local instead of /usr for things.  Linux.  Bah.

Anyway, if someone else can confirm, I'll submit a pr, otherwise, I'll
just assume I did something dumb to my system along the way.  Haven't
had any problems building other ports with use libs in /usr/local/lib,
though (i.e. devel/urjtag uses /usr/local/lib/libftdi, methinks)

Best,
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?539c60b90906150924v6c199b28h10e7ed866a063418>