Building crossgcc rpms (as non-root)
Daniel Kegel
dank@kegel.com
Fri Mar 19 21:20:00 GMT 2004
Charlie Brady wrote:
> The standard practice for building RPMs as non-root is to use a BuildRoot
> - a sandbox into which one installs files before packaging. It's
> essentially a chroot area. There's two reasons for doing this - one is
> security (as non-root, you don't have permission to write to the final
> file location), and the other is because you don't want to pollute your
> build system's file system.
>
> The process for building a gcc cross-compiler is (IIUC):
>
> 1. Configure, build and install binutils
> 2. Build a bootstrap-compiler
> 3. Build and install header files and glibc
> 4. Build and install gcc
> ...
>
> Step 4 is where things always go wrong for me. The build of gcc proper
> always fails because it can't find the include files built in Step 3,
> because they have not yet been installed in their final location.
>
> Does anyone know the correct magic incantation? Is there a way to
> configure a gcc build with separate "include files are here at the moment"
> and "include files will be here at run time" locations? Ditto for
> libraries/startup objects.
Check out this .spec file, which seems to successfully do what you want
(unless I'm confused) for one particular instance of a crosstool-generated
gcc/glibc combination:
http://kegel.com/crosstool/current/contrib/crosstool-mipsel.spec
- Dan
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list