* [Buildroot] [PATCH 1/1] Allow musl to build with new binutils
@ 2017-09-24 22:20 Timothy Lee
2017-09-25 21:18 ` Arnout Vandecappelle
0 siblings, 1 reply; 4+ messages in thread
From: Timothy Lee @ 2017-09-24 22:20 UTC (permalink / raw)
To: buildroot
New binutils cannot build musl-1.1.16 due to breakage in arm atomics asm. This
patch from upstream musl repository is needed until musl-1.1.17 is released:
https://git.musl-libc.org/cgit/musl/commit/?id=b261a24256792177a5f0531dbb25cc6267220ca5
Signed-off-by: Timothy Lee <timothy.ty.lee@gmail.com>
---
.../0002-arm-atomics-asm-with-new-binutils.patch | 40 ++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 package/musl/0002-arm-atomics-asm-with-new-binutils.patch
diff --git a/package/musl/0002-arm-atomics-asm-with-new-binutils.patch b/package/musl/0002-arm-atomics-asm-with-new-binutils.patch
new file mode 100644
index 0000000000..f0ad408687
--- /dev/null
+++ b/package/musl/0002-arm-atomics-asm-with-new-binutils.patch
@@ -0,0 +1,40 @@
+From b261a24256792177a5f0531dbb25cc6267220ca5 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Wed, 15 Feb 2017 17:05:50 -0500
+Subject: fix build regression in arm atomics asm with new binutils
+
+binutils commit bada43421274615d0d5f629a61a60b7daa71bc15 tightened
+immediate fixup handling in gas in such a way that the final .arch of
+an object file must be compatible with the fixups used when the
+instruction was assembled; this in turn broke assembling of atomics.s,
+at least in thumb mode.
+
+it's not clear whether this should be considered a bug in gas, but
+.object_arch is preferable anyway for our purpose here of controlling
+the ISA level tag on the object file being produced, and it's the
+intended directive for use in object files with runtime code
+selection. research by Szabolcs Nagy confirmed that .object_arch is
+supported in all relevant versions of binutils and clang's integrated
+assembler.
+
+patch by Reiner Herrmann.
+---
+ src/thread/arm/atomics.s | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/thread/arm/atomics.s b/src/thread/arm/atomics.s
+index 202faa4..101ad39 100644
+--- a/src/thread/arm/atomics.s
++++ b/src/thread/arm/atomics.s
+@@ -84,7 +84,7 @@ __a_gettp_cp15:
+ bx lr
+
+ /* Tag this file with minimum ISA level so as not to affect linking. */
+-.arch armv4t
++.object_arch armv4t
+ .eabi_attribute 6,2
+
+ .data
+--
+cgit v0.11.2
+
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] Allow musl to build with new binutils
2017-09-24 22:20 [Buildroot] [PATCH 1/1] Allow musl to build with new binutils Timothy Lee
@ 2017-09-25 21:18 ` Arnout Vandecappelle
2017-09-26 6:04 ` [Buildroot] [PATCH 1/1] Allow musl for ARMv4 " Timothy Lee
0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2017-09-25 21:18 UTC (permalink / raw)
To: buildroot
Hi Timothy,
Looks good, but one major problem below that will require a respin: you need to
add your Signed-off-by to the patch.
On 25-09-17 00:20, Timothy Lee wrote:
> New binutils cannot build musl-1.1.16 due to breakage in arm atomics asm. This
Can you specify which binutils version that is? Based on the log message below
it would be 2.28.
> patch from upstream musl repository is needed until musl-1.1.17 is released:
> https://git.musl-libc.org/cgit/musl/commit/?id=b261a24256792177a5f0531dbb25cc6267220ca5
>
> Signed-off-by: Timothy Lee <timothy.ty.lee@gmail.com>
> ---
> .../0002-arm-atomics-asm-with-new-binutils.patch | 40 ++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
> create mode 100644 package/musl/0002-arm-atomics-asm-with-new-binutils.patch
>
> diff --git a/package/musl/0002-arm-atomics-asm-with-new-binutils.patch b/package/musl/0002-arm-atomics-asm-with-new-binutils.patch
> new file mode 100644
> index 0000000000..f0ad408687
> --- /dev/null
> +++ b/package/musl/0002-arm-atomics-asm-with-new-binutils.patch
> @@ -0,0 +1,40 @@
> +From b261a24256792177a5f0531dbb25cc6267220ca5 Mon Sep 17 00:00:00 2001
> +From: Rich Felker <dalias@aerifal.cx>
> +Date: Wed, 15 Feb 2017 17:05:50 -0500
> +Subject: fix build regression in arm atomics asm with new binutils
> +
> +binutils commit bada43421274615d0d5f629a61a60b7daa71bc15 tightened
> +immediate fixup handling in gas in such a way that the final .arch of
> +an object file must be compatible with the fixups used when the
> +instruction was assembled; this in turn broke assembling of atomics.s,
> +at least in thumb mode.
> +
> +it's not clear whether this should be considered a bug in gas, but
> +.object_arch is preferable anyway for our purpose here of controlling
> +the ISA level tag on the object file being produced, and it's the
> +intended directive for use in object files with runtime code
> +selection. research by Szabolcs Nagy confirmed that .object_arch is
> +supported in all relevant versions of binutils and clang's integrated
> +assembler.
> +
> +patch by Reiner Herrmann.
Just like in the patch itself, you need to add your Signed-off-by here. This
is a short way for you to assert that you are entitled to contribute the patch
under the package license.
> +---
> + src/thread/arm/atomics.s | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/thread/arm/atomics.s b/src/thread/arm/atomics.s
> +index 202faa4..101ad39 100644
> +--- a/src/thread/arm/atomics.s
> ++++ b/src/thread/arm/atomics.s
> +@@ -84,7 +84,7 @@ __a_gettp_cp15:
> + bx lr
> +
> + /* Tag this file with minimum ISA level so as not to affect linking. */
> +-.arch armv4t
> ++.object_arch armv4t
I was surprised that this problem was not discovered in
http://toolchains.free-electrons.com/ but I guess that's because the problem
only applies to ARMv4 and no ARMv4 toolchains are built. Maybe add to the commit
log that this is only for ARMv4.
Regards,
Arnout
> + .eabi_attribute 6,2
> +
> + .data
> +--
> +cgit v0.11.2
> +
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] Allow musl for ARMv4 to build with new binutils
2017-09-25 21:18 ` Arnout Vandecappelle
@ 2017-09-26 6:04 ` Timothy Lee
2017-10-08 14:00 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Timothy Lee @ 2017-09-26 6:04 UTC (permalink / raw)
To: buildroot
New binutils (since 2.27.51) cannot build musl-1.1.16 due to breakage in ARMv4
atomics asm. This patch from upstream musl repository is needed until
musl-1.1.17 is released:
https://git.musl-libc.org/cgit/musl/commit/?id=b261a24256792177a5f0531dbb25cc6267220ca5
Signed-off-by: Timothy Lee <timothy.ty.lee@gmail.com>
---
.../0002-arm-atomics-asm-with-new-binutils.patch | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 package/musl/0002-arm-atomics-asm-with-new-binutils.patch
diff --git a/package/musl/0002-arm-atomics-asm-with-new-binutils.patch b/package/musl/0002-arm-atomics-asm-with-new-binutils.patch
new file mode 100644
index 0000000000..510c38a90d
--- /dev/null
+++ b/package/musl/0002-arm-atomics-asm-with-new-binutils.patch
@@ -0,0 +1,42 @@
+From b261a24256792177a5f0531dbb25cc6267220ca5 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Wed, 15 Feb 2017 17:05:50 -0500
+Subject: fix build regression in arm atomics asm with new binutils
+
+binutils commit bada43421274615d0d5f629a61a60b7daa71bc15 tightened
+immediate fixup handling in gas in such a way that the final .arch of
+an object file must be compatible with the fixups used when the
+instruction was assembled; this in turn broke assembling of atomics.s,
+at least in thumb mode.
+
+it's not clear whether this should be considered a bug in gas, but
+.object_arch is preferable anyway for our purpose here of controlling
+the ISA level tag on the object file being produced, and it's the
+intended directive for use in object files with runtime code
+selection. research by Szabolcs Nagy confirmed that .object_arch is
+supported in all relevant versions of binutils and clang's integrated
+assembler.
+
+patch by Reiner Herrmann.
+
+Signed-off-by: Timothy Lee <timothy.ty.lee@gmail.com>
+---
+ src/thread/arm/atomics.s | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/thread/arm/atomics.s b/src/thread/arm/atomics.s
+index 202faa4..101ad39 100644
+--- a/src/thread/arm/atomics.s
++++ b/src/thread/arm/atomics.s
+@@ -84,7 +84,7 @@ __a_gettp_cp15:
+ bx lr
+
+ /* Tag this file with minimum ISA level so as not to affect linking. */
+-.arch armv4t
++.object_arch armv4t
+ .eabi_attribute 6,2
+
+ .data
+--
+cgit v0.11.2
+
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] Allow musl for ARMv4 to build with new binutils
2017-09-26 6:04 ` [Buildroot] [PATCH 1/1] Allow musl for ARMv4 " Timothy Lee
@ 2017-10-08 14:00 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-10-08 14:00 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 26 Sep 2017 16:04:33 +1000, Timothy Lee wrote:
> New binutils (since 2.27.51) cannot build musl-1.1.16 due to breakage in ARMv4
> atomics asm. This patch from upstream musl repository is needed until
> musl-1.1.17 is released:
> https://git.musl-libc.org/cgit/musl/commit/?id=b261a24256792177a5f0531dbb25cc6267220ca5
>
> Signed-off-by: Timothy Lee <timothy.ty.lee@gmail.com>
> ---
> .../0002-arm-atomics-asm-with-new-binutils.patch | 42 ++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
> create mode 100644 package/musl/0002-arm-atomics-asm-with-new-binutils.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-08 14:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-24 22:20 [Buildroot] [PATCH 1/1] Allow musl to build with new binutils Timothy Lee
2017-09-25 21:18 ` Arnout Vandecappelle
2017-09-26 6:04 ` [Buildroot] [PATCH 1/1] Allow musl for ARMv4 " Timothy Lee
2017-10-08 14:00 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox