Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Remove gcc and cleanup cross/gcc
Browse files Browse the repository at this point in the history
Dependency tools::gcc isn't used anymore.
  • Loading branch information
hahnjo committed Oct 20, 2019
1 parent 7a56eab commit badbbfc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 89 deletions.
1 change: 0 additions & 1 deletion gub/cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def change_target_package (package):
'system::gcc',
'tools::librestrict',
# 'tools::binutils',
# 'tools::gcc',
'tools::make',
'tools::libtool',
'tools::file',
Expand Down
18 changes: 13 additions & 5 deletions gub/specs/cross/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from gub import cross
from gub import loggedos
from gub import misc
from gub.specs import gcc

class Gcc (cross.AutoBuild):
source = 'http://ftp.gnu.org/pub/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2'
Expand Down Expand Up @@ -35,7 +34,8 @@ class Gcc (cross.AutoBuild):
''')
def patch (self):
cross.AutoBuild.patch (self)
gcc.do_not_look_in_slash_usr (self)
self.file_sub ([('( *gcc_cv_tool_dirs=.*gcc_cv_tool_dirs/usr)', r'#\1')],
'%(srcdir)s/configure')
@context.subst_method
def NM_FOR_TARGET (self):
return '%(toolchain_prefix)snm'
Expand All @@ -61,14 +61,22 @@ def pre_install (self):
cross.AutoBuild.pre_install (self)
# Only id <PREFIX>/<TARGET-ARCH>/bin exists, gcc's install installs
# the plain gcc drivers without <TOOLCHAIN-PREFIX>gcc
# self.system ('mkdir -p %(install_root)s%(cross_prefix)s/%(target_architecture)s/bin')
self.system ('mkdir -p %(install_root)s%(prefix_dir)s/%(target_architecture)s/bin')
def install (self):
cross.AutoBuild.install (self)
gcc.move_target_libs (self, '%(install_prefix)s%(cross_dir)s/%(target_architecture)s')
gcc.move_target_libs (self, '%(install_prefix)s%(cross_dir)s/lib')
move_target_libs (self, '%(install_prefix)s%(cross_dir)s/%(target_architecture)s')
move_target_libs (self, '%(install_prefix)s%(cross_dir)s/lib')
self.disable_libtool_la_files ('stdc[+][+]')

def move_target_libs (self, libdir):
self.system ('mkdir -p %(install_prefix)s/lib || true')
def move_target_lib (logger, file_name):
base = os.path.split (self.expand (file_name))[1]
loggedos.rename (logger, file_name, os.path.join (self.expand ('%(install_prefix)s/lib'), base))
# .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 ())

class Gcc__from__source (Gcc):
dependencies = (Gcc.dependencies
+ ['cross/gcc-core', 'glibc-core'])
Expand Down
82 changes: 0 additions & 82 deletions gub/specs/gcc.py

This file was deleted.

1 change: 0 additions & 1 deletion gub/specs/librestrict.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def flavours (self):
def BARFS_WITH_2_5_1_name (self):
return 'librestrict-' + '-'.join (self.librestrict_flavours ())
dependencies = [
# 'tools::gcc'
'system::gcc'
]
def get_conflict_dict (self):
Expand Down

0 comments on commit badbbfc

Please sign in to comment.