(i emailed someone about this already but i figured i might as well embarrass myself in public.)
how can i simply cross compile a src rpm for PPC? i've got the new "red hat rpm guide", which makes perfect sense when it tells me that i can use "rpmbuild" and that i can specify "--target=" for the architecture ("ppc-linux"?). i was aware of that already.
it also tells me that i need the appropriate toolchain, which i have (in fact, i have two working PPC toolchains that have been cross-compiling programs nicely for a while, and a third toolchain that i'll be testing shortly.)
what it doesn't tell me is how i point "rpmbuild" at the appropriate
toolchain. surely i'm missing an obvious option. can i do this directly
via an option or env variable on the "rpmbuild" command, or do i have
to install the src rpm and "configure" and "make" in the source directory?
it's the first time i've actually tried to cross-compile an RPM, and i'm not finding how to identify my toolchain for this.
What I've done is modify the macros file to look like this:
%__ar %{_cross_compile}ar %__as %{_cross_compile}as %__cc %{_cross_compile}gcc %__cpp %{_cross_compile}gcc -E %__cxx %{_cross_compile}g++ %__ld %{_cross_compile}ld %__nm %{_cross_compile}nm %__objcopy %{_cross_compile}objcopy %__objdump %{_cross_compile}objdump %__ranlib %{_cross_compile}ranlib %__remsh %{__rsh} %__strip %{_cross_compile}strip %__size %{_cross_compile}size
And then run rpm with --define="_cross_compile arm-linux-" with my ARM Linux toolchain in my $PATH.
(It would be nice if something like this was in the mainline... ;) I suppose this could be improved to figure out what _cross_compile should be based on --target...)
HTH,
Eli --------------------. "If it ain't broke now, Eli Carter \ it will be soon." -- crypto-gram eli.carter(a)inet.com `-------------------------------------------------
------------------------------------------------------------------------ Confidentiality Notice: This e-mail transmission may contain confidential and/or privileged information that is intended only for the individual or entity named in the e-mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or reliance upon the contents of this e-mail message is strictly prohibited. If you have received this e-mail transmission in error, please reply to the sender, so that proper delivery can be arranged, and please delete the message from your computer. Thank you. Inet Technologies, Inc. ------------------------------------------------------------------------