Mercurial > gub
changeset 3401:bc06eb1d4dca
Update linux-arm-softfloat to get_cross_build_dependencies.
Use fixed-version for Debian's linux-kernel headers, as version of
packages file is not present for several architectures?
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Thu, 03 May 2007 13:02:35 +0200 |
parents | 82e1a185d8a2 |
children | 3389420be660 |
files | TODO gub/gubb.py gub/linux-arm-softfloat.py gub/specs/debian/linux-kernel-headers.py gub/specs/linux-arm-softfloat/cross/gcc-core.py gub/specs/linux-arm-softfloat/cross/gcc.py gub/specs/linux-arm-softfloat/glibc-core.py gub/specs/linux-arm-softfloat/glibc.py gub/specs/linux-headers.py |
diffstat | 9 files changed, 98 insertions(+), 203 deletions(-) [+] |
line wrap: on
line diff
--- a/TODO Thu May 03 12:41:24 2007 +0200 +++ b/TODO Thu May 03 13:02:35 2007 +0200 @@ -1,14 +1,3 @@ -* update platform packages to use get_cross_build_dependencies - - linux-arm-... - - DONE - - darwin - - debian - - cygwin - - linux - - mingw - - freebsd - * Split build recipe's into Basic (configure??; make; make install), AutoTools; move Scons, Bjam recipes to gub lib. Softcode stages, move autotools patching to autogen/prepare_configure stage. @@ -17,7 +6,9 @@ * Bootstrap whole toolchain from source on more platforms (freebsd) -* Install cross toolchain packages in target/local? +* Install cross toolchain packages in target/local? + +* move and merge cross.Gcc, cross.Binutils into cross/gcc, cross/binutils. LOWER PRIORITY
--- a/gub/gubb.py Thu May 03 12:41:24 2007 +0200 +++ b/gub/gubb.py Thu May 03 13:02:35 2007 +0200 @@ -836,7 +836,9 @@ klass = None checksum = '0000' file_base = name + '.py' - for dir in (settings.specdir + '/' + settings.os, settings.specdir): + for dir in (settings.specdir + '/' + settings.platform, + settings.specdir + '/' + settings.os, + settings.specdir): file_name = dir + '/' + file_base if os.path.exists (file_name): klass = get_class_from_spec_file (settings, file_name, name)
--- a/gub/linux-arm-softfloat.py Thu May 03 12:41:24 2007 +0200 +++ b/gub/linux-arm-softfloat.py Thu May 03 13:02:35 2007 +0200 @@ -1,31 +1,4 @@ -from gub import cross from gub import gubb -from gub import linux -from gub import targetpackage - -from gub.specs.cross import gcc -from gub.specs import glibc - -binutils_format = 'bz2' -gcc_format = 'bz2' - -''' -Configured with: /work/GNU/CodeSourcery/src/gcc-3.4.0/configure ---target=arm-linux ---host=i686-host_pc-linux-gnu ---prefix=/usr/local/arm/gnu/release-3.4.0-vfp ---with-headers=/usr/local/arm/gnu/release-3.4.0-vfp/arm-linux/include ---with-local-prefix=/usr/local/arm/gnu/release-3.4.0-vfp/arm-linux ---disable-nls ---enable-threads=posix ---enable-symvers=gnu ---enable-__cxa_atexit ---enable-languages=c,c++ ---enable-shared ---enable-c99 ---enable-clocale=gnu ---enable-long-long -''' code_sourcery = 'http://www.codesourcery.com/public/gnu_toolchain/%(name)s/arm-%(ball_version)s-%(name)s.src.tar.%(format)s' @@ -36,152 +9,14 @@ mkdir -p %(install_root)s ''') -class Gcc (gcc.Gcc): - def patch (self): - gcc.Gcc.patch (self) - self.system (''' -cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-3.4.0-arm-lib1asm.patch -cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-3.4.0-arm-nolibfloat.patch -''') - def configure_command (self): - return (gcc.Gcc.configure_command (self) - + misc.join_lines (''' ---with-float=soft -#--with-fpu=vfp -''')) - -class Gcc_core (gcc.Gcc_core): - def patch (self): - gcc.Gcc_core.patch (self) - self.system (''' -cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-3.4.0-arm-lib1asm.patch -cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-3.4.0-arm-nolibfloat.patch -''') - def configure_command (self): - return (gcc.Gcc_core.configure_command (self) - + misc.join_lines (''' ---with-float=soft -#--with-fpu=vfp -''')) - -class Glibc (glibc.Glibc): - def patch (self): - glibc.Glibc.patch (self) - self.system (''' -cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-wordexp-inline.patch -cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-linux-2.4.23-arm-bus-isa.patch -''') - def configure_command (self): - return (glibc.Glibc.configure_command (self) - + misc.join_lines (''' ---without-fp -''')) - -class Glibc_core (glibc.Glibc_core): - def patch (self): - glibc.Glibc_core.patch (self) - self.system (''' -cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-wordexp-inline.patch -cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-linux-2.4.23-arm-bus-isa.patch -''') - def configure_command (self): - return (glibc.Glibc_core.configure_command (self) - + misc.join_lines (''' ---without-fp -''')) - -#FIXME, c&p linux.py -from gub import mirrors -from gub import misc -def _get_cross_packages (settings, - linux_version, binutils_version, gcc_version, - glibc_version, guile_version, python_version): - configs = [] - if not settings.platform.startswith ('linux'): - configs = [ - linux.Guile_config (settings).with (version=guile_version), - linux.Python_config (settings).with (version=python_version), - ] +def get_cross_packages (settings): + # obsolete + return [] - from gub import linux_headers - from gub import debian - from gub.cross import binutils - import gcc - import glibc - headers = linux_headers.Linux_headers (settings)\ - .with_tarball (mirror=mirrors.linux_2_6, - version=linux_version, - format='bz2') - if settings.package_arch == 'arm': - headers = debian.Linux_kernel_headers (settings)\ - .with (version=linux_version, - strip_components=0, - mirror=mirrors.lilypondorg_deb, - format='deb') - sdk = [] - if binutils_version in ('2004-q1a',): - sdk += Arm_none_elf (settings).with (version=binutils_version, - format='bz2', - mirror=code_sourcery, - strip_components=0), - return sdk + [ - headers, - binutils.Binutils (settings).with (version=binutils_version, - format=binutils_format, - mirror=mirrors.gnu), - Gcc_core (settings).with (version=gcc_version, - mirror=(mirrors.gcc - % {'name': 'gcc', - 'ball_version': gcc_version, - 'format': gcc_format,}), - format='bz2'), - Glibc_core (settings).with (version=glibc_version, - mirror=(mirrors.glibc_2_3_snapshots - % {'name': 'glibc', - 'ball_version': glibc_version, - 'format': 'bz2',}), - format='bz2'), - Gcc (settings).with (version=gcc_version, - mirror=mirrors.gcc, format=gcc_format), - Glibc (settings).with (version=glibc_version, - mirror=mirrors.glibc_2_3_snapshots, - format='bz2'), - ] + configs - - - -def get_cross_packages (settings): - return get_cross_packages_pre_eabi (settings) - #return get_code_sourcery_2004_q1a (settings) - -def get_code_sourcery_2004_q1a (settings): - global binutils_format, gcc_format - binutils_format = gcc_format = 'gz' - linux_version = '2.5.999-test7-bk-17' - binutils_version = '2004-q1a' - gcc_version = '2004-q1a' - glibc_version = '2.3-20070416' - guile_version = '1.6.7' - python_version = '2.4.1' - return _get_cross_packages (settings, - linux_version, binutils_version, - gcc_version, glibc_version, - guile_version, python_version) - -def get_cross_packages_pre_eabi (settings): - #linux_version = '2.5.75' - linux_version = '2.5.999-test7-bk-17' - #linux_version = '2.4.34' - binutils_version = '2.16.1' - gcc_version = '3.4.6' - glibc_version = '2.3-20070416' - guile_version = '1.6.7' - python_version = '2.4.1' - return _get_cross_packages (settings, - linux_version, binutils_version, - gcc_version, glibc_version, - guile_version, python_version) +def get_cross_build_dependencies (settings): + return ['linux-headers', 'glibc'] def change_target_package (p): + from gub import cross cross.change_target_package (p) return p
--- a/gub/specs/debian/linux-kernel-headers.py Thu May 03 12:41:24 2007 +0200 +++ b/gub/specs/debian/linux-kernel-headers.py Thu May 03 13:02:35 2007 +0200 @@ -5,11 +5,13 @@ class Linux_kernel_headers (gubb.BinarySpec, gubb.SdkBuildSpec): def __init__ (self, settings): gubb.BinarySpec.__init__ (self, settings) - self.with (version=debian.get_packages ()['linux-kernel-headers'].version (), - strip_components=0, - mirror=mirrors.lkh_deb, + self.with ( # FIXME: we do not mirror all 12 debian arch's, -# mirror=mirrors.lilypondorg_deb, - format='deb') +# version=debian.get_packages ()['linux-kernel-headers'].version (), +# mirror=mirrors.lkh_deb, + version='2.5.999-test7-bk-17', + mirror=mirrors.lilypondorg_deb, + strip_components=0, + format='deb') def get_subpackage_names (self): return ['']
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/linux-arm-softfloat/cross/gcc-core.py Thu May 03 13:02:35 2007 +0200 @@ -0,0 +1,17 @@ +from gub import misc +gcc = misc.load_spec ('cross/gcc-core') + +class Gcc_core (gcc.Gcc_core): + def patch (self): + gcc.Gcc_core.patch (self) + self.system (''' +cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-3.4.0-arm-lib1asm.patch +cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-3.4.0-arm-nolibfloat.patch +''') + def configure_command (self): + return (gcc.Gcc_core.configure_command (self) + + misc.join_lines (''' +--with-float=soft +#--with-fpu=vfp +''')) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/linux-arm-softfloat/cross/gcc.py Thu May 03 13:02:35 2007 +0200 @@ -0,0 +1,17 @@ +from gub.specs.cross import gcc +from gub import misc + +class Gcc (gcc.Gcc): + def patch (self): + gcc.Gcc.patch (self) + self.system (''' +cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-3.4.0-arm-lib1asm.patch +cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-3.4.0-arm-nolibfloat.patch +''') + def configure_command (self): + return (gcc.Gcc.configure_command (self) + + misc.join_lines (''' +--with-float=soft +#--with-fpu=vfp +''')) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/linux-arm-softfloat/glibc-core.py Thu May 03 13:02:35 2007 +0200 @@ -0,0 +1,16 @@ +#from gub.specs import glibc-core +from gub import misc +glibc = misc.load_spec ('glibc-core') + +class Glibc_core (glibc.Glibc_core): + def patch (self): + glibc.Glibc_core.patch (self) + self.system (''' +cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-wordexp-inline.patch +cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-linux-2.4.23-arm-bus-isa.patch +''') + def configure_command (self): + return (glibc.Glibc_core.configure_command (self) + + misc.join_lines (''' +--without-fp +'''))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gub/specs/linux-arm-softfloat/glibc.py Thu May 03 13:02:35 2007 +0200 @@ -0,0 +1,15 @@ +from gub import misc +from gub.specs import glibc + +class Glibc (glibc.Glibc): + def patch (self): + glibc.Glibc.patch (self) + self.system (''' +cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-wordexp-inline.patch +cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-linux-2.4.23-arm-bus-isa.patch +''') + def configure_command (self): + return (glibc.Glibc.configure_command (self) + + misc.join_lines (''' +--without-fp +'''))
--- a/gub/specs/linux-headers.py Thu May 03 12:41:24 2007 +0200 +++ b/gub/specs/linux-headers.py Thu May 03 13:02:35 2007 +0200 @@ -24,23 +24,23 @@ usr/include/net/route.h ''') -#urg, shoot /me in foot -#from gub import debian -#from gub import misc -debian = misc.load_spec ('debian/linux-kernel-headers') +from gub import misc +linux_kernel_headers = misc.load_spec ('debian/linux-kernel-headers') - -class Linux_headers__debian (debian.Linux_kernel_headers): +class Linux_headers__debian (linux_kernel_headers.Linux_kernel_headers): def __init__ (self, settings): - debian.Linux_kernel_headers.__init__ (self, settings) - self.with (name='linux-kernel-headers', - version=debian.get_packages ()['linux-kernel-headers'].version (), + linux_kernel_headers.Linux_kernel_headers.__init__ (self, settings) + from gub import debian +# debian.init_dependency_resolver (settings) + self.with ( + name='linux-kernel-headers', # FIXME: we do not mirror all 12 debian arch's, -# mirror=mirrors.lilypondorg_deb, -# version='2.5.999-test7-bk-17', - mirror=mirrors.lkh_deb, - strip_components=0, - format='deb') +# version=debian.get_packages ()['linux-kernel-headers'].version (), +# mirror=mirrors.lilypondorg_deb, + version='2.5.999-test7-bk-17', + mirror=mirrors.lkh_deb, + strip_components=0, + format='deb') Linux_headers__linux__ppc = Linux_headers__debian #Linux_headers__linux__64 = Linux_headers__debian