Opened 15 years ago

Closed 14 years ago

#23580 closed update (duplicate)

odcctools: update to support LTO

Reported by: macports@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: llvm lto Cc: ryandesign (Ryan Carsten Schmidt)
Port: odcctools

Description

To enable -O4 and -flto link time optimization in clang and llvm-gcc we need a linker with support for llvm bitcode. Newer versions of the ld64 linker (>=v77) can be configured to include such support through libLTO.dylib. The recent release of odcctools-20090808 comes bundled with ld64 v85. Updating the odcctools port would be very helpful, see #19679.

Note that the latest source releases v95 through v96.5 of ld64 are known to be incomplete and wont work.

Attachments (1)

patch-odcctools-159.diff (1.3 KB) - added by raimue (Rainer Müller) 15 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 15 years ago by raimue (Rainer Müller)

I tried to update the port, but couldn't get it to compile on 10.6.

make[1]: Entering directory `/opt/local/var/macports/build/_Users_raim_src_macports_trunk_dports_devel_odcctools/work/trunk/odcctools/otool'
ccache /usr/bin/gcc-4.2 -x objective-c -Wall -Wno-import  -DHAVE_CONFIG_H   -I/opt/local/include -I. -I. -I../include -I../include   -pipe -O2 -arch x86_64 -fno-builtin-round -fno-builtin-trunc -no-cpp-precomp -mdynamic-no-pic  -c -o print_objc.o print_objc.c
ccache /usr/bin/gcc-4.2 -DOTOOL -Wall -Wno-import  -DHAVE_CONFIG_H   -I/opt/local/include -I. -I. -I../include -I../include   -pipe -O2 -arch x86_64 -fno-builtin-round -fno-builtin-trunc -no-cpp-precomp -mdynamic-no-pic  -c -o ofile.o ../libstuff/ofile.c
print_objc.c: In function 'print_objc_segment':
print_objc.c:627: warning: implicit declaration of function 'CLS_GETINFO'
print_objc.c:627: error: 'CLS_META' undeclared (first use in this function)
print_objc.c:627: error: (Each undeclared identifier is reported only once
print_objc.c:627: error: for each function it appears in.)
print_objc.c:666: error: 'CLS_CLASS' undeclared (first use in this function)
make[1]: *** [print_objc.o] Error 1

Changed 15 years ago by raimue (Rainer Müller)

Attachment: patch-odcctools-159.diff added

comment:2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

I updated odcctools to version 20090808 in r67362. It doesn't build for me on Snow Leopard either, but at least it now does on Tiger, and maybe Leopard, which is more than I could say for the previous version of the port.

comment:3 Changed 14 years ago by macports@…

Thanks for updating odcctools! Unfortunately the updated port doesnt work for me on Snow Leopard either. I did succeed to manually compile and test just the ld64 v85.2.1 component on Snow Leopard. But sadly these 10.5 era tools seem to be unsuitable for targeting newer releases of mac os x.

Well, I guess on 10.6 the only remaining option is to grab a copy of the installed tools. I will try this in a separate ld64 port to keep odcctools undiluted. A port of ld64 is really all we need for LTO in llvm anyway. And a separate port would even match upstream (apple) more closely, where ld64 is a standalone package too.

comment:4 Changed 14 years ago by macports@…

A port of ld64 and several related enhancements are available in #24112. This ticket can be closed.

comment:5 Changed 14 years ago by mf2k (Frank Schima)

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.