On 12 May 2013 14:23, Johannes Pfau <nos...@example.com> wrote: > I noticed that we do not have any sysroot handling in gdc yet. > > If gcc is build with --with-sysroot=SYSROOT certain libraries & > headers are not installed in PREFIX/lib but in SYSROOT/lib. At runtime > it is then possible to use the --sysroot=NEWPATH switch and the compiler > will then look for includes & library files in NEWPATH/ instead of in > SYSROOT/. This is often used for cross compilers so you can have one > compiler targeting different systems (for example with different libc > versions) by using different sysroots. > > The question here is mainly whether we want phobos & druntime to be > installed in the sysroot or whether we should treat them as belonging > to the compiler and always use the same, shipped libphobos, even if the > --sysroot switch is used. > > Right now we have some weird hybrid form: The libraries are in the > sysroot (x86_64-gdcproject-linux-gnu/sysroot/lib) but the includes are > not > > (x86_64-gdcproject-linux-gnu/lib/gcc/x86_64-gdcproject-linux-gnu/4.7.2/include/d2) >
I think there's nothing wrong with the rationale, they're shipped with the compiler, so they belong to the compiler. Another missing configure switch is: --with-gdc-include-dir Also need to remove the logic in Make-lang.in that decides on where phobos/druntime will be. It should all be configured. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';