Mercurial > gub
changeset 5761:1927de603607
gcc-2.95: install c++ with arch-prefix- too.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Tue, 13 Oct 2009 10:08:23 +0200 |
parents | 1902c1828651 |
children | ddfccb7fe114 |
files | gub/specs/cross/gcc-2.95.py gub/specs/gcc.py |
diffstat | 2 files changed, 31 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/specs/cross/gcc-2.95.py Tue Oct 13 10:07:50 2009 +0200 +++ b/gub/specs/cross/gcc-2.95.py Tue Oct 13 10:08:23 2009 +0200 @@ -1,18 +1,33 @@ +from gub import cross +from gub import misc +from gub.specs import gcc from gub.specs.cross import gcc as cross_gcc class Gcc_2_95 (cross_gcc.Gcc): source = 'http://ftp.gnu.org/pub/gnu/gcc/gcc-2.95.3/gcc-everything-2.95.3.tar.gz' configure_flags = (cross_gcc.Gcc.configure_flags - .replace ('cross', 'cross_ancient') +# .replace ('(%[(]cross_prefix[)]s)', r'\1%(cross_suffix)s') + ' --build=i686-linux' + ' --host=i686-linux' ) - cross_ancient_dir = '%(cross_dir)s-ancient' - cross_ancient_prefix = '%(cross_prefix)s-ancient' +# cross_suffix = '-ancient' + cross_dir = '/cross-ancient' + cross_prefix = '%(system_prefix)s%(cross_dir)s' dependencies = cross_gcc.Gcc.dependencies + ['glibc'] + parallel_build_broken = True + make_flags = misc.join_lines (''' +tooldir='%(system_prefix)s/cross/%(target_architecture)s' +gcc_tooldir='%(prefix_dir)s/%(target_architecture)s' +''') destdir_install_broken = True -# def install_prefix (self): -# return cross_gcc.Gcc.install_prefix (self) + '-ancient' -# @context.subst_method - def install_prefix (self): - return '%(install_root)s%(prefix_dir)s%(cross_dir)s-ancient' + + install_flags_destdir_broken = (cross_gcc.Gcc.install_flags_destdir_broken + .replace ('((aclocaldir|bindir|datadir|exec_prefix|gcc_tooldir|includedir|xinfodir|libdir|libexecdir|xmandir|xprefix|sysconfdir|tooldir)=%[(]install_prefix[)]s)', r'\1/%(cross_dir)s') + .replace ('bindir=%(install_prefix)s%(cross_dir)s/bin', + 'bindir=%(install_prefix)s/%(cross_dir)s/%(toolchain_prefix)s')) + def install (self): + # Gcc moves libs into system lib places, which will + # make gcc-core conflict with gcc. +# cross_gcc.Gcc.install (self) + cross.AutoBuild.install (self) + gcc.install_missing_archprefix_binaries (self)
--- a/gub/specs/gcc.py Tue Oct 13 10:07:50 2009 +0200 +++ b/gub/specs/gcc.py Tue Oct 13 10:08:23 2009 +0200 @@ -73,3 +73,11 @@ # .so* because version numbers trail .so extension. for suf in ['.a', '.la', '.so*', '.dylib']: self.map_find_files (move_target_lib, libdir, 'lib.*%(suf)s' % locals ()) + +def install_missing_archprefix_binaries (self): + def copy (logger, plain_name): + base_name = os.path.basename (plain_name) + full_name = self.expand ('%(install_prefix)s%(cross_dir)s/bin/%(toolchain_prefix)s%(base_name)s', env=locals ()) + if not os.path.exists (full_name): + loggedos.system (logger, 'cp %(plain_name)s %(full_name)s' % locals ()) + self.map_find_files (copy, '%(install_prefix)s%(cross_dir)s/%(target_architecture)s/bin', self.expand ('.*'))