Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/ntp: fix aarch64/mips build, -fPIC required
Date: Sat, 13 May 2017 23:49:17 +0200	[thread overview]
Message-ID: <20170513214917.3305-1-romain.naour@gmail.com> (raw)

Add -fPIC to CFLAGS to avoid ntpsnmpd link issues with libntpq.a

Fixes:
[aarch64] http://autobuild.buildroot.net/results/866/866b1d28595efd8b6becf83d0a64b596538d58b0
[mips] http://autobuild.buildroot.net/results/c2a/c2a945855172970736a8ffea9c564f029a023344

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/ntp/ntp.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk
index cd6cb16..9b65c5e 100644
--- a/package/ntp/ntp.mk
+++ b/package/ntp/ntp.mk
@@ -20,6 +20,12 @@ NTP_CONF_OPTS = \
 	--disable-local-libevent \
 	--with-crypto
 
+# ntp build unconditionnaly some static libraries (libntpq.a, libntp.a etc...)
+# The build system fail to create ntpsnmpd while linking these libraries when
+# built without -fPIC.
+NTP_CONF_ENV += \
+	CFLAGS="-fPIC $(TARGET_CFLAGS)"
+
 # 0002-ntp-syscalls-fallback.patch
 NTP_AUTORECONF = YES
 
-- 
2.9.3

             reply	other threads:[~2017-05-13 21:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-13 21:49 Romain Naour [this message]
2017-05-17 19:48 ` [Buildroot] [PATCH] package/ntp: fix aarch64/mips build, -fPIC required Thomas Petazzoni
2017-05-18  9:02   ` Vicente Olivert Riera
2017-05-18  9:11     ` 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=20170513214917.3305-1-romain.naour@gmail.com \
    --to=romain.naour@gmail.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