On 09/27/2011 02:23 AM, Pauli, David, MU wrote:
Hey,
> If you "file rpm/BUILD/libca-2.2/libcap/_makenames", you'll see its a
cross-compiled executabe, not compiled to run on the host.
The file is a 32Bit compiled for PowerPC or cisco 4500. The right one
for my board, which image should be made with LTIB. Should it be the
developer-system?
The problem is that the Makefile - in the process of building - executes
_makenames to create cap_names.h; _makenames needs to be built by the
host compiler, not the target compiler (i.e. by an x86 compiler instead
of the PPC compiler).
> If you modify the libcap.spec file to use "make HOSTCC="$BUILDCC ..."
Where should be the HOSTCC? I don’t know where to search.
In the Makefile where it compiles _makenames.c into _makenames, you need
to create a rule(s) to build/link with $(HOSTCC), not $(CC) as $(HOSTCC)
is the host compiler and $(CC) is the target compiler. Then in the
libcap.spec files in "%Build" sec you'll find a call to make. Add
'HOSTCC="$BUILDCC"' before the make target.
If you "grep BUILDCC `find dist/lfs-5.1 -name '*.spec'`" you'll see
plenty of examples where its used in other package .spec files...
--
Peter Barada
[email protected]
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib