mailing list of musl libc
 help / color / mirror / code / Atom feed
* thumb2 support
@ 2014-04-28  3:36 Stephen Thomas
  2014-04-28 12:06 ` Szabolcs Nagy
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Thomas @ 2014-04-28  3:36 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]

Hi
I have been playing around with buildroot and musl with x86_64 and arm (well thumb2 for an arm7 with soft floats). The x86_64 builds work very well with buildroot but I am having a bit of a problem replacing an uClibc build with musl when I have enabled thumb2 instructions. I have checked the documentation and I cannot find anything specific about thumb2 either working or not working, so therefore I will ask the list.
buildroot/output/host/usr/bin/arm-buildroot-linux-musleabi-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/arm -I./src/internal -I./include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector  -pipe -O2 -c -o src/exit/exit.o src/exit/exit.csrc/dirent/readdir_r.c:29:28: error: redefinition of 'readdir_r' LFS64_2(readdir_r, readdir64_r);
<deleted>Makefile:115: recipe for target 'src/dirent/scandir.o' failedmake: *** [src/dirent/scandir.o] Error 1{standard input}: Assembler messages:{standard input}:36: Error: thumb conditional instruction should be in IT block -- `strexeq r1,r0,[r2]'{standard input}:37: Error: thumb conditional instruction should be in IT block -- `teqeq r1,#1'
<deleted>
You can ignore the first error. That might be some gcc issue, but it would appear that the syscall is using arm instructions in arch/arm/atomic.h. Does anyone know if thumb2 is going to be supported? 
Cheers
Thomo


 		 	   		  

[-- Attachment #2: Type: text/html, Size: 2387 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-04-28  3:36 thumb2 support Stephen Thomas
@ 2014-04-28 12:06 ` Szabolcs Nagy
  2014-04-28 14:27   ` Rich Felker
  0 siblings, 1 reply; 12+ messages in thread
From: Szabolcs Nagy @ 2014-04-28 12:06 UTC (permalink / raw)
  To: musl

* Stephen Thomas <scjthm@live.com> [2014-04-28 04:36:01 +0100]:
> I have been playing around with buildroot and musl with x86_64 and arm (well thumb2 for an arm7 with soft floats). The x86_64 builds work very well with buildroot but I am having a bit of a problem replacing an uClibc build with musl when I have enabled thumb2 instructions. I have checked the documentation and I cannot find anything specific about thumb2 either working or not working, so therefore I will ask the list.
> buildroot/output/host/usr/bin/arm-buildroot-linux-musleabi-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/arm -I./src/internal -I./include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector  -pipe -O2 -c -o src/exit/exit.o src/exit/exit.csrc/dirent/readdir_r.c:29:28: error: redefinition of 'readdir_r' LFS64_2(readdir_r, readdir64_r);

how did -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE got into the cflags?
these do not make sense when building a libc

same for -D_FILE_OFFSET_BITS=64 but that's always a noop on musl so
at least it does not hurt

> <deleted>Makefile:115: recipe for target 'src/dirent/scandir.o' failedmake: *** [src/dirent/scandir.o] Error 1{standard input}: Assembler messages:{standard input}:36: Error: thumb conditional instruction should be in IT block -- `strexeq r1,r0,[r2]'{standard input}:37: Error: thumb conditional instruction should be in IT block -- `teqeq r1,#1'
> <deleted>
> You can ignore the first error. That might be some gcc issue, but it would appear that the syscall is using arm instructions in arch/arm/atomic.h. Does anyone know if thumb2 is going to be supported? 

i think this came up before
you need to use -marm for now


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-04-28 12:06 ` Szabolcs Nagy
@ 2014-04-28 14:27   ` Rich Felker
  2014-04-28 23:52     ` Stephen Thomas
  0 siblings, 1 reply; 12+ messages in thread
From: Rich Felker @ 2014-04-28 14:27 UTC (permalink / raw)
  To: musl

On Mon, Apr 28, 2014 at 02:06:31PM +0200, Szabolcs Nagy wrote:
> * Stephen Thomas <scjthm@live.com> [2014-04-28 04:36:01 +0100]:
> > I have been playing around with buildroot and musl with x86_64 and arm (well thumb2 for an arm7 with soft floats). The x86_64 builds work very well with buildroot but I am having a bit of a problem replacing an uClibc build with musl when I have enabled thumb2 instructions. I have checked the documentation and I cannot find anything specific about thumb2 either working or not working, so therefore I will ask the list.
> > buildroot/output/host/usr/bin/arm-buildroot-linux-musleabi-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/arm -I./src/internal -I./include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector  -pipe -O2 -c -o src/exit/exit.o src/exit/exit.csrc/dirent/readdir_r.c:29:28: error: redefinition of 'readdir_r' LFS64_2(readdir_r, readdir64_r);
> 
> how did -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE got into the cflags?
> these do not make sense when building a libc

They're probably from a CFLAGS setting that's getting passed to all
packages, and they should not be there. There's a widespread
misconception that these options are needed for 64-bit off_t. They're
not. They're purely for exposing the legacy foo64() functions.

> same for -D_FILE_OFFSET_BITS=64 but that's always a noop on musl so
> at least it does not hurt

Indeed, this one is no problem and should be in your system-wide
CFLAGS if you're using glibc, but with musl it's a no-op so it could
just as well be omitted.

> 
> > <deleted>Makefile:115: recipe for target 'src/dirent/scandir.o' failedmake: *** [src/dirent/scandir.o] Error 1{standard input}: Assembler messages:{standard input}:36: Error: thumb conditional instruction should be in IT block -- `strexeq r1,r0,[r2]'{standard input}:37: Error: thumb conditional instruction should be in IT block -- `teqeq r1,#1'
> > <deleted>
> > You can ignore the first error. That might be some gcc issue, but it would appear that the syscall is using arm instructions in arch/arm/atomic.h. Does anyone know if thumb2 is going to be supported? 
> 
> i think this came up before
> you need to use -marm for now

Yes, this is a regression we accidentally introduced in 1.1.0. I'd
like to fix it if someone with ARM knowledge can help. For now perhaps
the easiest way would be adding #if __THUMB__ or whatever to atomic.h
and writing a separate thumb version.

Rich


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: thumb2 support
  2014-04-28 14:27   ` Rich Felker
@ 2014-04-28 23:52     ` Stephen Thomas
  2014-04-29  0:56       ` Rich Felker
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Thomas @ 2014-04-28 23:52 UTC (permalink / raw)
  To: musl


[-- Attachment #1.1: Type: text/plain, Size: 1393 bytes --]




> On Mon, Apr 28, 2014 at 02:06:31PM +0200, Szabolcs Nagy wrote:> > > <deleted>Makefile:115: recipe for target 'src/dirent/scandir.o' failedmake: *** [src/dirent/scandir.o] Error 1{standard input}: Assembler messages:{standard input}:36: Error: thumb conditional instruction should be in IT block -- `strexeq r1,r0,[r2]'{standard input}:37: Error: thumb conditional instruction should be in IT block -- `teqeq r1,#1'> > > <deleted>
> > > You can ignore the first error. That might be some gcc issue, but it would appear that the syscall is using arm instructions in arch/arm/atomic.h. Does anyone know if thumb2 is going to be supported? 
> > 
> Yes, this is a regression we accidentally introduced in 1.1.0. I'd
> like to fix it if someone with ARM knowledge can help. For now perhaps
> the easiest way would be adding #if __THUMB__ or whatever to atomic.h
> and writing a separate thumb version.
> Rich

I remember that the old thumb didn't support the conditional instructions and was quite slow. I only care about thumb2 and am currently using gcc, so I attach a patch for the thumb that will only work for gcc . I think that gcc builds two versions of atomic so the ugly #define was needed. I cannot remember what rvct/rvds or whatever it is branded as these days uses, but from memory old versions didn't support the gnu assebmly syntax.

Cheers
Thomo


 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 1930 bytes --]

[-- Attachment #2: thumb2.patch --]
[-- Type: application/octet-stream, Size: 369 bytes --]

--- a/arch/arm/atomic.h	2014-04-16 08:31:27.000000000 +0000
+++ b/arch/arm/atomic.h	2014-04-28 23:14:51.344185884 +0000
@@ -39,7 +39,13 @@
 		"	" MEM_BARRIER "\n"
 		"1:	ldrex %0,%3\n"
 		"	subs %0,%0,%1\n"
+#if __thumb2__ 
+		"	IT eq\n"
+#endif
 		"	strexeq %0,%2,%3\n"
+#if __thumb2__ 
+		"	IT eq\n"
+#endif
 		"	teqeq %0,#1\n"
 		"	beq 1b\n"
 		"	" MEM_BARRIER "\n"

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-04-28 23:52     ` Stephen Thomas
@ 2014-04-29  0:56       ` Rich Felker
  2014-04-29  1:14         ` Stephen Thomas
  0 siblings, 1 reply; 12+ messages in thread
From: Rich Felker @ 2014-04-29  0:56 UTC (permalink / raw)
  To: musl

On Tue, Apr 29, 2014 at 12:52:36AM +0100, Stephen Thomas wrote:
> I remember that the old thumb didn't support the conditional
> instructions and was quite slow. I only care about thumb2 and am
> currently using gcc, so I attach a patch for the thumb that will

The code here is only used on armv6/v7. Do any such chips lack thumb2?
If there's any doubt, we could look at what gcc generates for the
__sync_* builtins in thumb mode.

> only work for gcc .

Why is it only for gcc?

> I think that gcc builds two versions of atomic

What do you mean by this?

> so the ugly #define was needed. I cannot remember what rvct/rvds or
> whatever it is branded as these days uses, but from memory old
> versions didn't support the gnu assebmly syntax.

All asm in musl is gas syntax so this is nothing new.

Rich


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: thumb2 support
  2014-04-29  0:56       ` Rich Felker
@ 2014-04-29  1:14         ` Stephen Thomas
  2014-04-29 16:09           ` Wermut
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Thomas @ 2014-04-29  1:14 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]

> On Tue, Apr 29, 2014 at 12:52:36AM +0100, Stephen Thomas wrote:
> > I remember that the old thumb didn't support the conditional
> > instructions and was quite slow. I only care about thumb2 and am
> > currently using gcc, so I attach a patch for the thumb that will
> 
> The code here is only used on armv6/v7. Do any such chips lack thumb2?
> If there's any doubt, we could look at what gcc generates for the
> __sync_* builtins in thumb mode.
> 
> > only work for gcc .
> 
> Why is it only for gcc?
I have only tested with gcc. I don't know what llvm nor armcc do.  Is there an ASM standard like ther is for C/C++/fortran? There is some good info on thumb here, https://wiki.ubuntu.com/ARM/Thumb2 and the various ways of supporting ARM. I guess that the thumb2 could be replaced by a __thumb__.  
> 
> > I think that gcc builds two versions of atomic
> 
> What do you mean by this?
I am building the native toolchain as I would like to run this on an embedded platform. My understanding is that when you build the toolchain you need to provide somethings that end up going in libgcc_s.so such as threading if you are using openmp in C++. etc etc. That patch works for both the -marm and -mthumb or whatever the thumb targets are.
> 
> > so the ugly #define was needed. I cannot remember what rvct/rvds or
> > whatever it is branded as these days uses, but from memory old
> > versions didn't support the gnu assebmly syntax.
> 
> All asm in musl is gas syntax so this is nothing new.
> 
> Rich
 		 	   		  

[-- Attachment #2: Type: text/html, Size: 1999 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-04-29  1:14         ` Stephen Thomas
@ 2014-04-29 16:09           ` Wermut
  2014-04-30 19:03             ` Rich Felker
  0 siblings, 1 reply; 12+ messages in thread
From: Wermut @ 2014-04-29 16:09 UTC (permalink / raw)
  To: musl

Hi

I have tested the patch from Stephen Thomas at least for gcc 4.6, 4.7
and 4.8. Seems to work. Would be nice if the 1.1.1 release will
include a fix.

Regards
Kevin

On Tue, Apr 29, 2014 at 3:14 AM, Stephen Thomas <scjthm@live.com> wrote:
>> On Tue, Apr 29, 2014 at 12:52:36AM +0100, Stephen Thomas wrote:
>> > I remember that the old thumb didn't support the conditional
>> > instructions and was quite slow. I only care about thumb2 and am
>> > currently using gcc, so I attach a patch for the thumb that will
>>
>> The code here is only used on armv6/v7. Do any such chips lack thumb2?
>> If there's any doubt, we could look at what gcc generates for the
>> __sync_* builtins in thumb mode.
>>
>> > only work for gcc .
>>
>> Why is it only for gcc?
>
> I have only tested with gcc. I don't know what llvm nor armcc do.  Is there
> an ASM standard like ther is for C/C++/fortran? There is some good info on
> thumb here, https://wiki.ubuntu.com/ARM/Thumb2 and the various ways of
> supporting ARM. I guess that the thumb2 could be replaced by a __thumb__.
>
>>
>> > I think that gcc builds two versions of atomic
>>
>> What do you mean by this?
>
> I am building the native toolchain as I would like to run this on an
> embedded platform. My understanding is that when you build the toolchain you
> need to provide somethings that end up going in libgcc_s.so such as
> threading if you are using openmp in C++. etc etc. That patch works for both
> the -marm and -mthumb or whatever the thumb targets are.
>
>>
>> > so the ugly #define was needed. I cannot remember what rvct/rvds or
>> > whatever it is branded as these days uses, but from memory old
>> > versions didn't support the gnu assebmly syntax.
>>
>> All asm in musl is gas syntax so this is nothing new.
>>
>> Rich


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-04-29 16:09           ` Wermut
@ 2014-04-30 19:03             ` Rich Felker
  2014-05-04 11:54               ` Justin Cormack
  0 siblings, 1 reply; 12+ messages in thread
From: Rich Felker @ 2014-04-30 19:03 UTC (permalink / raw)
  To: musl

On Tue, Apr 29, 2014 at 06:09:14PM +0200, Wermut wrote:
> Hi
> 
> I have tested the patch from Stephen Thomas at least for gcc 4.6, 4.7
> and 4.8. Seems to work. Would be nice if the 1.1.1 release will
> include a fix.

It only works for armv7. On armv6k, I'm getting errors that the
instructions aren't supported. I think we could simply add !thumb as a
condition for the whole block...

Rich


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-04-30 19:03             ` Rich Felker
@ 2014-05-04 11:54               ` Justin Cormack
  2014-05-04 12:01                 ` Rich Felker
  0 siblings, 1 reply; 12+ messages in thread
From: Justin Cormack @ 2014-05-04 11:54 UTC (permalink / raw)
  To: musl

On Wed, Apr 30, 2014 at 8:03 PM, Rich Felker <dalias@libc.org> wrote:
> On Tue, Apr 29, 2014 at 06:09:14PM +0200, Wermut wrote:
>> Hi
>>
>> I have tested the patch from Stephen Thomas at least for gcc 4.6, 4.7
>> and 4.8. Seems to work. Would be nice if the 1.1.1 release will
>> include a fix.
>
> It only works for armv7. On armv6k, I'm getting errors that the
> instructions aren't supported. I think we could simply add !thumb as a
> condition for the whole block...

The patch has the wrong conditional in, there are no standard
__thumb__ and __thumb2__ defines, it is __ARM_ARCH_ISA_THUMB being 1
or 2 that differentiates. armv6k does not support thumb2. I should
have enough machines of different flavours to make a working patch.

We should be able to support just using thumb2, for thumb 1 I guess we
can support a mixed mode with some files like this compiled for arm
only, but the rest compiled with thumb, with interop turned on. Not
sure how messy this will turn out to be.

Justin


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-05-04 11:54               ` Justin Cormack
@ 2014-05-04 12:01                 ` Rich Felker
  2014-05-04 13:56                   ` Justin Cormack
  0 siblings, 1 reply; 12+ messages in thread
From: Rich Felker @ 2014-05-04 12:01 UTC (permalink / raw)
  To: musl

On Sun, May 04, 2014 at 12:54:40PM +0100, Justin Cormack wrote:
> On Wed, Apr 30, 2014 at 8:03 PM, Rich Felker <dalias@libc.org> wrote:
> > On Tue, Apr 29, 2014 at 06:09:14PM +0200, Wermut wrote:
> >> Hi
> >>
> >> I have tested the patch from Stephen Thomas at least for gcc 4.6, 4.7
> >> and 4.8. Seems to work. Would be nice if the 1.1.1 release will
> >> include a fix.
> >
> > It only works for armv7. On armv6k, I'm getting errors that the
> > instructions aren't supported. I think we could simply add !thumb as a
> > condition for the whole block...
> 
> The patch has the wrong conditional in, there are no standard
> __thumb__ and __thumb2__ defines, it is __ARM_ARCH_ISA_THUMB being 1
> or 2 that differentiates. armv6k does not support thumb2. I should
> have enough machines of different flavours to make a working patch.

I don't see __ARM_ARCH_ISA_THUMB getting defined at all (gcc 4.7.1) so
it doesn't seem reliable. __THUMBEL__ is defined in thumb mode
(presumably the EL is for little endian?) but that's the only thing
I'm getting that seems relevant other than __thumb__.

> We should be able to support just using thumb2, for thumb 1 I guess we
> can support a mixed mode with some files like this compiled for arm
> only, but the rest compiled with thumb, with interop turned on. Not
> sure how messy this will turn out to be.

armv6 does not seem to have thumb2, does it? And for armv7 I think it
should be reasonable to assume any thumb support is thumb2. Is this
wrong? Aside from the question of the macro name, I think the current
patch covers all cases that can be covered. (BTW as far as I can tell
there's no good reason to ever compile with -mthumb for pre-v7, but it
doesn't hurt to support it. All the asm is arm mode anyway, so -mthumb
doesn't get you the ability to run on obscure hardware that's
thumb-only unless you rewrite all the asm too.)

Rich


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-05-04 12:01                 ` Rich Felker
@ 2014-05-04 13:56                   ` Justin Cormack
  2014-05-04 14:09                     ` Rich Felker
  0 siblings, 1 reply; 12+ messages in thread
From: Justin Cormack @ 2014-05-04 13:56 UTC (permalink / raw)
  To: musl

On Sun, May 4, 2014 at 1:01 PM, Rich Felker <dalias@libc.org> wrote:
> On Sun, May 04, 2014 at 12:54:40PM +0100, Justin Cormack wrote:
>> On Wed, Apr 30, 2014 at 8:03 PM, Rich Felker <dalias@libc.org> wrote:
>> > On Tue, Apr 29, 2014 at 06:09:14PM +0200, Wermut wrote:
>> >> Hi
>> >>
>> >> I have tested the patch from Stephen Thomas at least for gcc 4.6, 4.7
>> >> and 4.8. Seems to work. Would be nice if the 1.1.1 release will
>> >> include a fix.
>> >
>> > It only works for armv7. On armv6k, I'm getting errors that the
>> > instructions aren't supported. I think we could simply add !thumb as a
>> > condition for the whole block...
>>
>> The patch has the wrong conditional in, there are no standard
>> __thumb__ and __thumb2__ defines, it is __ARM_ARCH_ISA_THUMB being 1
>> or 2 that differentiates. armv6k does not support thumb2. I should
>> have enough machines of different flavours to make a working patch.
>
> I don't see __ARM_ARCH_ISA_THUMB getting defined at all (gcc 4.7.1) so
> it doesn't seem reliable. __THUMBEL__ is defined in thumb mode
> (presumably the EL is for little endian?) but that's the only thing
> I'm getting that seems relevant other than __thumb__.

I was wrong, sorry, __thumb__ and __thumb2__ are defined. Maybe
__ARM_ARCH_ISA_THUMB does seem to be not defined always.

>> We should be able to support just using thumb2, for thumb 1 I guess we
>> can support a mixed mode with some files like this compiled for arm
>> only, but the rest compiled with thumb, with interop turned on. Not
>> sure how messy this will turn out to be.
>
> armv6 does not seem to have thumb2, does it? And for armv7 I think it
> should be reasonable to assume any thumb support is thumb2. Is this
> wrong? Aside from the question of the macro name, I think the current
> patch covers all cases that can be covered. (BTW as far as I can tell
> there's no good reason to ever compile with -mthumb for pre-v7, but it
> doesn't hurt to support it. All the asm is arm mode anyway, so -mthumb
> doesn't get you the ability to run on obscure hardware that's
> thumb-only unless you rewrite all the asm too.)

Some armv6 machines have thumb2, but not many (ARMv6T2 apparently, I
don't have one I don't think). All v7 machines do have (only) thumb2.
So you could test ARM_ARCH_6T2 or __thumb2__.

Alternatively it seems you can compile with -Wa,-mimplicit-it=always
and you don't need the patch at all. That could make it easier in
future.

So far all the thumb2-only hardware has no MMU, so less likely to be
using musl...

Justin


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: thumb2 support
  2014-05-04 13:56                   ` Justin Cormack
@ 2014-05-04 14:09                     ` Rich Felker
  0 siblings, 0 replies; 12+ messages in thread
From: Rich Felker @ 2014-05-04 14:09 UTC (permalink / raw)
  To: musl

On Sun, May 04, 2014 at 02:56:49PM +0100, Justin Cormack wrote:
> I was wrong, sorry, __thumb__ and __thumb2__ are defined. Maybe
> __ARM_ARCH_ISA_THUMB does seem to be not defined always.

OK, so the patch as committed should at least be ok, even if not
optimal.

> Some armv6 machines have thumb2, but not many (ARMv6T2 apparently, I
> don't have one I don't think).

In any case it's not broken on them, just using the kuser helpers
rather than inlines.

> All v7 machines do have (only) thumb2.
> So you could test ARM_ARCH_6T2 or __thumb2__.

We could change the !__thumb__ test to (!__thumb__||__thumb2__).

> Alternatively it seems you can compile with -Wa,-mimplicit-it=always
> and you don't need the patch at all. That could make it easier in
> future.

Yes, but it doesn't fix the fact that we have to omit the asm entirely
on thumb1. Also adding mandatory arch-specific CFLAGS is probably more
ugly than tucking away this logic in the arch-specific atomic.h file.

> So far all the thumb2-only hardware has no MMU, so less likely to be
> using musl...

And if it is using musl it will probably need a special
bare-metal-type port with its own asm dirs rather than using the
existing Linux/ARM asm. (Of course rdp has an approach that shares the
Linux asm and syscall framework despite being "bare-metal".)

Rich


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-05-04 14:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-28  3:36 thumb2 support Stephen Thomas
2014-04-28 12:06 ` Szabolcs Nagy
2014-04-28 14:27   ` Rich Felker
2014-04-28 23:52     ` Stephen Thomas
2014-04-29  0:56       ` Rich Felker
2014-04-29  1:14         ` Stephen Thomas
2014-04-29 16:09           ` Wermut
2014-04-30 19:03             ` Rich Felker
2014-05-04 11:54               ` Justin Cormack
2014-05-04 12:01                 ` Rich Felker
2014-05-04 13:56                   ` Justin Cormack
2014-05-04 14:09                     ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).