Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 552234

Summary: sys-process/criu fails to cross-compile
Product: Gentoo Linux Reporter: Kevin Cernekee <cernekee>
Component: [OLD] Core systemAssignee: Yixun Lan <dlan>
Status: RESOLVED FIXED    
Severity: normal CC: vapier, virtualization
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch v1

Description Kevin Cernekee 2015-06-15 22:32:08 UTC
Created attachment 405208 [details, diff]
patch v1

I am attaching a patch for the following issue:

This package failed cross-compilation for ARM on an amd64 build machine
for the following reasons:

1) The criu Makefile sets $ARCH based on the $(uname -m) output on the
build machine, so it tried to invoke the ARM cross compiler on amd64
assembly files.  We need to pass in a suitable $ARCH variable to
override this behavior.

2) On systems where ld.gold is the default linker, an internal linker
error was seen (crbug.com/500708).  While this is being investigated, we
can build criu using ld.bfd.

3) $OBJCOPY defaults to the native objcopy, and this also needs to be
overridden.
Comment 1 SpanKY gentoo-dev 2015-07-13 05:40:01 UTC
should be all set now in the tree; thanks for the report!

Commit message: Fix ARCH & OBJCOPY handling for cross-compiling
http://sources.gentoo.org/sys-process/criu/criu-1.6.ebuild?r1=1.1&r2=1.2
Comment 2 SpanKY gentoo-dev 2015-07-13 05:41:41 UTC
i've left out the gold->bfd hack for now.  CrOS is using binutils-2.24 and is in the process of moving to binutils-2.25.  we want to triage this a bit further i think before deploying workarounds ... and if we do decide to go that route, we'd never hardcode the ".bfd" suffix in ebuilds.  there's some gold helpers in toolchain-funcs so you can select the right value.