mirror of
https://frontier.innolan.net/github/amigaos-cross-toolchain6.git
synced 2024-10-19 10:29:55 +00:00
Build extra tools with standard compiler settings.
This commit is contained in:
@@ -291,10 +291,15 @@ def unarc(name):
|
|||||||
|
|
||||||
|
|
||||||
@fill_in_args
|
@fill_in_args
|
||||||
def add_site_dir(dirname):
|
def find_site_dir(dirname):
|
||||||
prefix = sysconfig.EXEC_PREFIX
|
prefix = sysconfig.EXEC_PREFIX
|
||||||
destlib = sysconfig.get_config_var('DESTLIB')
|
destlib = sysconfig.get_config_var('DESTLIB')
|
||||||
dirname = path.join(dirname, destlib[len(prefix) + 1:], 'site-packages')
|
return path.join(dirname, destlib[len(prefix) + 1:], 'site-packages')
|
||||||
|
|
||||||
|
|
||||||
|
@fill_in_args
|
||||||
|
def add_site_dir(dirname):
|
||||||
|
dirname = find_site_dir(dirname)
|
||||||
info('adding "%s" to python site dirs', topdir(dirname))
|
info('adding "%s" to python site dirs', topdir(dirname))
|
||||||
site.addsitedir(dirname)
|
site.addsitedir(dirname)
|
||||||
|
|
||||||
@@ -356,10 +361,11 @@ def recipe(name, nargs=0):
|
|||||||
|
|
||||||
|
|
||||||
@recipe('python-setup', 1)
|
@recipe('python-setup', 1)
|
||||||
def python_setup(name):
|
def python_setup(name, **kwargs):
|
||||||
|
dest_dir = kwargs.get('dest_dir', '{host}')
|
||||||
with cwd(path.join('{build}', name)):
|
with cwd(path.join('{build}', name)):
|
||||||
execute(sys.executable, 'setup.py', 'build')
|
execute(sys.executable, 'setup.py', 'build')
|
||||||
execute(sys.executable, 'setup.py', 'install', '--prefix={host}')
|
execute(sys.executable, 'setup.py', 'install', '--prefix=' + dest_dir)
|
||||||
|
|
||||||
|
|
||||||
@recipe('fetch', 1)
|
@recipe('fetch', 1)
|
||||||
@@ -491,5 +497,5 @@ def require_header(headers, lang='c', errmsg='', symbol=None, value=None):
|
|||||||
__all__ = ['setvar', 'panic', 'cmpver', 'find_executable', 'chmod', 'execute',
|
__all__ = ['setvar', 'panic', 'cmpver', 'find_executable', 'chmod', 'execute',
|
||||||
'rmtree', 'mkdir', 'copy', 'copytree', 'unarc', 'fetch', 'cwd',
|
'rmtree', 'mkdir', 'copy', 'copytree', 'unarc', 'fetch', 'cwd',
|
||||||
'symlink', 'remove', 'move', 'find', 'textfile', 'env', 'path',
|
'symlink', 'remove', 'move', 'find', 'textfile', 'env', 'path',
|
||||||
'add_site_dir', 'python_setup', 'recipe', 'unpack', 'patch',
|
'add_site_dir', 'find_site_dir', 'python_setup', 'recipe',
|
||||||
'configure', 'make', 'require_header', 'touch']
|
'unpack', 'patch', 'configure', 'make', 'require_header', 'touch']
|
||||||
|
|||||||
+15
-23
@@ -362,11 +362,8 @@ def build():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
ARCH = '-m32' if platform.machine() == 'x86_64' else ''
|
ARCH = '-m32' if platform.machine() == 'x86_64' else ''
|
||||||
|
CC = ' '.join([CC, ARCH, '-std=gnu11'])
|
||||||
environ['CC'] = CC + ' ' + ARCH
|
CXX = ' '.join([CXX, ARCH, '-std=gnu++11'])
|
||||||
environ['CXX'] = CXX + ' ' + ARCH
|
|
||||||
|
|
||||||
setvar(cc=environ['CC'], cxx=environ['CXX'])
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Older gcc compilers (i.e. 2.95.3 and 3.4.6) and binutils have to be tricked
|
Older gcc compilers (i.e. 2.95.3 and 3.4.6) and binutils have to be tricked
|
||||||
@@ -374,26 +371,20 @@ def build():
|
|||||||
config.guess script knows nothing about x86-64 or darwin.
|
config.guess script knows nothing about x86-64 or darwin.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
with env(CC=environ['CC'] + ' -std=gnu11',
|
with env(CC=CC, CXX=CXX, CFLAGS='-g -O2 -Wall', CXXFLAGS='-g -O2 -Wall'):
|
||||||
CXX=environ['CXX'] + ' -std=gnu++11',
|
|
||||||
CFLAGS='-g -O2 -Wall',
|
|
||||||
CXXFLAGS='-g -O2 -Wall'):
|
|
||||||
configure('{binutils}',
|
configure('{binutils}',
|
||||||
'--prefix={target}',
|
'--prefix={target}',
|
||||||
'--host=i686-linux-gnu',
|
'--host=i686-linux-gnu',
|
||||||
'--target=m68k-amigaos',
|
'--target=m68k-amigaos',
|
||||||
from_dir='{submodules}/{binutils}')
|
from_dir='{submodules}/{binutils}')
|
||||||
touch_genfiles('{submodules}/{binutils}')
|
touch_genfiles('{submodules}/{binutils}')
|
||||||
make('{binutils}')
|
make('{binutils}')
|
||||||
make('{binutils}', 'install')
|
make('{binutils}', 'install')
|
||||||
|
|
||||||
unpack('{ixemul}', top_dir='ixemul')
|
unpack('{ixemul}', top_dir='ixemul')
|
||||||
patch('{ixemul}')
|
patch('{ixemul}')
|
||||||
|
|
||||||
with env(CC=environ['CC'] + ' -std=gnu11',
|
with env(CC=CC, CXX=CXX, CFLAGS='-g -O2 -Wall', CXXFLAGS='-g -O2 -Wall'):
|
||||||
CXX=environ['CXX'] + ' -std=gnu++11',
|
|
||||||
CFLAGS='-g -O2 -Wall',
|
|
||||||
CXXFLAGS='-g -O2 -Wall'):
|
|
||||||
configure('{gcc}',
|
configure('{gcc}',
|
||||||
'--prefix={target}',
|
'--prefix={target}',
|
||||||
'--host=i686-linux-gnu',
|
'--host=i686-linux-gnu',
|
||||||
@@ -403,11 +394,11 @@ def build():
|
|||||||
'--enable-version-specific-runtime-libs',
|
'--enable-version-specific-runtime-libs',
|
||||||
'--with-headers={sources}/{ixemul}/include',
|
'--with-headers={sources}/{ixemul}/include',
|
||||||
from_dir='{submodules}/{gcc}')
|
from_dir='{submodules}/{gcc}')
|
||||||
touch_genfiles('{submodules}/{gcc}')
|
touch_genfiles('{submodules}/{gcc}')
|
||||||
make('{gcc}', 'all-gcc',
|
make('{gcc}', 'all-gcc',
|
||||||
MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
|
MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
|
||||||
make('{gcc}', 'install-gcc',
|
make('{gcc}', 'install-gcc',
|
||||||
MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
|
MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
|
||||||
|
|
||||||
headers_install()
|
headers_install()
|
||||||
|
|
||||||
@@ -457,8 +448,9 @@ def build():
|
|||||||
make('{clib2}', makefile='GNUmakefile.68k')
|
make('{clib2}', makefile='GNUmakefile.68k')
|
||||||
install_clib2()
|
install_clib2()
|
||||||
|
|
||||||
make('{gcc}', MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
|
with env(CC=CC, CXX=CXX, CFLAGS='-g -O2 -Wall', CXXFLAGS='-g -O2 -Wall'):
|
||||||
make('{gcc}', 'install', MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
|
make('{gcc}', MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
|
||||||
|
make('{gcc}', 'install', MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
|
||||||
|
|
||||||
unpack('ira', top_dir='.', work_dir='{build}')
|
unpack('ira', top_dir='.', work_dir='{build}')
|
||||||
patch('ira', work_dir='{build}')
|
patch('ira', work_dir='{build}')
|
||||||
|
|||||||
Reference in New Issue
Block a user