Mark Hatle wrote:
> Stanislav Brabec wrote:
> > - And finally gcc itself has no support for explicit -I and -L
> > redirection into sysroot.
> 
> -L=...
> 
> That is a built in option that allows redirect into the sysroot 
> automatically.  -L= is at least recognized by ld.
> 
> Our toolchains enable -I= as well.. but I don't believe the patch was 
> accepted by the upstream maintainers.

Yes, I know. But if you want to cross compile using an unmodified
sysroot enviroment and cross compiler, you will get into troubles
adding '=' to the output pkg-config, foo-config, automake check etc.

For pkg-config, it is possible to learn pkg-config itself to do it, but
if you need to embed pkg-config output to foo-config, you will get into
troubles.

IMHO nicer implementation would be:
"gcc -sysroot=/target -use-sysroot-in-include"

I tried to write a stupid bash wrapper on top of gcc, which was able to
do it. Using "export CC=/cross/bin/gcwrap", I was able to build
programs, that pass -I/usr/include/glib-2.0 to $CC.

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: [EMAIL PROTECTED]
Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/

_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to