Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2012 22:57:44 +0100
From:      Jeroen Hofstee <freebsd_arm@myspectrum.nl>
To:        Tim Kientzle <tim@kientzle.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: FreeBSD and BeagleBone
Message-ID:  <4F271258.2060203@myspectrum.nl>
In-Reply-To: <F72663A5-E7BA-43A3-9E34-F7EF7512775E@kientzle.com>
References:  <23CB6C35-9450-40BA-9FA3-37C44B328CA8@freebsd.org> <CABt%2Bj0mB4w==h_SQ4YyDM24_wGOjcdZDK9T1N3DqjSkap0VkQw@mail.gmail.com> <E8A24EBE-967D-44F8-A884-3207B3C6F0FE@bsdimp.com> <8042D895-3B3D-431E-ADCC-A150BDC838ED@kientzle.com> <CAGW5k5ahyaTest3L0NTe1t%2B%2BYBgpLMkWZNpp=GRyz%2Bg=nMcZLg@mail.gmail.com> <7E53112E-DE29-4145-B597-D39AA77252C5@kientzle.com> <E1RoGMT-000DkR-6a@groundzero.grondar.org> <AEF07CD1-6794-4F04-AF9C-938423FE919B@kientzle.com> <4F25D8F9.8040108@myspectrum.nl> <F72663A5-E7BA-43A3-9E34-F7EF7512775E@kientzle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/30/12 03:35, Tim Kientzle wrote:
> I might be able to come up with a workaround if I knew
> exactly what this option did.  The most recent
> docs on gcc.gnu.org (for GCC 4.6.2) only mention
> the -print-file-name=<library>  form.
>
> Can you point me to docs for this option?
>
> [jeroen@laptop_freebsd ~]$ gcc34 -print-file-name=include
Hi Tim, I can't. I took a pragmatic approach, looked what the eldk 
compiler did
and where it differed. Googled for it, and found some print-file-name 
related
bugs fixes and simple _assumed_ those where not included in the FreeBSD gcc,
and the cause of the problem.

That was wrong however... Document or not, gcc does report the base 
include dir,
where stdarg.h and friend live since at least 2006 on "common" gcc's.
Below some output of FreeBSD gcc's from the ports.

/usr/local/lib/gcc/i386-portbld-freebsd9.0/3.4.6/gcc/i386-portbld-freebsd9.0/3.4.6/include
[jeroen@laptop_freebsd ~]$ gcc42 -print-file-name=include
/usr/local/lib/gcc42/gcc/i386-portbld-freebsd9.0/4.2.5/include
[jeroen@laptop_freebsd ~]$ gcc44 -print-file-name=include
/usr/local/lib/gcc44/gcc/i386-portbld-freebsd9.0/4.4.7/include
[jeroen@laptop_freebsd ~]$ gcc47 -print-file-name=include
/usr/local/lib/gcc47/gcc/i386-portbld-freebsd9.0/4.7.0/include

# and the base version
[jeroen@laptop_freebsd ~]$ gcc -print-file-name=include
include

---
So I dug around a bit and came across:

arm-freebsd-gcc -dumpspecs

[port versions]
*startfile_prefix_spec:

[base gcc]
*startfile_prefix_spec:
/usr/lib/

[base arm-freebsd-gcc]
*startfile_prefix_spec:
/usr/arm-freebsd/usr/lib/

----
So based on the assumption that limits searching to the lib dir, I 
hacked it in:

cd /usr/arm-freebsd/usr/lib
ln -s ../include/

[jeroen@laptop_freebsd ~/u-boot]$ arm-freebsd-gcc -print-file-name=include
/usr/arm-freebsd/usr/lib/include

Compiling works as well (besides the -lc).

So the new question now is [afaic], what is startfile_prefix_spec and 
why is it set in the
base gcc and empty in the port versions.

I don't know the answer at this moment...

Regards,
Jeroen




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