Building crossgcc rpms (as non-root)
Toralf Lund
toralf@procaptura.com
Tue Mar 30 02:06:00 GMT 2004
Charlie Brady wrote:
>On Thu, 25 Mar 2004, Toralf Lund wrote:
>
>
>
>>Hmmm. I'm using newlib rather than glibc, but here's what I'm doing [
>>see attached spec file ]. This is essentially the crosstool script that
>>should be familiar to anyone on this list, reformatted into an rpm spec.
>>Use --target to specify the platform. I'm mainly using --target
>>m68k-coff and --target arm-coff.
>>
>>
>
>Thanks for taking the time to follow up.
>
>I'm curious about this bit of %build:
>
>...
>mkdir build-binutils; cd build-binutils
>../%{_binutils}/configure --target=%{cross_target} --prefix=%{_prefix} \
> 2>&1 | tee configure.log
>make all install 2>&1 | tee make.log
>make prefix=%{buildroot}%{_prefix} install 2>&1 | tee -a make.log
>...
>
>Won't the "make all install" try to write into %{_prefix}? The "install"
>is a mistake, no?
>
>
Yes. I don't know how that got there ;-/ Errors at this point will in
practice be ignored, though, so the rpm is still built successfully.
>I'm also curious about:
>
>export PATH=${PATH}:%{buildroot}%{_prefix}/bin
>
>Shouldn't that be:
>
>export PATH=%{buildroot}%{_prefix}/bin:${PATH}
>
>
You are probably right. That would make sure that the binutils etc. just
built would always be used in the subsequent steps, even if a version of
the cross compiler was installed already. Notice, however, that the
build system will always look for versions that are specific to the
cross compile target host, of these tools, so variants for other
platforms that may be installed will not be allowed to interfere.
Thanks for pointing this out.
>--
>Charlie
>
>A: Because we read from top to bottom, left to right.
>Q: Why should i start my reply below the quoted text?
>
>
>------
>Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
>Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
>
>
>
------
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