Mercurial > gub
changeset 6332:0e8095416f86
Revert darwin-x86::cross/gcc rewire_gcc_libs
author | Masamichi Hosoda <trueroad@users.noreply.github.com> |
---|---|
date | Tue, 03 Feb 2015 00:46:39 +0900 |
parents | fb79d13ed8a5 |
children | 5da6cdaf1e4f |
files | gub/darwin.py gub/specs/darwin/cross/gcc.py |
diffstat | 2 files changed, 27 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/darwin.py Mon Feb 02 22:43:50 2015 +0900 +++ b/gub/darwin.py Tue Feb 03 00:46:39 2015 +0900 @@ -14,7 +14,7 @@ def __init__ (self, settings): context.RunnableContext.__init__ (self,settings) self.ignore_libs = None - self.skip = ['libgcc_s', 'libstdc++'] + self.skip = ['libgcc_s'] def get_libaries (self, name): lib_str = loggedos.read_pipe (
--- a/gub/specs/darwin/cross/gcc.py Mon Feb 02 22:43:50 2015 +0900 +++ b/gub/specs/darwin/cross/gcc.py Tue Feb 03 00:46:39 2015 +0900 @@ -14,10 +14,36 @@ def languages (self): # objective-c is used for quartz's Carbon/Carbon.h in pango, gtk+ return cross_gcc.Gcc.languages (self) + ['objc', 'obj-c++'] + def rewire_gcc_libs (self): + # FIXME: why do we skip, please document? + # I get + ''' +/home/janneke/vc/gub/target/darwin-x86/root/usr/cross/bin/i686-apple-darwin8-ld: warning can't open dynamic library: /home/janneke/vc/gub/target/darwin-x86/root/home/janneke/vc/gub/target/darwin-x86/root/usr/cross/i686-apple-darwin8/lib/libgcc_s.1.dylib referenced from: /home/janneke/vc/gub/target/darwin-x86/root/usr/lib/libstdc++.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) +''' + # let's try adding libstdc++.dylib?, nah, let's not + skip_libs = ['libgcc_s'] #, 'libstdc++'] + + def rewire_one (logger, file): + found_skips = [s for s in skip_libs if file.find (s) >= 0] + if found_skips: + return + id = loggedos.read_pipe (logger, + self.expand ('%(toolchain_prefix)sotool -L %(file)s', + locals ()), + env=self.get_substitution_dict ()).split ()[1] + id = os.path.split (id)[1] + loggedos.system (logger, + self.expand ('%(toolchain_prefix)sinstall_name_tool -id /usr/lib/%(id)s %(file)s', + locals ()), + env=self.get_substitution_dict ()) + self.map_locate (rewire_one, + self.expand ('%(install_prefix)s/lib/'), + '*.dylib') def install (self): cross_gcc.Gcc.install (self) # conflicts with darwin-SDK self.system ('mv %(install_prefix)s/lib/libsupc++.a %(install_prefix)s/lib/libsupc++.a-') + self.rewire_gcc_libs () class Gcc__darwin__ppc (Gcc__darwin): configure_flags = (Gcc__darwin.configure_flags