>> Doesn't the clang driver already search for gcc libraries installed next to 
>> it?
>
> In my experiment, the clang will found the gcc toolchain if
> GCC_INSTALL_PREFIX is not set even the install folder is relocated,
> but not work when GCC_INSTALL_PREFIX is set during cross-compilation
> :(
> And here is no standard path for place libraries and header for a
> cross-compilation gcc. so the clang can't find that.
>
> The sysroot part is not work fine both on DEFAULT_SYSROOT set or not
> set during cross-compilation.

Sorry, not sure I follow. Why doesn't:

../gcc/configure --prefix=/toolchain/install/dir --host=..
--target=... --build=...
...
../llvm/configure --prefix=/toolchain/install/dir

produce a relocatable build like you want?

>> If you need it to be in a subfolder or something, I would prefer to add 
>> support for GCC_INSTALL_PREFIX being a relative path, so that you can build 
>> with something like
>>
>> configure --with-gcc-toolchain=../relative/gcc/install/dir/
>>
>> instead of doing prefix match at runtime.
>
> Configure with the relative path I think it's not instinct enough,
> which ones upper folder, clang or install path?
>
> Here is almost no run-time overhead if GCC_INSTALL_PREFIX and
> DEFAULT_SYSROOT is not set.

The problem is not so much the overhead, is the code doing something
different depending on GCC_INSTALL_PREFIX overlapping or not with the
install directory.

what about something like
--with-gcc-toolchain='$prefix/../relative/gcc/dir'? $prefix would then
be replaced at runtime with where clang is installed. Without $prefix
an absolute path is still assumed.

Cheers,
Rafael
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to