diff --git a/.cproject b/.cproject
new file mode 100755
index 000000000000..6db4cbe2447e
--- /dev/null
+++ .cproject
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 000000000000..500c9ee08dca
--- /dev/null
+++ .project
@@ -0,0 +1,34 @@
+
+
+ gcc-6
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
+
+ build-gcc
+ 2
+ D:/develop/workspaces/c1/amigaos-cross-toolchain/.build-m68k/build/gcc-6
+
+
+
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
new file mode 100755
index 000000000000..caef162d88d1
--- /dev/null
+++ .settings/language.settings.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.cdt.codan.core.prefs b/.settings/org.eclipse.cdt.codan.core.prefs
new file mode 100755
index 000000000000..b5248c620107
--- /dev/null
+++ .settings/org.eclipse.cdt.codan.core.prefs
@@ -0,0 +1,71 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.codan.checkers.errnoreturn=Warning
+org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false}
+org.eclipse.cdt.codan.checkers.errreturnvalue=Error
+org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"}
+org.eclipse.cdt.codan.checkers.nocommentinside=-Error
+org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"}
+org.eclipse.cdt.codan.checkers.nolinecomment=-Error
+org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"}
+org.eclipse.cdt.codan.checkers.noreturn=Error
+org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false}
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"}
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"}
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"}
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false}
+org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
+org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"}
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true}
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"}
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"}
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"}
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"}
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"}
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"}
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"}
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"}
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"}
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"}
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false}
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")}
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"}
diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs
new file mode 100755
index 000000000000..8ec9fe72ca59
--- /dev/null
+++ .settings/org.eclipse.cdt.core.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+environment/project/cdt.managedbuild.config.gnu.cross.exe.debug.452878522/PATH/delimiter=;
+environment/project/cdt.managedbuild.config.gnu.cross.exe.debug.452878522/PATH/operation=replace
+environment/project/cdt.managedbuild.config.gnu.cross.exe.debug.452878522/PATH/value=C\:\\WINDOWS\\system32;C\:\\WINDOWS;C\:\\Program Files\\SlikSvn\\bin;C\:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;c\:\\cygwin\\bin;D\:\\develop\\workspaces\\c1\\amigaos-cross-toolchain\\m68k-amigaos\\bin
+environment/project/cdt.managedbuild.config.gnu.cross.exe.debug.452878522/append=true
+environment/project/cdt.managedbuild.config.gnu.cross.exe.debug.452878522/appendContributed=true
diff --git a/.settings/org.eclipse.core.runtime.prefs b/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 000000000000..12511e62a174
--- /dev/null
+++ .settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,5 @@
+content-types/enabled=true
+content-types/org.eclipse.cdt.core.cHeader/file-extensions=def
+content-types/org.eclipse.cdt.core.cxxHeader/file-extensions=h
+content-types/org.eclipse.cdt.core.cxxSource/file-extensions=c
+eclipse.preferences.version=1
diff --git a/config.sub b/config.sub
index 41146e11c6c9..35247fe0c474 100755
--- config.sub
+++ config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2016-01-01'
+timestamp='2017-04-21'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -500,7 +500,7 @@ case $basic_machine in
amiga | amiga-*)
basic_machine=m68k-unknown
;;
- amigaos | amigados)
+ amigaos | amigaosvasm | amigados)
basic_machine=m68k-unknown
os=-amigaos
;;
@@ -1380,7 +1380,7 @@ case $os in
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rt* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 51e2bc86e9a4..4aedf54bab12 100644
--- gcc/Makefile.in
+++ gcc/Makefile.in
@@ -1199,6 +1199,7 @@ OBJS = \
auto-inc-dec.o \
auto-profile.o \
bb-reorder.o \
+ bbb-opts.o \
bitmap.o \
bt-load.o \
builtins.o \
@@ -1986,7 +1987,7 @@ gcc-nm.c: gcc-ar.c
cp $^ $@
COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o vec.o ggc-none.o \
- collect-utils.o file-find.o hash-table.o
+ collect-utils.o file-find.o hash-table.o $(EXTRA_COLLECT2_OBJS)
COLLECT2_LIBS = @COLLECT2_LIBS@
collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
# Don't try modifying collect2 (aka ld) in place--it might be linking this.
@@ -3270,7 +3271,7 @@ endif
install-strip: install
# Handle cpp installation.
-install-cpp: installdirs cpp$(exeext)
+install-cpp: installdirs cpp$(exeext) all.cross
-if test "$(enable_as_accelerator)" != "yes" ; then \
rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
$(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
diff --git a/gcc/amigacollect2.c b/gcc/amigacollect2.c
new file mode 100755
index 000000000000..941ea0248fbe
--- /dev/null
+++ gcc/amigacollect2.c
@@ -0,0 +1,348 @@
+/* GG-local whole file: dynamic libraries */
+/* Supplimentary functions that get compiled and linked to collect2 for
+ AmigaOS target.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+
+/* From collect2.c: */
+
+void maybe_unlink(const char *);
+void fatal_error(location_t, const char *, ...);
+void fork_execute(const char *, char **, bool);
+
+extern char *c_file_name;
+extern int debug;
+
+/* Local functions. */
+
+static void safename (char *);
+static void add_lib (const char *);
+static void cat (const char *, FILE *);
+
+/* Names of temporary files we create. */
+#define XLIBS_C_NAME "xlibs.c"
+#define XLIBS_O_NAME "xlibs.o"
+#define SHARED_X_NAME "shared.x"
+
+/* Suffix which is prepended to "-l" options for dynamic libraries. */
+#define DYNAMIC_LIB_SUFFIX "_ixlibrary"
+
+/* Structure that holds library names. */
+struct liblist
+{
+ struct liblist *next;
+ char *name;
+ char *cname;
+};
+
+/* Not zero if "-static" was specified on GCC command line or if all the
+ libraries are static. */
+static int flag_static=0;
+
+/* Not zero if linking a base relative executable. This is recognized by
+ presence of "-m amiga_bss" on the linker's commandline. */
+static int flag_baserel=0;
+
+/* Not zero if some of the specified libraries are dynamic. */
+static int found_dynamic_libs=0;
+
+/* List of linker libraries. */
+struct liblist *head = NULL;
+
+/* Return 1 if collect2 should do something more apart from tlink. We want it
+ to call "postlink" and "strip" if linking with dynamic libraries. */
+
+int
+amigaos_do_collecting (void)
+{
+ return !flag_static;
+}
+
+/* Check for presence of "-static" on the GCC command line. We should not do
+ collecting if this flag was specified. */
+
+void
+amigaos_gccopts_hook (const char *arg)
+{
+ if (strncmp(arg, "-static", strlen("-static"))==0)
+ flag_static=1;
+}
+
+/* Replace unprintable characters with underscores. Used by "add_lib()". */
+
+static void
+safename (char *p)
+{
+ if (!ISALPHA(*p))
+ *p = '_';
+ p++;
+ while (*p)
+ {
+ if (!ISALNUM(*p))
+ *p = '_';
+ p++;
+ }
+}
+
+/* Add a library to the list of dynamic libraries. First make sure that the
+ library is actually dynamic. Used by "amigaos_libname_hook()". */
+
+static void
+add_lib (const char *name)
+{
+ struct liblist *lib;
+ static char buf[256];
+
+ for (lib = head; lib; lib = lib->next)
+ if (!strcmp(lib->name, name))
+ return;
+
+ /* A2IXDIR_PREFIX is passed by "make". */
+ sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", name);
+ if (access(buf, R_OK))
+ return;
+
+ lib = (struct liblist*)xmalloc(sizeof(struct liblist));
+ lib->name = xstrdup(name);
+ lib->cname = xstrdup(name);
+ safename(lib->cname);
+ lib->next = head;
+ head = lib;
+
+ if (debug)
+ fprintf(stderr, "found dynamic library, name: %s, cname: %s\n", lib->name,
+ lib->cname);
+
+ found_dynamic_libs=1;
+}
+
+/* Check if the argument is a linker library. Call "add_lib()" if yes. */
+
+void
+amigaos_libname_hook (const char *arg)
+{
+ int len = strlen(arg);
+ if (flag_static)
+ return;
+
+ if (len > 2 && !memcmp(arg, "-l", 2))
+ add_lib(arg + 2);
+ else if (len > 2 && !strcmp(arg + len - 2, ".a"))
+ {
+ const char *lib;
+
+ ((char*)arg)[len - 2] = '\0';
+ lib = strrchr(arg, '/');
+ if (lib == NULL)
+ lib = strrchr(arg, ':');
+ if (lib == NULL)
+ lib = arg - 1;
+ if (!strncmp(lib + 1, "lib", 3))
+ add_lib(lib + 4);
+ ((char *)arg)[len - 2] = '.';
+ }
+}
+
+/* Delete temporary files. */
+
+void
+amigaos_collect2_cleanup (void)
+{
+ if (flag_static)
+ return;
+ maybe_unlink(XLIBS_C_NAME);
+ maybe_unlink(XLIBS_O_NAME);
+ maybe_unlink(SHARED_X_NAME);
+}
+
+/* Copy file named by FNAME to X. */
+
+static void
+cat (const char *fname, FILE *x)
+{
+#define BUFSIZE 16384
+ FILE *in;
+ static char buf[BUFSIZE];
+ int bytes;
+
+ in = fopen(fname, "r");
+ if (in == NULL)
+ fatal_error (input_location, "%s", fname);
+ while (!feof(in) && (bytes = fread(buf, 1, BUFSIZE, in)))
+ fwrite(buf, 1, bytes, x);
+ fclose(in);
+}
+
+/* If no dynamic libraries were found, perform like "-static". Otherwise,
+ create "xlibs.c", "shared.x" and invoke "gcc" to create "xlibs.o". We also
+ have to adjust the linker commandline. */
+
+void
+amigaos_prelink_hook (const char **ld1_argv, int *strip_flag)
+{
+ if (flag_static)
+ return;
+
+ if (!found_dynamic_libs)
+ {
+ flag_static=1;
+ /* If the user has not requested "-static", but has requested "-s",
+ collect2 removes "-s" from the "ld1_argv", and calls "strip" after
+ linking. However, this would not be efficient if we linked the
+ executable without any dynamic library. In this case, we put "-s"
+ back. */
+ if (*strip_flag)
+ {
+ /* Add "-s" as the last argument on the command line. */
+ while (*ld1_argv)
+ ld1_argv++;
+ *ld1_argv++="-s";
+ *ld1_argv=0;
+ *strip_flag=0;
+ }
+ }
+ else
+ {
+ FILE *x, *out;
+ struct liblist *lib;
+ static const char* argv[]={0, "-c", XLIBS_C_NAME, 0};
+ const char **ld1_end, **ld1;
+
+ /* Prepend suffixes to dynamic lib names. In addition, check if we are
+ linking a base relative executable. */
+ for (ld1=ld1_argv; *ld1; ld1++)
+ {
+ int len=strlen(*ld1);
+ if (strncmp(*ld1, "-l", strlen("-l"))==0)
+ {
+ for (lib=head; lib; lib=lib->next)
+ if (strcmp(*ld1+strlen("-l"), lib->name)==0)
+ {
+ char *newname=(char*)
+ xmalloc(strlen(*ld1)+strlen(DYNAMIC_LIB_SUFFIX)+1);
+ strcpy(newname, *ld1);
+ strcat(newname, DYNAMIC_LIB_SUFFIX);
+ *ld1=newname;
+ break;
+ }
+ }
+ else if (len > 2 && !strcmp(*ld1 + len - 2, ".a"))
+ {
+ const char *libname;
+ int substituted=0;
+
+ ((char *)(*ld1))[len - 2] = '\0';
+ libname = strrchr(*ld1, '/');
+ if (libname == NULL)
+ libname = strrchr(*ld1, ':');
+ if (libname == NULL)
+ libname = *ld1 - 1;
+ if (!strncmp(libname + 1, "lib", 3))
+ for (lib=head; lib; lib=lib->next)
+ if (strcmp(libname+4, lib->name)==0)
+ {
+ char *newname=(char*)xmalloc(strlen(*ld1)+
+ strlen(DYNAMIC_LIB_SUFFIX)+3);
+ strcpy(newname, *ld1);
+ strcat(newname, DYNAMIC_LIB_SUFFIX);
+ strcat(newname, ".a");
+ *ld1=newname;
+ substituted=1;
+ break;
+ }
+ if (!substituted)
+ ((char *)(*ld1))[len - 2] = '.';
+ }
+ else if (strcmp(ld1[0], "-m")==0 && ld1[1]
+ && strcmp(ld1[1], "amiga_bss")==0)
+ {
+ flag_baserel=1;
+ break;
+ }
+ }
+
+ out = fopen(XLIBS_C_NAME, "w");
+ if (out == NULL)
+ fatal_error (input_location, "%s", XLIBS_C_NAME);
+ x = fopen(SHARED_X_NAME, "w");
+ if (x == NULL)
+ fatal_error (input_location, "%s", SHARED_X_NAME);
+
+ cat((flag_baserel ? A2IXDIR_PREFIX "/amiga_exe_baserel_script.x"
+ : A2IXDIR_PREFIX "/amiga_exe_script.x"), x);
+ for (lib = head; lib; lib = lib->next)
+ {
+ static char buf[256];
+ sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", lib->name);
+ fprintf(out, "extern long %sBase; long *__p%sBase = &%sBase;\n",
+ lib->cname, lib->cname, lib->cname);
+ cat(buf, x);
+ } /* {{ */
+ fprintf(x, "}}\n");
+ fclose(out);
+ fclose(x);
+ argv[0]=c_file_name;
+ fork_execute("gcc", (char **)argv, false);
+
+ /* Unfortunately, unlike "-s", "-T" cannot be specified as the last
+ argument. We put it after "-L" args. */
+ ld1_end=ld1_argv;
+ while (*ld1_end)
+ ld1_end++;
+ ld1_end++;
+ /* "ld1_end" now points after the terminating 0 of "ld1_argv". */
+
+ ld1=ld1_end-2;
+ while (ld1>ld1_argv && strncmp(*ld1, "-L", strlen("-L")))
+ ld1--;
+ if (ld1==ld1_argv)
+ fatal_error (input_location, "no -L arguments");
+ ld1++;
+ /* "ld1" now points after "-L". */
+
+ /* Shift all the arguments after "-L" one position right. */
+ memmove(ld1+1, ld1, (ld1_end-ld1)*sizeof(*ld1));
+ /* Put -Tshared.x in the now empty space. */
+ *ld1="-T" SHARED_X_NAME;
+ }
+}
+
+/* Be lazy and just call "postlink". */
+
+void
+amigaos_postlink_hook (const char *output_file)
+{
+ static const char *argv[]={"postlink", 0, 0, 0};
+ if (flag_static)
+ return;
+
+ if (flag_baserel)
+ {
+ argv[1]="-baserel";
+ argv[2]=output_file;
+ }
+ else
+ argv[1]=output_file;
+ fork_execute("postlink", (char **)argv, false);
+}
diff --git a/gcc/bbb-opts.c b/gcc/bbb-opts.c
new file mode 100755
index 000000000000..9e989e9b1ec0
--- /dev/null
+++ gcc/bbb-opts.c
@@ -0,0 +1,4705 @@
+/* Bebbo's Optimizations.
+ Copyright (C) 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2017 Stefan "Bebbo" Franke.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ . */
+
+/**
+ * SBF (Stefan "Bebbo" Franke):
+ *
+ * This pass performs multiple optimizations.
+ *
+ * #1 propagate_moves
+ * check if a->b->a can be moved out of a loop.
+ *
+ * #2 strcpy
+ * check if a temp reg can be eliminated.
+ *
+ * #3 const_comp_sub
+ * convert a compare with int constant into sub statement.
+ *
+ * #4 merge_add
+ * merge adds
+ *
+ * #5 elim_dead_assign
+ * eliminate some dead assignments.
+ *
+ * #6 shrink stack frame
+ * remove push/pop for unused variables
+ *
+ * #7 rename register
+ * rename registers without breaking register parameters, inline asm etc.
+ *
+ * Lessons learned:
+ *
+ * - do not trust existing code, better delete insns and inster a new one.
+ * - do not modify insns, create new insns from pattern
+ * - do not reuse registers, create new reg rtx instances
+ *
+ */
+
+#include "config.h"
+#define INCLUDE_VECTOR
+#define INCLUDE_SET
+#define INCLUDE_MAP
+#include "system.h"
+#include "coretypes.h"
+#include "backend.h"
+#include "target.h"
+#include "rtl.h"
+#include "tm_p.h"
+#include "insn-config.h"
+#include "recog.h"
+#include "cfgrtl.h"
+#include "emit-rtl.h"
+#include "tree.h"
+#include "tree-pass.h"
+#include "conditions.h"
+#include "langhooks.h"
+#include
+#include
+#include