[MacPorts] #49764: babl @0.1.14 falls back to clang-3.4 which is not functional on PPC platforms
MacPorts
noreply at macports.org
Sun Oct 23 03:51:34 CEST 2016
#49764: babl @0.1.14 falls back to clang-3.4 which is not functional on PPC
platforms
--------------------------+----------------------
Reporter: braumann@… | Owner: dbevans
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: powerpc
Port: clang34 |
--------------------------+----------------------
Comment (by ken-cunningham-webuse):
going to help take a stab at this. First the basics. On Leopard PPC,
standard /opt/local install, no funny configurations, macports defaults.
have installed
{{{
$ port -v installed | grep clang
clang-3.4 @3.4.2_11+analyzer (active) platform='darwin 9' archs='ppc'
clang_select @2_0 (active) platform='darwin 9' archs='noarch'
port -v installed | grep llvm
cctools @886_6+llvm33 (active) platform='darwin 9' archs='ppc'
ld64-127 @127.2_7+llvm33 (active) platform='darwin 9' archs='ppc'
llvm-3.3 @3.3_10 (active) platform='darwin 9' archs='ppc'
llvm-3.4 @3.4.2_11 (active) platform='darwin 9' archs='ppc'
llvm_select @2_0 (active) platform='darwin 9' archs='noarch'
$ port select --list gcc
Available versions for gcc:
gcc40
gcc42 (active)
llvm-gcc42
none
$ls -la /opt/local/bin/gcc
lrwxr-xr-x 1 root admin 16 Oct 22 18:33 /opt/local/bin/gcc ->
/usr/bin/gcc-4.2
}}}
simple hello.c test
{{{
$ cat hello.c
#include <stdio.h>
int main() {
printf("Hello!\n");
return 0;
}
}}}
puts out
{{{
$ clang -v -arch ppc hello.c -o hello.ppc
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: powerpc-apple-darwin9.8.0
Thread model: posix
Selected GCC installation:
"/opt/local/libexec/llvm-3.4/bin/clang" -cc1 -triple powerpc-apple-
darwin9.8.0 -S -disable-free -disable-llvm-verifier -main-file-name
hello.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -target-
linker-version 127.2 -v -resource-dir
/opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2 -fno-dwarf2-cfi-asm
-fno-dwarf-directory-asm -fno-autolink -fdebug-compilation-dir
/users/shared/libunwind_test -ferror-limit 19 -fmessage-length 123
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-
diagnostics -vectorize-slp -o /var/tmp/hello-15e6ee.s -x c hello.c
clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target powerpc-
apple-darwin9.8.0
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/opt/local/bin/gcc" -v -c -arch ppc -m32 -o /var/tmp/hello-155d32.o -x
assembler /var/tmp/hello-15e6ee.s
Using built-in specs.
Target: powerpc-apple-darwin9
Configured with: /var/tmp/gcc_42/gcc_42-5577~1/src/configure --disable-
checking --prefix=/usr --mandir=/usr/share/man --enable-
languages=c,objc,c++,obj-c++ --program-transform-
name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-
darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --program-prefix=
--host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5577)
/usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/as -arch ppc -o /var/tmp
/hello-155d32.o /var/tmp/hello-15e6ee.s
"/opt/local/bin/gcc" -v -arch ppc -m32 -o hello.ppc /var/tmp/hello-
155d32.o
Using built-in specs.
Target: powerpc-apple-darwin9
Configured with: /var/tmp/gcc_42/gcc_42-5577~1/src/configure --disable-
checking --prefix=/usr --mandir=/usr/share/man --enable-
languages=c,objc,c++,obj-c++ --program-transform-
name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-
darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --program-prefix=
--host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5577)
/usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/collect2 -dynamic -arch ppc
-macosx_version_min 10.5.8 -weak_reference_mismatches non-weak -o
hello.ppc -lcrt1.10.5.o -L/usr/lib/powerpc-apple-darwin9/4.2.1
-L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-
darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../../powerpc-
apple-darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../..
/var/tmp/hello-155d32.o -lgcc_s.10.5 -lgcc -lSystemStubs -lSystem
}}}
and works
{{{
$ ./hello.ppc
Hello!
}}}
So we have a working clang-3.4 that can compile c code. If I understand
correctly what is going on here, clang is compiling c code to an assembly
language file
{{{
"/opt/local/libexec/llvm-3.4/bin/clang" -cc1 -triple powerpc-apple-
darwin9.8.0 -S -disable-free -disable-llvm-verifier -main-file-name
hello.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -target-
linker-version 127.2 -v -resource-dir
/opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2 -fno-dwarf2-cfi-asm
-fno-dwarf-directory-asm -fno-autolink -fdebug-compilation-dir
/users/shared/libunwind_test -ferror-limit 19 -fmessage-length 123
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-
diagnostics -vectorize-slp -o /var/tmp/hello-15e6ee.s -x c hello.c
}}}
and then gcc-4.2 is taking it from there, and using gcc's assembler
{{{
/usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/as -arch ppc -o /var/tmp
/hello-155d32.o /var/tmp/hello-15e6ee.s
}}}
and then gcc's linker
{{{
/usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/collect2 -dynamic -arch ppc
-macosx_version_min 10.5.8 -weak_reference_mismatches non-weak -o
hello.ppc -lcrt1.10.5.o -L/usr/lib/powerpc-apple-darwin9/4.2.1
-L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-
darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../../powerpc-
apple-darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../..
/var/tmp/hello-155d32.o -lgcc_s.10.5 -lgcc -lSystemStubs -lSystem
}}}
to give us a working binary
--
Ticket URL: <https://trac.macports.org/ticket/49764#comment:24>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list