0001-cross_makefile.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Fix cross-compilation issues
  2. - During target package compilation the host version of b_sortnl is
  3. needed.
  4. - Do not call a 'amiroot' program built for the target when
  5. cross-compiling. We're anyway not root, so simply remove the
  6. chown/chgrp dance.
  7. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. Index: b/Makefile.in
  10. ===================================================================
  11. --- a/Makefile.in
  12. +++ b/Makefile.in
  13. @@ -1853,7 +1853,7 @@
  14. configparam_data.c: $(srcdir)/config.table b_sortnl$(EXEEXT) genconfigparam_data.awk
  15. rm -f config.table.sorted
  16. - ./b_sortnl$(EXEEXT) <$(srcdir)/config.table >config.table.sorted
  17. + ./b_sortnl_host$(EXEEXT) <$(srcdir)/config.table >config.table.sorted
  18. $(AWK) -f $(srcdir)/genconfigparam_data.awk <config.table.sorted >$@ \
  19. || { rm -f $@ ; false ; }
  20. @@ -1868,13 +1868,7 @@
  21. install-data-hook:
  22. $(INSTALL) -d -m 02770 $(DESTDIR)$(SPOOLDIR)
  23. $(INSTALL) -d -m 02770 $(DESTDIR)$(SPOOLDIR)/leaf.node
  24. - -./amiroot && chown $(RUNAS_USER) $(DESTDIR)$(SPOOLDIR)
  25. - -./amiroot && chown $(RUNAS_USER) $(DESTDIR)$(SPOOLDIR)/leaf.node
  26. - -./amiroot && chgrp $(RUNAS_GROUP) $(DESTDIR)$(SPOOLDIR)
  27. - -./amiroot && chgrp $(RUNAS_GROUP) $(DESTDIR)$(SPOOLDIR)/leaf.node
  28. rm -f $(DESTDIR)$(sbindir)/leafnode-version # now in $(bindir)
  29. - ./amiroot && p=$(DESTDIR)$(bindir)/newsq && chown 0 $$p \
  30. - && chgrp $(RUNAS_GROUP) $$p && chmod 2111 $$p ; true
  31. @echo
  32. @echo "### If upgrading from leafnode before 1.6,"
  33. @echo "### run: make update"