Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Geoff Levand <geoff@infradead.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 5/6] package/flannel: Add BR2_TOOLCHAIN_HAS_THREADS
Date: Tue, 31 May 2016 13:47:52 -0700	[thread overview]
Message-ID: <1464727672.12343.16.camel@infradead.org> (raw)
In-Reply-To: <20160528154158.70f4f025@free-electrons.com>

Hi,

On Sat, 2016-05-28 at 15:41 +0200, Thomas Petazzoni wrote:
> There are still some issues with the flannel build:
> 
>   http://autobuild.buildroot.org/results/d98/d98e1857590738313a293b58f02230539bbaa405/build-end.log
> 
> The error is:
> 
> /home/buildroot/autobuild/run/instance-2/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find Scrt1.o: No such file or directory
> 
> My understanding is that this happens when trying to build PIE binaries
> that are statically linked. uClibc does not support that, or at least
> not with our current toolchain support. Would it be possible to not
> build PIE binaries with Go ? Or alternatively, investigate if it can be
> fixed in uClibc ?

Looking at the go sources, they force -pie when compiling cgo support
for ARM.  See line number 3188 in https://golang.org/src/cmd/go/build.go.

I think the only solution is to not build go packages that use cgo
when BR2_arm && BR2_TOOLCHAIN_USES_UCLIBC, so something like this:

+# cgo on ARM requires PIE linkage, which is not compatable with uClibc.
+comment "flannel is not available with uClibc-based toolchain on ARM architecture"
+       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+       depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_arm && BR2_TOOLCHAIN_USES_UCLIBC
+
 config BR2_PACKAGE_FLANNEL
        bool "flannel"
        depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
        depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on !(BR2_arm && BR2_TOOLCHAIN_USES_UCLIBC)
        help

If this looks OK, I'll submit a patch.

-Geoff

  parent reply	other threads:[~2016-05-31 20:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 18:21 [Buildroot] [PATCH v3 0/6] Fixes for go language support Geoff Levand
2016-05-26 18:21 ` [Buildroot] [PATCH v3 1/6] package/go: Build host tools with host CC Geoff Levand
2016-05-26 18:21 ` [Buildroot] [PATCH v3 2/6] package/go: Add HOST_GO_TARGET_ENV Geoff Levand
2016-05-26 18:21 ` [Buildroot] [PATCH v3 4/6] package/go: Add HOST_GO_CGO_ENABLED Geoff Levand
2016-05-26 19:14   ` Thomas Petazzoni
2017-10-03 10:05   ` Angelo Compagnucci
2016-05-26 18:21 ` [Buildroot] [PATCH v3 5/6] package/flannel: Add BR2_TOOLCHAIN_HAS_THREADS Geoff Levand
2016-05-26 19:15   ` Thomas Petazzoni
2016-05-28 13:41   ` Thomas Petazzoni
2016-05-28 15:50     ` Waldemar Brodkorb
2016-05-31 20:47     ` Geoff Levand [this message]
2016-05-31 20:56       ` Thomas Petazzoni
2016-06-05  7:00         ` Waldemar Brodkorb
2016-05-26 18:21 ` [Buildroot] [PATCH v3 3/6] package/flannel: Use HOST_GO_TARGET_ENV Geoff Levand
2016-05-26 18:21 ` [Buildroot] [PATCH v3 6/6] package/go: Set file timestamp Geoff Levand
2016-05-26 19:14 ` [Buildroot] [PATCH v3 0/6] Fixes for go language support Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464727672.12343.16.camel@infradead.org \
    --to=geoff@infradead.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox