salah1979 / iphone-dev

Automatically exported from code.google.com/p/iphone-dev
0 stars 0 forks source link

lib1funcs.asm:670:garbage following instruction #145

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Compile the toolchain against iPhone OS 2.0 mostly following instructions
at http://wikee.iphwn.org/howto:toolchain_on_leopard_aspen. (see
build-2.0.sh -  attached)

What is the expected output? What do you see instead?

Expect a successful build (doesn't everyone :) ?)

I get the following error:
../../../llvm-gcc-4.0-iphone/gcc/config/arm/lib1funcs.asm:670:garbage
following instruction -- `bls 11f'
../../../llvm-gcc-4.0-iphone/gcc/config/arm/lib1funcs.asm:672:garbage
following instruction -- `beq 12f'
make[2]: *** [libgcc/./_udivsi3_s.o] Error 1

What version of the product are you using? On what operating system?
Running Ubuntu, compiling against iPhone 2.0.

Please provide any additional information below.
I've attached a shell script that does all the steps so anyone who's keen
to help can see exactly what I'm running.

Original issue reported on code.google.com by max.e.st...@gmail.com on 11 Jul 2008 at 9:24

Attachments:

GoogleCodeExporter commented 8 years ago
I have the exact problem!
I'm not running on Ubuntu, i'm running on mac osx leopard.
Please if anybody know the cause, help.

Original comment by gearfo...@gmail.com on 17 Jul 2008 at 7:06

GoogleCodeExporter commented 8 years ago
The error goes away if branch targets 10f, 11f, 12f are replaced by 1f, 2f, ...
(and corresponding 10:, 11:, 12: by 1:, 2:, 3:)
Somehow current gcc does not like to jump to targets with two decimals??

With the changes attached as diff file compilation succeeds (did not test this
toolchain yet):

Original comment by osth%sun...@gtempaccount.com on 19 Jul 2008 at 8:09

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks a lot!  That sorted it, the toolchain compiled with no trouble after 
making
the changes.

Original comment by max.e.st...@gmail.com on 19 Jul 2008 at 12:49

GoogleCodeExporter commented 8 years ago
thank you sunrise!
i've been working on this error for 2 days!
i knew it has something to do with this file but couldn't figure it out, i'm 
not so
good with asm.
thank you once more!

Original comment by gearfo...@gmail.com on 19 Jul 2008 at 2:29

GoogleCodeExporter commented 8 years ago
You are welcome! - Just checked: gas (gnu assembler) manual "local labels"
actually has a restriction for numeric local labels from 0 to 9
(at least for the version i looked into).

Original comment by osth%sun...@gtempaccount.com on 19 Jul 2008 at 11:11

GoogleCodeExporter commented 8 years ago
Applying the patch file allowed me to continue the build.  Many Thanks!

Original comment by gordon.c...@gmail.com on 22 Jul 2008 at 6:31

GoogleCodeExporter commented 8 years ago
where did you all apply this patch?  (as in file location)

Original comment by devi...@gmail.com on 24 Aug 2008 at 11:34

GoogleCodeExporter commented 8 years ago
many thanks.

Original comment by s...@knewton.com on 8 Nov 2008 at 7:46

GoogleCodeExporter commented 8 years ago
I had this error and applied the patch. I got past the error but have arrived 
at another:

/usr/local/bin/arm-apple-darwin-ld:
/usr/local/share/iphone-filesystem/usr/lib/libc.dylib unknown flags (type) of 
section
4 (__TEXT,__dof_magmalloc) in load command 0

I have no idea how to fix this at all :(

Original comment by onida...@gmail.com on 5 Jul 2009 at 4:19

GoogleCodeExporter commented 8 years ago
Sorry, but i've never used anything like this before. (asm.diff) 
Can anybody tell me, how can i use it to fix this problem?

Original comment by toody.ga...@gmail.com on 5 Sep 2009 at 2:39

GoogleCodeExporter commented 8 years ago
To apply the patch, go into the directory

[...etc...]/iphone-dev/llvm-gcc-4.0-iphone/gcc/config/arm

then issue command (assuming you saved the .diff file into /tmp)

patch -p0 < /tmp/lib1funcs.asm.diff

if it works, you will get a message like 

patching file lib1funcs.asm

..however, after that, I'm at the same point as the poster above, 

/usr/local/bin/arm-apple-darwin-ld:
/usr/local/share/iphone-filesystem/usr/lib/libc.dylib unknown flags (type) of 
section
4 (__TEXT,__dof_magmalloc) in load command 0
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.dylib] Error 1
make[1]: *** [stmp-multilib] Error 2
make: *** [all-gcc] Error 2

I did notice that there was a newer toolchain  llvm-gcc-4.2-iphone   -- gonna 
try
that one next.

Original comment by billybob...@gmail.com on 14 Oct 2009 at 1:30