(regarding my previous question about how to identify the toolchain for cross-compiling a src.rpm:) On Thu, 18 Dec 2003, Eli Carter wrote: > 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...) my thoughts exactly. until recently, i'd never had any need to cross- compile a source rpm, and it was just a touch frustrating that i couldn't find a recipe explaining how to do it. all of the standard documentation re: rpm praises the concept of a "src.rpm" file, from which you can rebuild the binary and, in passing, these same docs typically mention the possibility of building for another architecture. but that's as far as they go. as i mentioned, the "red hat rpm guide" has a section, "building for other platforms", which sounds promising, and mentions "--target" and at least mentions that you'll need a cross-compiler, but nowhere does it explain how to actually do this. that's a pretty glaring omission, it would seem. why introduce the idea of cross-compiling a source RPM unless you explain how to do it? rday _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list