On 16-11-2006 21:55:02 +0100, Michael Haubenwallner wrote:
>
> On Thu, 2006-11-16 at 19:57 +0100, Fabian Groffen wrote:
> <snip>
> > On OSX I we also compile the compilers with ${EPREFIX} iso
> > ${EPREFIX}/usr. The result is as follows:
> >
> > gcc version 4.0.1 (Apple Computer, Inc. build 5363)
> > /Library/Gentoo/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1 -quiet -v
> > -D__DYNAMIC__ test.c -fPIC -quiet -dumpbase test.c -auxbase test -version
> > -o /var/tmp//ccr9W1q0.s
>
> Maybe apple-gcc is different than fsf-gcc, but for me it looks like:
> *) gcc does not detect being moved, because it does not pass any
> "-iprefix" to cc1.
> *) there's no "-I" on original gcc-commandline.
>
> How exactly is that gcc configured (should be part of "gcc -v" output),
> and what commandline params did you use here ?
I made a simple test.c program:
#include <stdio.h>
#include <openssl/opensslv.h>
int main() {
printf("%s\n", OPENSSL_VERSION_TEXT);
}
which I compiled using gcc -v -o test test.c
gcc -v gives:
% gcc -v
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with:
/Library/Gentoo/var/tmp/portage/sys-devel/gcc-apple-4.0.1_p5363/work/gcc-5363/configure
--prefix=/Library/Gentoo/usr
--bindir=/Library/Gentoo/usr/powerpc-apple-darwin8/gcc-bin/4.0.1
--includedir=/Library/Gentoo/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include
--datadir=/Library/Gentoo/usr/share/gcc-data/powerpc-apple-darwin8/4.0.1
--mandir=/Library/Gentoo/usr/share/gcc-data/powerpc-apple-darwin8/4.0.1/man
--infodir=/Library/Gentoo/usr/share/gcc-data/powerpc-apple-darwin8/4.0.1/info
--with-gxx-include-dir=/Library/Gentoo/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include/g++-v4
--host=powerpc-apple-darwin8 --build=powerpc-apple-darwin8 --enable-nls
--without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++ --enable-shared
--enable-threads=posix --with-local-prefix=/Library/Gentoo
--with-as=/Library/Gentoo/usr/bin/as
--with-ld=/Library/Gentoo/usr/bin/ld
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5363)
I didn't recompile this one with correct --with-local-prefix yet,
because it takes a bloody century (ok, a bit shorter) and it seems to
work fine. Same for my Linux setup with gcc-4.1.1-r1, which showed kind
of the same output.
> > ignoring nonexistent directory "/Library/Gentoo/include"
> > ignoring nonexistent directory
> > "/Library/Gentoo/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../../powerpc-apple-darwin8/include"
> > ignoring nonexistent directory "/Library/Gentoo/Frameworks"
> > #include "..." search starts here:
> > #include <...> search starts here:
> > /Library/Gentoo/usr/include
> > /Library/Gentoo/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include
> > /usr/include
> > /System/Library/Frameworks
> > /Library/Frameworks
> > End of search list.
>
> Resulting path list good, but the nonexistent "/Library/Gentoo/include"
> seems to come from "--with-local-prefix=/Library/Gentoo" ?
Yep, 100% on that.
> > It looks like gcc is smart enough to try "/usr" instead or something. I
> > saw on other examples of the net people including the "include"
> > directory as well, which works for them, so I can imagine some fuzzy
> > stuff is going on there.
>
> Stuff becomes fuzzy when gcc erroneously detects being moved :-(
> And it's my daily job to shed light on fuzzy things :-)
The less fuzzyness we need/require/introduce, the best our software
works on all kind of platforms ;)
> > Conclusion: it's more correct, but doesn't change the behaviour of our
> > compilers for now. It seems we can drop the CPPFLAGS from profile.bashrc
>
> Exactly, dropping CPPFLAGS from profile.bashrc is what I intended,
> thanks!
>
> /haubi/
> PS: I've not finished playing with LDFLAGS/LD_RUN_PATH/LD_LIBRARY_PATH
> in profile.bashrc, but I'm unsure yet how to do it right.
> Can you 'emerge ncurses' with "-Wl,-R" in LDFLAGS ?
My Solaris setup is hosed, so I can't test there. On Linux this works
flawlessly. Tomorrow I hope to start my Solaris prefix over again.
--
Fabian Groffen
Gentoo on a different level
--
[EMAIL PROTECTED] mailing list