[OE-core] how to hack cross-compilation into a single "plugins" directory?

Robert P. J. Day rpjday at crashcourse.ca
Tue Mar 21 13:23:22 UTC 2017


  i know this is simple, but if someone can point me at a recipe from
which i can copy and paste, that would be just ducky.

  cross-compiling recipe poptop for powerpc, source available here:

https://sourceforge.net/p/poptop/git/ci/master/tree/

  i found an old OE recipe here:

https://github.com/openembedded/openembedded/tree/master/recipes/poptop

wherein the recipe's do_install_append() routine contains the lines:

  # broken
  sed -ri "s,^[:space:]*logwtmp[:space:]*,# logwtmp," ${D}/${sysconfdir}/pptpd.conf
  rm -f ${D}${libdir}/pptpd/pptpd-logwtmp.so

well, there's a good reason that single plugin is "broken" ... because
the plugins/Makefile reads:

  CC	= gcc
  COPTS	= -O2 -g
  CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
  LDFLAGS	= -shared
  LDADD   = -lutil
  INSTALL	= install -o root
  prefix  = /usr/local

  PLUGINS = pptpd-logwtmp.so

  # include dependencies if present
  ifeq (.depend,$(wildcard .depend))
  include .depend
  endif

  all:	$(PLUGINS)

  %.so: %.c
	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)

... etc etc ... in short, no clue about cross-compiling -- the
generated plugin is, indeed, an x86-64 ELF executable, not powerpc.

  i'm sure i could tease out how to hack that Makefile, but is there
another recipe with a similar structure i could just steal a Makefile
from?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the Openembedded-core mailing list