Mercurial > gub
changeset 6334:c649e789d138
Merge branch 'gcc-4.8' into gcc-4.9
author | Masamichi Hosoda <trueroad@users.noreply.github.com> |
---|---|
date | Tue, 03 Feb 2015 21:13:39 +0900 |
parents | cdcce63a1609 (current diff) 5da6cdaf1e4f (diff) |
children | d43e47bc70ce |
files | gub/specs/darwin/cross/gcc.py |
diffstat | 2 files changed, 31 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/darwin.py Mon Feb 02 22:45:18 2015 +0900 +++ b/gub/darwin.py Tue Feb 03 21:13: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:45:18 2015 +0900 +++ b/gub/specs/darwin/cross/gcc.py Tue Feb 03 21:13:39 2015 +0900 @@ -16,10 +16,40 @@ 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.10.', + 'libgcc_s_', + 'libgcc_ext.10.' + ] #, '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): patches = Gcc__darwin.patches + [