[MacPorts] #39052: clang-3.2: can't compile a program that writes to stderr on PPC
#39052: clang-3.2: can't compile a program that writes to stderr on PPC -----------------------+-------------------------------- Reporter: takeshi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: clang-3.2 -----------------------+-------------------------------- I can't compile a simple program that writes to stderr on a PowerPC Mac running Leopard. I attach a log. {{{ $ cat foo.c #include <stdio.h> int main(void) { fprintf(stderr,"hello\n"); } $ clang-mp-3.2 foo.c ld: absolute address to symbol ___stderrp in a different linkage unit not supported in _main from /tmp/foo-WnmpXC.o collect2: ld returned 1 exit status clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation) }}} -- Ticket URL: <https://trac.macports.org/ticket/39052> MacPorts <http://www.macports.org/> Ports system for OS X
#39052: clang-3.2: can't compile a program that writes to stderr on PPC ------------------------+------------------------ Reporter: takeshi@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: clang-3.2 | ------------------------+------------------------ Changes (by larryv@…): * cc: jeremyhu@… (removed) * owner: macports-tickets@… => jeremyhu@… -- Ticket URL: <https://trac.macports.org/ticket/39052#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#39052: clang-3.2: can't compile a program that writes to stderr on PPC ------------------------+------------------------ Reporter: takeshi@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: clang-3.2 | ------------------------+------------------------ Comment (by egall@…): Is this just an issue with the MacPorts clang-3.2, or is it also present in other compiles of clang-3.2 for PPC? -- Ticket URL: <https://trac.macports.org/ticket/39052#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#39052: clang-3.2: can't compile a program that writes to stderr on PPC ------------------------+------------------------ Reporter: takeshi@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: wontfix | Keywords: Port: clang-3.2 | ------------------------+------------------------ Changes (by jeremyhu@…): * status: new => closed * resolution: => wontfix Comment: clang's ppc support is extremely limited. If you want to use clang on ppc, I suggest you use trunk, follow upstream development closely, and contribute code changes. -- Ticket URL: <https://trac.macports.org/ticket/39052#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#39052: clang-3.2: can't compile a program that writes to stderr on PPC ------------------------+------------------------ Reporter: takeshi@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: wontfix | Keywords: Port: clang-3.2 | ------------------------+------------------------ Comment (by fang@…): or follow my development at http://github.com/fangism/llvm/tree/powerpc-darwin8 http://github.com/fangism/clang/tree/powerpc-darwin8 http://github.com/fangism/compiler-rt/tree/powerpc-darwin8 -- Ticket URL: <https://trac.macports.org/ticket/39052#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#39052: clang-3.2: can't compile a program that writes to stderr on PPC ------------------------+------------------------ Reporter: takeshi@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: wontfix | Keywords: Port: clang-3.2 | ------------------------+------------------------ Comment (by frederic.devernay@…): This also affects clang-3.3, and thus prevents building boost 1.54.0 on PPC #39809. Shouldn't it be reopened? fang@csl.cornell.edu seems to have working clang-3.2 and clang-3.3 builds (at least on Tiger) http://vlsi.cornell.edu/~fang/sw/llvm/ The PPC output has changed a lot between clang-3.1 and clang-3.2. Here's a simple program: {{{ #include <stdio.h> int main(int argc, char **argv) { fprintf(stdout,"hello!\n"); return 0; } }}} Here's the PPC assembly output of clang-3.1/OSX 10.5: {{{ .machine ppc970 .section __TEXT,__textcoal_nt,coalesced,pure_instructions .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 .section __TEXT,__text,regular,pure_instructions .globl _main .align 4 _main: mflr r0 stw r31, -4(r1) stw r0, 8(r1) stwu r1, -64(r1) bl L0$pb L0$pb: mr r31, r1 mflr r4 addis r3, r4, ha16(L___stdoutp$non_lazy_ptr-L0$pb) addis r4, r4, ha16(L_.str-L0$pb) lwz r3, lo16(L___stdoutp$non_lazy_ptr-L0$pb)(r3) la r4, lo16(L_.str-L0$pb)(r4) lwz r3, 0(r3) bl _fprintf$LDBL128 li r3, 0 addi r1, r1, 64 lwz r0, 8(r1) lwz r31, -4(r1) mtlr r0 blr .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers .align 2 L___stdoutp$non_lazy_ptr: .indirect_symbol ___stdoutp .long 0 .subsections_via_symbols .section __TEXT,__cstring,cstring_literals L_.str: .asciz "hello!\n" }}} And here's the output on clang-3.2: {{{ .machine ppc970 .section __TEXT,__textcoal_nt,coalesced,pure_instructions .section __TEXT,__text,regular,pure_instructions .globl _main .align 4 _main: mflr r0 stw r31, -4(r1) stw r0, 8(r1) stwu r1, -64(r1) lis r3, ha16(___stdoutp) lis r4, ha16(L_.str) mr r31, r1 lwz r3, lo16(___stdoutp)(r3) la r4, lo16(L_.str)(r4) bl _fprintf$LDBL128 li r3, 0 addi r1, r1, 64 lwz r0, 8(r1) lwz r31, -4(r1) mtlr r0 blr .subsections_via_symbols .section __TEXT,__cstring,cstring_literals L_.str: .asciz "hello!\n" }}} -- Ticket URL: <https://trac.macports.org/ticket/39052#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#39052: clang-3.2: can't compile a program that writes to stderr on PPC ------------------------+------------------------ Reporter: takeshi@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: wontfix | Keywords: Port: clang-3.2 | ------------------------+------------------------ Comment (by jeremyhu@…): Even with David's patches for darwin/ppc support in llvm, that support is still experimental (it is still being discussed on the llvm mailing list and hasn't been merged yet) and should not be used. I think you should focus on finding a stable compiler that does work for boost. -- Ticket URL: <https://trac.macports.org/ticket/39052#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts