On 10 September 2010 04:47, Liu <proljc at gmail.com> wrote:> trying this: > clang -march=armv7-a -mcpu=cortex-a9 -ccc-host-triple > arm-none-linux -ccc-gcc-name arm-none-linux-gnueabi-gcc a.cHi Liu, That doesn't work for me. $ clang -march=armv7-a -mcpu=cortex-a9 -ccc-host-triple arm-none-linux -ccc-gcc-name arm-none-linux-gnueabi-gcc alias.c clang: warning: unknown platform, assuming -mfloat-abi=soft /tmp/cc-0BIpHn.s: Assembler messages: /tmp/cc-0BIpHn.s:1: Error: unknown pseudo-op: `.syntax' /tmp/cc-0BIpHn.s:2: Error: unknown pseudo-op: `.cpu' /tmp/cc-0BIpHn.s:3: Error: unknown pseudo-op: `.eabi_attribute' /tmp/cc-0BIpHn.s:4: Error: unknown pseudo-op: `.eabi_attribute' /tmp/cc-0BIpHn.s:5: Error: unknown pseudo-op: `.eabi_attribute' /tmp/cc-0BIpHn.s:6: Error: unknown pseudo-op: `.eabi_attribute' /tmp/cc-0BIpHn.s:7: Error: unknown pseudo-op: `.eabi_attribute' /tmp/cc-0BIpHn.s:8: Error: unknown pseudo-op: `.eabi_attribute' /tmp/cc-0BIpHn.s:15: Error: no such instruction: `bx lr' clang: error: assembler command failed with exit code 1 (use -v to see invocation) The assembly is fine, but ARM's ELF writer is not, if it's even getting that far. MC doesn't have ELF yet (right?) and the old ARM ELF writer had lots of problems, especially on EABI conformity, but that ASM is pure GNU, so I don't know what's wrong with it. If you generate assembly and pipe it to GAS then link manually, it works, but that's far from ideal. I think the long term solution would be to implement the MC ELF writer for ARM, but you won't get that in the 2.8. -- cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
On Sep 10, 2010, at 1:45 AM, Renato Golin wrote:> clang: error: assembler command failed with exit code 1 (use -v to see > invocation)I'd be curious what this says the invocation for your assembler is - it should be a bug that it's not calling the right assembler if you passed it the right information. What's your arm assembler named? -eric
On 10 September 2010 09:59, Eric Christopher <echristo at apple.com> wrote:> I'd be curious what this says the invocation for your assembler is - it should be a bug that it's not calling the right assembler if you passed it the right information. What's your arm assembler named?Good point. I thought -ccc-gcc-name would guess the assembler from what I passed, but running with -v I see it's using /usr/bin/as ... What is the option to tell it to use a specific assembler? -ccc-as-name or -cc-gas-name? -- cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
clang -march=armv7-a -mcpu=cortex-a9 -ccc-host-triple arm-none-linux -ccc-gcc-name arm-none-linux-gnueabi-gcc a.c replace tripe with yours 2010/9/10 Renato Golin <rengolin at systemcall.org>:> On 10 September 2010 04:47, Liu <proljc at gmail.com> wrote: >> trying this: >> clang -march=armv7-a -mcpu=cortex-a9 -ccc-host-triple >> arm-none-linux -ccc-gcc-name arm-none-linux-gnueabi-gcc a.c > > Hi Liu, > > That doesn't work for me. > > $ clang -march=armv7-a -mcpu=cortex-a9 -ccc-host-triple arm-none-linux > -ccc-gcc-name arm-none-linux-gnueabi-gcc alias.c > clang: warning: unknown platform, assuming -mfloat-abi=soft > /tmp/cc-0BIpHn.s: Assembler messages: > /tmp/cc-0BIpHn.s:1: Error: unknown pseudo-op: `.syntax' > /tmp/cc-0BIpHn.s:2: Error: unknown pseudo-op: `.cpu' > /tmp/cc-0BIpHn.s:3: Error: unknown pseudo-op: `.eabi_attribute' > /tmp/cc-0BIpHn.s:4: Error: unknown pseudo-op: `.eabi_attribute' > /tmp/cc-0BIpHn.s:5: Error: unknown pseudo-op: `.eabi_attribute' > /tmp/cc-0BIpHn.s:6: Error: unknown pseudo-op: `.eabi_attribute' > /tmp/cc-0BIpHn.s:7: Error: unknown pseudo-op: `.eabi_attribute' > /tmp/cc-0BIpHn.s:8: Error: unknown pseudo-op: `.eabi_attribute' > /tmp/cc-0BIpHn.s:15: Error: no such instruction: `bx lr' > clang: error: assembler command failed with exit code 1 (use -v to see > invocation) > > The assembly is fine, but ARM's ELF writer is not, if it's even > getting that far. MC doesn't have ELF yet (right?) and the old ARM ELF > writer had lots of problems, especially on EABI conformity, but that > ASM is pure GNU, so I don't know what's wrong with it. > > If you generate assembly and pipe it to GAS then link manually, it > works, but that's far from ideal. I think the long term solution would > be to implement the MC ELF writer for ARM, but you won't get that in > the 2.8. > > > -- > cheers, > --renato > > http://systemcall.org/ > > Reclaim your digital rights, eliminate DRM, learn more at > http://www.defectivebydesign.org/what_is_drm >