From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: thumb2 support
Date: Mon, 28 Apr 2014 10:27:14 -0400 [thread overview]
Message-ID: <20140428142714.GX26358@brightrain.aerifal.cx> (raw)
In-Reply-To: <20140428120630.GG12324@port70.net>
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
next prev parent reply other threads:[~2014-04-28 14:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 3:36 Stephen Thomas
2014-04-28 12:06 ` Szabolcs Nagy
2014-04-28 14:27 ` Rich Felker [this message]
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
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=20140428142714.GX26358@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/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.
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).