WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Help for nimble toolchain  (Read 4840 times)

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Help for nimble toolchain
« on: December 12, 2012, 06:28:05 AM »
Hello, I am glad to see how much Robert advanced using his Debian import scripts.
I lately didn't contribute much to the port mainly because of lack of time, and secondarily because I was fancying about an alternative approach.

Basically, I hope to be able to bootstrap musl with only busybox, pcc and as binaries, like I can do on x86 linux.
The problem is that arm support for pcc existed briefly only for netbsd.
I successfully native-compiled on allwinner debian wheezy/sid some older pcc using the arm--netbsdelf.
That unexpectedly worked; however, when using the resulting pcc to compile musl I got different errors according to the pcc source version number: either

Code: [Select]
op 75 slipped through
OR
Code: [Select]
compiler error: function '__builtin_stdarg_start' has no return type
OR
Code: [Select]
pcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/arm -I./src/internal -I./include  -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -falign-functions=1 -falign-labels=1 -falign-loops=1 -falign-jumps=1 -fno-stack-protector  -c -o src/aio/aio_readwrite.o src/aio/aio_readwrite.c
/tmp/ctm.pCEL0j: Assembler messages:
/tmp/ctm.pCEL0j:3: Error: bad expression
/tmp/ctm.pCEL0j:3: Error: junk at end of line, first unrecognized character is `0'

Either the netbsd trick has some issue, or a nimble toolchain isn't possible on arm, as it is on x86.
I hope the former, of course.

Ideas? Anybody willing to experiment with that?
I already asked on pcc and sunxi lists, with only generic assurance that porting pcc  should be not much work.

Offline hlavery

  • Newbie
  • *
  • Posts: 36
Re: Help for nimble toolchain
« Reply #1 on: December 12, 2012, 11:02:51 AM »
I had a go at compiling pcc on my Hackberry Allwinner a10 following the general instructions at pcc.ludd.ldu.se (as perhaps you already had done on your hardware) as follows: (with build-essential, flex and bison already imported and loaded)                                                   
                                                           
import cvs   #Another import that works, as well as flex and bison....                                                                   
tce-load -i cvs/cvs.tcz                                                         
cvs -d :pserver:anonymous@pcc.ludd.ltu.se:/cvsroot co pcc                       
cd pcc   
./configure                                                                     
(... "checking" messages ....)                                                                             
configure:errror 'arm7l-unknown-linux-gnu' is not (yet) supported by pcc       

Not terribly encouraging, since the gcc, etc, are all debian versions.  Some way to confuse the configure operation, perhaps?

Thanks for your work on Allwinner a few months ago!

EDIT: Tried the same thing on Debian wheezy headless on Allwinner; same error message. /EDIT
« Last Edit: December 12, 2012, 11:26:23 AM by hlavery »

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: Help for nimble toolchain
« Reply #2 on: December 12, 2012, 11:42:40 AM »
I had a go at compiling pcc on my Hackberry Allwinner a10 following the general instructions at pcc.ludd.ldu.se (as perhaps you already had done on your hardware) as follows: (with build-essential, flex and bison already imported and loaded)
import cvs   #Another import that works, as well as flex and bison...
Thanks for your work on imports, btw.
Quote
configure:errror 'arm7l-unknown-linux-gnu' is not (yet) supported by pcc       
Not terribly encouraging, since the gcc, etc, are all debian versions.  Some way to confuse the configure operation, perhaps?

Yes, that is expected, since there is no support for arm linux.
That's why I resorted to using arm-netbsd, as I said.