mirror of
https://frontier.innolan.net/github/amigaos-cross-toolchain6.git
synced 2024-10-19 10:29:55 +00:00
@R allow multiple definitions for c++ example
This commit is contained in:
@ -30,7 +30,7 @@ hello-stdio.clib2: hello-stdio.c
|
|||||||
$(CC) -mcrt=clib2 -m68020 $(CFLAGS) -o $@ $<
|
$(CC) -mcrt=clib2 -m68020 $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
hello-iostream: hello-iostream.cpp
|
hello-iostream: hello-iostream.cpp
|
||||||
$(CXX) -noixemul -m68020 $(CXXFLAGS) -o $@ $^
|
$(CXX) -noixemul -m68020 $(CXXFLAGS) -o $@ $^ -Xlinker --allow-multiple-definition
|
||||||
|
|
||||||
test-ctors: test-ctors.cpp
|
test-ctors: test-ctors.cpp
|
||||||
$(CXX) -noixemul -m68020 $(CXXFLAGS) -D__A -c -o test-ctors-a.o $<
|
$(CXX) -noixemul -m68020 $(CXXFLAGS) -D__A -c -o test-ctors-a.o $<
|
||||||
|
|||||||
@ -85,13 +85,13 @@ def install_ndk():
|
|||||||
execute('sfdc', '--target=m68k-amigaos', '--mode=lvo',
|
execute('sfdc', '--target=m68k-amigaos', '--mode=lvo',
|
||||||
'--output={prefix}/{target}/ndk/include/lvo/%s_lib.i' % base, name)
|
'--output={prefix}/{target}/ndk/include/lvo/%s_lib.i' % base, name)
|
||||||
|
|
||||||
copytree('{prefix}/{target}/ndk/include', '{prefix}/os-include')
|
copytree('{prefix}/{target}/ndk/include', '{prefix}/{target}/sys-include')
|
||||||
|
|
||||||
@recipe('headers-install')
|
@recipe('headers-install')
|
||||||
def headers_install():
|
def headers_install():
|
||||||
info('installing ixemul header files')
|
info('installing ixemul header files')
|
||||||
|
|
||||||
copytree('{sources}/{ixemul}/include', '{prefix}/{target}/libnix/include')
|
# copytree('{sources}/{ixemul}/include', '{prefix}/{target}/libnix/include')
|
||||||
|
|
||||||
|
|
||||||
@recipe('fd2sfd-install')
|
@recipe('fd2sfd-install')
|
||||||
@ -250,8 +250,42 @@ def download():
|
|||||||
name = path.basename(url)
|
name = path.basename(url)
|
||||||
fetch(name, url)
|
fetch(name, url)
|
||||||
|
|
||||||
|
def shallowCheckout(murl, mpath, mbranch):
|
||||||
|
if murl == None:
|
||||||
|
return
|
||||||
|
|
||||||
|
if path.exists(path.join(mpath, '.git')):
|
||||||
|
return
|
||||||
|
|
||||||
|
if mbranch == None:
|
||||||
|
execute('git', 'clone', murl, '--depth', '1', mpath)
|
||||||
|
else:
|
||||||
|
execute('git', 'clone', murl, '--depth', '1', '-b', mbranch, mpath)
|
||||||
|
|
||||||
def update():
|
def update():
|
||||||
execute('git', 'submodule', 'init');
|
execute('git', 'submodule', 'init');
|
||||||
|
|
||||||
|
with open('.gitmodules') as f:
|
||||||
|
content = f.readlines()
|
||||||
|
|
||||||
|
mpath = None
|
||||||
|
murl = None
|
||||||
|
mbranch = None
|
||||||
|
|
||||||
|
for x in content:
|
||||||
|
x = x.strip()
|
||||||
|
if x.startswith('['):
|
||||||
|
shallowCheckout(murl, mpath, mbranch)
|
||||||
|
mpath = None
|
||||||
|
murl = None
|
||||||
|
mbranch = None
|
||||||
|
elif x.startswith('url'):
|
||||||
|
murl = x.partition('=')[2].strip()
|
||||||
|
elif x.startswith('path'):
|
||||||
|
mpath = x.partition('=')[2].strip()
|
||||||
|
elif x.startswith('branch'):
|
||||||
|
mbranch = x.partition('=')[2].strip()
|
||||||
|
|
||||||
execute('git', 'submodule', 'update');
|
execute('git', 'submodule', 'update');
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
@ -314,27 +348,28 @@ def _build(pull):
|
|||||||
required programs, headers and libraries are present.
|
required programs, headers and libraries are present.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if checkstamps('{binutils}'):
|
if not args.nodeps:
|
||||||
removemodule('{binutils}')
|
if checkstamps('{binutils}'):
|
||||||
|
removemodule('{binutils}')
|
||||||
if checkstamps('{gcc}'):
|
|
||||||
|
if checkstamps('{gcc}'):
|
||||||
|
removemodule('{libnix}')
|
||||||
|
removemodule('{clib2}')
|
||||||
|
removemodule('{libdebug}')
|
||||||
|
removemodule('{libm}')
|
||||||
|
|
||||||
|
if checkstamps('{libnix}'):
|
||||||
removemodule('{libnix}')
|
removemodule('{libnix}')
|
||||||
|
|
||||||
|
if checkstamps('{clib2}'):
|
||||||
removemodule('{clib2}')
|
removemodule('{clib2}')
|
||||||
|
|
||||||
|
if checkstamps('{libdebug}'):
|
||||||
removemodule('{libdebug}')
|
removemodule('{libdebug}')
|
||||||
|
|
||||||
|
if checkstamps('{libm}'):
|
||||||
removemodule('{libm}')
|
removemodule('{libm}')
|
||||||
|
|
||||||
if checkstamps('{libnix}'):
|
|
||||||
removemodule('{libnix}')
|
|
||||||
|
|
||||||
if checkstamps('{clib2}'):
|
|
||||||
removemodule('{clib2}')
|
|
||||||
|
|
||||||
if checkstamps('{libdebug}'):
|
|
||||||
removemodule('{libdebug}')
|
|
||||||
|
|
||||||
if checkstamps('{libm}'):
|
|
||||||
removemodule('{libm}')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
find_executable('perl')
|
find_executable('perl')
|
||||||
@ -789,6 +824,7 @@ if __name__ == "__main__":
|
|||||||
help='installation directory')
|
help='installation directory')
|
||||||
parser.add_argument('--threads', type=str, default='1',
|
parser.add_argument('--threads', type=str, default='1',
|
||||||
help='number of threads for make')
|
help='number of threads for make')
|
||||||
|
parser.add_argument('--nodeps', action='store_true', help='disable dependency checking')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
setvar(top=path.abspath(path.dirname(sys.argv[0])),
|
setvar(top=path.abspath(path.dirname(sys.argv[0])),
|
||||||
|
|||||||
Reference in New Issue
Block a user