Fixed: Re: another cross-gcc question ("can't compute suffix of object files")

Steve Franks bahamasfranks at
Mon Jun 15 16:24:24 UTC 2009

On Fri, Jun 12, 2009 at 9:48 AM, Steve Franks<bahamasfranks at> wrote:
> Sorry to be such a pest,  I'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 at terra /usr/ports/devel/cross-gcc]$ sudo make
> MULTILIB_OPTIONS="mno-thumb-interwork/mthumb-interwork"
> MULTILIB_DIRNAMES="normal interwork" TGTARCH=arm TGTABI=elf
> WITH_FLOAT_TYPE=soft 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 wheel
> 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 at terra /usr/ports/devel/cross-gcc]$ which gcc
> /usr/bin/gcc
> [steve at terra /usr/ports/devel/cross-gcc]$ gcc --version
> gcc (GCC) 4.2.1 20070719  [FreeBSD]
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> [steve at 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=/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)


More information about the freebsd-questions mailing list