FreeBSD and BeagleBone
Jeroen Hofstee
freebsd_arm at myspectrum.nl
Mon Jan 30 21:57:48 UTC 2012
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 at 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 at laptop_freebsd ~]$ gcc42 -print-file-name=include
/usr/local/lib/gcc42/gcc/i386-portbld-freebsd9.0/4.2.5/include
[jeroen at laptop_freebsd ~]$ gcc44 -print-file-name=include
/usr/local/lib/gcc44/gcc/i386-portbld-freebsd9.0/4.4.7/include
[jeroen at 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 at 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 at 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
More information about the freebsd-arm
mailing list