[MacPorts] #39052: clang-3.2: can't compile a program that writes to stderr on PPC
MacPorts
noreply at macports.org
Mon Jul 29 06:13:34 PDT 2013
#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 at 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
More information about the macports-tickets
mailing list