[LLVMbugs] [Bug 3502] New: Cross-compile llvm-gcc Linux x86 to arm-linux

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 7 07:47:02 PST 2009


           Summary: Cross-compile llvm-gcc Linux x86 to arm-linux
           Product: tools
           Version: trunk
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kdedevel at etotheipiplusone.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=2504)
 --> (http://llvm.org/bugs/attachment.cgi?id=2504)
Revert some of 54175 to help ARM cross-compiler build

Hi all,

I'm quite new to this, so hopefully this is a real bug and not my fault :)

I'm trying to compile cross-compile llvm-gcc trunk for arm-linux from my
Kubuntu 8.04 x86 Linux install, and have run into many build errors, including
what appears to be an internal compiler error.

Firstly, the commit:


seems to have removed some stuff necessary for arm.c and arm.md to compile on a
non-Darwin host - in particular, the definitions of MACHO_DYNAMIC_NO_PIC_P,
these changes allows us to proceed (see attached patch).

After that, I ./configure llvm-gcc trunk from an obj/ subdir as follows (the
full path to this obj/ dir is
/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/xgcc) :

./configure --prefix=/home/kde4daily/tmp/funkytown-sdl/llvm-arm/install
--enable-languages=c,c++ --enable-checking  --disable-bootstrap
--disable-multilib  --target=arm-linux --build=i686-pc-linux-gnu

(the same configuration, passed to stock gcc 4.2, leads to a successful cross
compilation, so I think this is llvm-gcc-specific).

Running make eventually descends into
/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/gcc/ and tries to
run the "xgcc" executable that has been created on crtstuff.c and an internal
compiler error is generated.  After getting the preprocessed stuff and ditching
all the -I and -D flags, I've reduced the call to the relatively

-B/home/kde4daily/tmp/funkytown-sdl/llvm-arm/src/llvm-gcc/obj/./gcc/ -g -O2  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition   -g0 -finhibit-size-directive -fno-inline-functions
-fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder   -fPIC    
-c  crtstuff-preprocessed.c -o crtbeginS.o

(crtstuff-preprocessed.c is attached) and the following error is produced:

../../gcc/crtstuff.c: In function ‘__do_global_dtors_aux’:
../../gcc/crtstuff.c:334: internal compiler error: in mark_jump_label, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

The corresponding call, adapted for cross-compilation of the stock gcc 4.2,
works without incident.

If you need any more info, please let me know :)

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list