Skip to contentSkip to conversation

package/ntpsec: fix compile issue for some toolchains

PATCH Applied Waldemar Brodkorb 3 participants 3 messages Aug 13, 2023 – Aug 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/ntpsec: fix compile issue for some toolchains

Ntpsec unconditionally uses PIE to compile code. This breaks compilation for at least microblaze-uclibc and m68k-uclibc toolchains.

It would be better to add a configure option to allow to disable pie support, but this is something for an waf expert.

When accepted, should be backported to older releases of Buildroot.

Fixes:
- http://autobuild.buildroot.net/results/77f/77f4e4065874d022a2ae98d82508242f551e224c
- http://autobuild.buildroot.net/results/e45/e45b65f2aa323df075d54ff43b0401b5ac7c6eb5

---
 package/ntpsec/0003-disable-PIE-support.patch | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/ntpsec/0003-disable-PIE-support.patch
package/ntpsec/0003-disable-PIE-support.patch new file +26 -0
new file mode 100644
index 0000000000..64eb559de0
@@ -0,0 +1,26 @@
+From 712675fbd2a736df817fecd7bfb39055946ef85b Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <[email protected]>
+Date: Sun, 13 Aug 2023 13:48:03 +0200
+Subject: [PATCH] disable PIE support
+
+Signed-off-by: Waldemar Brodkorb <[email protected]>
+Upstream: N/A Not upstreamable
+---
+ wscript | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index 292e3a45b..105c7eac2 100644
+--- a/wscript
++++ b/wscript
+@@ -299,7 +299,6 @@ def configure(ctx):
+ 
+     cc_test_flags = [
+         ('PIC', '-fPIC'),
+-        ('PIE', '-pie -fPIE'),
+         # this quiets most of macOS warnings on -fpie
+         ('unused', '-Qunused-arguments'),
+         # This is a useless warning on any architecture with a barrel
+-- 
+2.39.2
+
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 3 lines · Waldemar Brodkorb

Ntpsec unconditionally uses PIE to compile code. This breaks compilation for at least microblaze-uclibc and m68k-uclibc toolchains.

Also, in Buildroot we anyway have BR2_PIC_PIE to handle this appropriately
according to toolchain capabilities.

Quoted 11 lines

It would be better to add a configure option to allow to disable pie support, but this is something for an waf expert.

When accepted, should be backported to older releases of Buildroot.

Fixes:
- http://autobuild.buildroot.net/results/77f/77f4e4065874d022a2ae98d82508242f551e224c
- http://autobuild.buildroot.net/results/e45/e45b65f2aa323df075d54ff43b0401b5ac7c6eb5

Applied to master, thanks.

Regards,
Arnout

Quoted 27 lines
---
  package/ntpsec/0003-disable-PIE-support.patch | 26 +++++++++++++++++++
  1 file changed, 26 insertions(+)

create mode 100644 package/ntpsec/0003-disable-PIE-support.patch

package/ntpsec/0003-disable-PIE-support.patch new file +16 -0
new file mode 100644
index 0000000000..64eb559de0
@@ -0,0 +1,26 @@
+From 712675fbd2a736df817fecd7bfb39055946ef85b Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <[email protected]>
+Date: Sun, 13 Aug 2023 13:48:03 +0200
+Subject: [PATCH] disable PIE support
+
+Signed-off-by: Waldemar Brodkorb <[email protected]>
+Upstream: N/A Not upstreamable
+---
+ wscript | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index 292e3a45b..105c7eac2 100644
+--- a/wscript
++++ b/wscript
+@@ -299,7 +299,6 @@ def configure(ctx):

package/ntpsec/0003-disable-PIE-support.patch line 26

Quoted 10 lines
package/ntpsec/0003-disable-PIE-support.patch new file +10 -0
+
+     cc_test_flags = [
+         ('PIC', '-fPIC'),
+-        ('PIE', '-pie -fPIE'),
+         # this quiets most of macOS warnings on -fpie
+         ('unused', '-Qunused-arguments'),
+         # This is a useless warning on any architecture with a barrel
+--
+2.39.2
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle via buildroot <[email protected]> writes:

Quoted 3 lines · Waldemar Brodkorb

Ntpsec unconditionally uses PIE to compile code. This breaks compilation for at least microblaze-uclibc and m68k-uclibc toolchains.

Also, in Buildroot we anyway have BR2_PIC_PIE to handle this appropriately according to toolchain capabilities.

Quoted 8 lines

It would be better to add a configure option to allow to disable pie support,
but this is something for an waf expert.
When accepted, should be backported to older releases of Buildroot. Fixes:
- http://autobuild.buildroot.net/results/77f/77f4e4065874d022a2ae98d82508242f551e224c
- http://autobuild.buildroot.net/results/e45/e45b65f2aa323df075d54ff43b0401b5ac7c6eb5

Quoted 1 line

Applied to master, thanks.

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot