changeset 6319:f0f93d6d632c

Merge branch 'gcc-4.8' into gcc-4.9 Conflicts: gub/specs/darwin/cross/gcc.py
author Masamichi Hosoda <trueroad@users.noreply.github.com>
date Mon, 19 Jan 2015 20:06:25 +0900
parents 1f3e327a8956 (current diff) fd2c5da13b98 (diff)
children 959f5e7a6c4d
files gub/specs/darwin/cross/gcc.py
diffstat 8 files changed, 42 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/gub/darwin.py	Tue Jan 13 20:54:47 2015 +0900
+++ b/gub/darwin.py	Mon Jan 19 20:06:25 2015 +0900
@@ -14,7 +14,7 @@
     def __init__ (self, settings):
         context.RunnableContext.__init__ (self,settings)
         self.ignore_libs = None
-        self.skip = ['libgcc_s']
+        self.skip = ['libgcc_s', 'libstdc++']
 
     def get_libaries (self, name):
         lib_str = loggedos.read_pipe (
--- a/gub/settings.py	Tue Jan 13 20:54:47 2015 +0900
+++ b/gub/settings.py	Mon Jan 19 20:06:25 2015 +0900
@@ -17,7 +17,7 @@
     'debian-mipsel': 'mipsel-linux',
     'debian-x86': 'i686-linux',
     'cygwin': 'i686-cygwin',
-    'darwin-ppc': 'powerpc-apple-darwin7',
+    'darwin-ppc': 'powerpc-apple-darwin8',
     'darwin-x86': 'i686-apple-darwin8',
 
     'freebsd4-x86': 'i686-freebsd4',
--- a/gub/specs/darwin/cross/gcc.py	Tue Jan 13 20:54:47 2015 +0900
+++ b/gub/specs/darwin/cross/gcc.py	Mon Jan 19 20:06:25 2015 +0900
@@ -6,59 +6,19 @@
 
 class Gcc__darwin (cross_gcc.Gcc):
     dependencies = ['odcctools']
-    def patch (self):
-        self.file_sub ([('/usr/bin/libtool', '%(cross_prefix)s/bin/%(target_architecture)s-libtool')],
-                       '%(srcdir)s/gcc/config/darwin.h')
-
-        self.file_sub ([('--strip-underscores', '--strip-underscore')],
-                       '%(srcdir)s/libstdc++-v3/scripts/make_exports.pl')
-        cross.AutoBuild.patch (self)
+    patches = cross_gcc.Gcc.patches + [
+        'gcc-4.8.2-darwin-fixinc.patch',
+        'gcc-4.8.2-darwin-libgcc.patch',
+    ]
     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__x86 (Gcc__darwin):
-    patches = []
-    dependencies = Gcc__darwin.dependencies + ['tools::mpfr']
-    configure_command = (''' LDFLAGS='-L%(tools_prefix)s/lib %(rpath)s' '''
-                         + Gcc__darwin.configure_command)
 
-class Version_bump_builds_but_needs_a_test_Gcc__darwin__ppc (Gcc__darwin__x86):
-    pass
-
-class Not_used__Gcc__darwin (Gcc__darwin):
-    def configure (self):
-        cross_gcc.Gcc.configure (self)
-    def install (self):
-        cross_gcc.Gcc.install (self)
-        self.rewire_gcc_libs ()
+class Gcc__darwin__ppc (Gcc__darwin):
+    configure_flags = (Gcc__darwin.configure_flags
+                       + ' --disable-libitm'
+    )
--- a/gub/specs/darwin/darwin-sdk.py	Tue Jan 13 20:54:47 2015 +0900
+++ b/gub/specs/darwin/darwin-sdk.py	Mon Jan 19 20:06:25 2015 +0900
@@ -1,7 +1,7 @@
 from gub import build
 
 class Darwin_sdk (build.SdkBuild):
-    source = 'http://lilypond.org/download/gub-sources/darwin7-sdk-0.4.tar.gz'
+    source = 'http://lilypond.org/download/gub-sources/darwin8-sdk-0.4.tar.gz'
     def patch (self):
         self.system ('''
 rm %(srcdir)s/usr/lib/libgcc*
@@ -26,6 +26,3 @@
         pat = self.expand ('%(srcdir)s/usr/lib/*.la')
         for a in glob.glob (pat):
             self.file_sub ([(r' (/usr/lib/.*\.la)', r'%(system_root)s\1')], a)
-
-class Darwin_sdk__darwin__x86 (Darwin_sdk):
-    source = 'http://lilypond.org/download/gub-sources/darwin8-sdk-0.4.tar.gz'
--- a/gub/specs/guile.py	Tue Jan 13 20:54:47 2015 +0900
+++ b/gub/specs/guile.py	Mon Jan 19 20:06:25 2015 +0900
@@ -187,12 +187,10 @@
         self.map_locate (dylib_link,
                          self.expand ('%(install_prefix)s/lib/'),
                          'libguile-srfi*.dylib')
- 
-class Guile__darwin__x86 (Guile__darwin):
     def configure (self):
         self.file_sub ([('guile-readline', '')],
                        '%(srcdir)s/Makefile.in')
-        Guile__darwin.configure (self)
+        Guile.configure (self)
 
 class Guile__linux__x86 (Guile):
     patches = Guile.patches + ['guile-1.8.6-pthreads-cross.patch']
--- a/gub/specs/lilypond.py	Tue Jan 13 20:54:47 2015 +0900
+++ b/gub/specs/lilypond.py	Mon Jan 19 20:06:25 2015 +0900
@@ -253,7 +253,7 @@
 class LilyPond__darwin__ppc (LilyPond__darwin):
     def configure (self):
         LilyPond__darwin.configure (self)
-        self.dump ('CXXFLAGS += -DGUILE_ELLIPSIS=...',
+        self.dump ('CXXFLAGS += -fpermissive -DGUILE_ELLIPSIS=...',
                    '%(builddir)s/local.make')
 
 class LilyPond_base (target.AutoBuild):
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gcc-4.8.2-darwin-fixinc.patch	Mon Jan 19 20:06:25 2015 +0900
@@ -0,0 +1,11 @@
+--- gcc-4.8.2/gcc/Makefile.in.org	2015-01-12 19:53:31.179327200 +0900
++++ gcc-4.8.2/gcc/Makefile.in	2015-01-12 19:53:52.471327200 +0900
+@@ -4214,7 +4214,7 @@
+ 	      export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
+ 	      cd $(build_objdir)/fixincludes && \
+ 	      $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
+-	        $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
++	        $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) || true ); \
+ 	    rm -f $${fix_dir}/syslimits.h; \
+ 	    if [ -f $${fix_dir}/limits.h ]; then \
+ 	      mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gcc-4.8.2-darwin-libgcc.patch	Mon Jan 19 20:06:25 2015 +0900
@@ -0,0 +1,18 @@
+--- gcc-4.8.2/libgcc/config/t-slibgcc-darwin.org	2015-01-12 23:49:10.689670300 +0900
++++ gcc-4.8.2/libgcc/config/t-slibgcc-darwin	2015-01-12 23:49:40.989670300 +0900
+@@ -29,11 +29,11 @@
+ 
+ # we're only going to build the stubs if the target slib is /usr/lib
+ # there is no other case in which they're useful in a live system.
+-ifeq (/usr/lib,$(shlib_slibdir))
++#ifeq (/usr/lib,$(shlib_slibdir))
+ LGCC_STUBS = libgcc_s.10.4.dylib libgcc_s.10.5.dylib
+-else
+-LGCC_STUBS =
+-endif
++#else
++#LGCC_STUBS =
++#endif
+ 
+ LGCC_FILES = libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)
+ LGCC_FILES += $(LGCC_STUBS)