This is the mail archive of the mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building crossgcc rpms (as non-root)

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:

- Dan

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]