cross compilation: enable cross compilation of i386 kernel on x86-64 … #1613

Merged
merged 3 commits into from Oct 20, 2017

Conversation

Projects
None yet
4 participants
Contributor

piso77 commented Oct 12, 2017

…hosts

Signed-off-by: Paolo Pisati paolo.pisati@canonical.com


Fixes: bug 1563363

Paolo Pisati and others added some commits Oct 12, 2017

@kalikiana kalikiana self-requested a review Oct 13, 2017

Nice trick there!

Thanks for looking into this.

snapcraft/_options.py
+ # to start the build
+ if (self.__platform_arch == 'x86_64' and
+ self.__target_machine == 'i686'):
+ return
@kyrofa

kyrofa Oct 13, 2017

Member

This doesn't just apply to the kernel though, right? Do the other build systems handle this appropriately? @kalikiana that may be a question for you.

@kalikiana

kalikiana Oct 13, 2017

Collaborator

It's only used by the kbuild plugin which the kernel plugin subclasses afair. Nothing else uses that value.

@kalikiana

kalikiana Oct 13, 2017

Collaborator

self.project.arch_triplet is used elsewhere - it may be something to consider for the future if it should be re-used in other places, I don't recall if there was a specific reason for this.

@kyrofa

kyrofa Oct 13, 2017

Member

Alright, +1 then.

@sergiusens

sergiusens Oct 18, 2017

Collaborator

shouldn't this return '' instead of None?

@kalikiana

kalikiana Oct 19, 2017

Collaborator

Either one is good. But as this came up twice, I changed it to ''.

snapcraft/_options.py
+ # to start the build
+ if (self.__platform_arch == 'x86_64' and
+ self.__target_machine == 'i686'):
+ return
@kyrofa

kyrofa Oct 13, 2017

Member

This doesn't just apply to the kernel though, right? Do the other build systems handle this appropriately? @kalikiana that may be a question for you.

@kalikiana

kalikiana Oct 13, 2017

Collaborator

It's only used by the kbuild plugin which the kernel plugin subclasses afair. Nothing else uses that value.

@kalikiana

kalikiana Oct 13, 2017

Collaborator

self.project.arch_triplet is used elsewhere - it may be something to consider for the future if it should be re-used in other places, I don't recall if there was a specific reason for this.

@kyrofa

kyrofa Oct 13, 2017

Member

Alright, +1 then.

@sergiusens

sergiusens Oct 18, 2017

Collaborator

shouldn't this return '' instead of None?

@kalikiana

kalikiana Oct 19, 2017

Collaborator

Either one is good. But as this came up twice, I changed it to ''.

the types match now!

@sergiusens sergiusens added this to the 2.35 milestone Oct 20, 2017

@sergiusens sergiusens merged commit 2cfbee8 into snapcore:master Oct 20, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

elopio added a commit to elopio/snapcraft that referenced this pull request Oct 23, 2017

cross compilation: enable cross compilation of i386 kernel on x86-64 … (
#1613)

LP: #1563363
Fixes #1437 

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment