From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] package/runc: disable for static only build
Date: Fri, 8 Jul 2016 21:47:12 +0200 [thread overview]
Message-ID: <20160708214712.30976a76@free-electrons.com> (raw)
In-Reply-To: <1467916777-29220-3-git-send-email-romain.naour@gmail.com>
Hello,
On Thu, 7 Jul 2016 20:39:37 +0200, Romain Naour wrote:
> When build statically, runc try to link against Scrt1.o which is not
> provided by a toolchain for static build only.
>
> [...]arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find Scrt1.o: No such file or directory
> collect2: error: ld returned 1 exit status
>
> Add the reverse dependency on docker-containerd.
>
> Remove the static case handling for runc.
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Christian Stewart <christian@paral.in>
I believe this only happens on ARM, because on ARM, Go forces the use
of -pie, for some reason:
pie := (goarch == "arm" && goos == "linux") || goos == "android"
if pie { // we need to use -pie for Linux/ARM to get accurate imported sym
cgoLDFLAGS = append(cgoLDFLAGS, "-pie")
}
And static linking + PIE isn't supported by uClibc. But on
architectures other than ARM, I believe Go doesn't use -pie, so static
linking with uClibc should work (remains to be tested, though).
For this reason, I believe your patch is not correct as it disables Go
packages for static linking on all architectures, while only ARM is
affected by this problem.
This is yet another situation which makes me think we should add a
"BR2_TOOLCHAIN_SUPPORTS_PIE" hidden boolean.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-07-08 19:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 18:39 [Buildroot] [PATCH 1/3] package/runc: use BR_PATH to find pkg-config Romain Naour
2016-07-07 18:39 ` [Buildroot] [PATCH 2/3] package/runc: fix shared only build when libseccomp is enabled Romain Naour
2016-07-08 19:27 ` Thomas Petazzoni
2016-07-08 19:32 ` Christian Stewart
2016-07-08 19:50 ` Thomas Petazzoni
2016-07-08 19:55 ` Christian Stewart
2016-07-11 9:47 ` Thomas Petazzoni
2016-07-13 21:18 ` Romain Naour
2016-07-24 14:45 ` Thomas Petazzoni
2016-07-07 18:39 ` [Buildroot] [PATCH 3/3] package/runc: disable for static only build Romain Naour
2016-07-08 19:47 ` Thomas Petazzoni [this message]
2016-07-24 14:49 ` Thomas Petazzoni
2016-07-08 19:22 ` [Buildroot] [PATCH 1/3] package/runc: use BR_PATH to find pkg-config Thomas Petazzoni
-- strict thread matches above, loose matches on Subject: below --
2016-07-07 18:45 [Buildroot] [PATCH 3/3] package/runc: disable for static only build Romain Naour
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=20160708214712.30976a76@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--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