]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
ntp: add patch to fix -fPIC issue
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 17 May 2017 19:45:04 +0000 (21:45 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 17 May 2017 20:45:25 +0000 (22:45 +0200)
This commit adds a patch that fixes the build on AArch64 and MIPS of the
ntp package, which was caused by some parts of ntp being built without
-fPIC.

Fixes:

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

Thanks to Romain Naour for the initial analysis.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit 7fde83cdf0da338937dae13144eea2923e5c2730)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/ntp/0003-ntpq-fpic.patch [new file with mode: 0644]
package/ntp/ntp.mk

diff --git a/package/ntp/0003-ntpq-fpic.patch b/package/ntp/0003-ntpq-fpic.patch
new file mode 100644 (file)
index 0000000..6e05a67
--- /dev/null
@@ -0,0 +1,23 @@
+ntpq/Makefile.am: add NTP_HARD_CFLAGS
+
+Pass NTP_HARD_CFLAGS when building ntpq, like in all other ntp
+modules, to make sure -fPIC is passed.
+
+Originally taken from
+https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=494143c3b4921a5c8b8596d58f2c8b98296bf688.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/ntpq/Makefile.am
+===================================================================
+--- a/ntpq/Makefile.am
++++ b/ntpq/Makefile.am
+@@ -23,7 +23,7 @@
+ ntpq_LDADD += $(LDADD_NTP)
+ noinst_HEADERS=       ntpq.h
+ noinst_LIBRARIES=     libntpq.a
+-libntpq_a_CFLAGS=     -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
++libntpq_a_CFLAGS=     $(NTP_HARD_CFLAGS) -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
+ CLEANFILES=
+ DISTCLEANFILES=       .version version.c config.log $(man_MANS)
+ ETAGS_ARGS=   Makefile.am
index e3e53a803ffc7d9949703b6e57ec92d7a226950e..24403cf4f9de4a7617ad93c759f0ab1b5c7a0645 100644 (file)
@@ -21,6 +21,7 @@ NTP_CONF_OPTS = \
        --with-crypto
 
 # 0002-ntp-syscalls-fallback.patch
+# 0003-ntpq-fpic.patch
 NTP_AUTORECONF = YES
 
 ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)