From cd842777c9dbb901215888069a81715acf435c83 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Thu, 25 Sep 2014 22:50:22 +0200 Subject: [PATCH] Some fixes to make it work again on Mac OS X --- ASFilter/asfilter.cc | 2 +- gcc/gcc/config/m68k/m68k-mac-pragmas.c | 8 ++++---- gcc/gcc/config/m68k/m68k.c | 8 ++++---- prepare-headers.sh | 3 +++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ASFilter/asfilter.cc b/ASFilter/asfilter.cc index a318cafeed..23c96f936a 100644 --- a/ASFilter/asfilter.cc +++ b/ASFilter/asfilter.cc @@ -92,7 +92,7 @@ int main(int argc, char *argv[]) if(rx::regex_match(line, match, rtd)) { out << "\tmove.l (%a7)+, %a0\n"; - out << "\tlea " + match[1] + "(%a7), %a7\n"; + out << "\tlea " + match[1].str() + "(%a7), %a7\n"; out << "\tjmp (%a0)\n"; hadRts = true; } diff --git a/gcc/gcc/config/m68k/m68k-mac-pragmas.c b/gcc/gcc/config/m68k/m68k-mac-pragmas.c index df402869ea..371afd0cd7 100644 --- a/gcc/gcc/config/m68k/m68k-mac-pragmas.c +++ b/gcc/gcc/config/m68k/m68k-mac-pragmas.c @@ -1,3 +1,7 @@ +#include +#include +#include + #include "config.h" #include "system.h" #include "coretypes.h" @@ -9,10 +13,6 @@ #include "diagnostic-core.h" #include "cpplib.h" -#include -#include -#include - std::map pragma_parameter_register_names; extern std::map< std::string, std::vector > pragma_parameter_directives; diff --git a/gcc/gcc/config/m68k/m68k.c b/gcc/gcc/config/m68k/m68k.c index e3db1d4a45..bcac96ea32 100644 --- a/gcc/gcc/config/m68k/m68k.c +++ b/gcc/gcc/config/m68k/m68k.c @@ -17,6 +17,10 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +#include +#include +#include + #include "config.h" #include "system.h" #include "coretypes.h" @@ -51,10 +55,6 @@ along with GCC; see the file COPYING3. If not see #include "diagnostic-core.h" -#include -#include -#include - std::map< std::string, std::vector > pragma_parameter_directives; diff --git a/prepare-headers.sh b/prepare-headers.sh index c431d28c97..a213927e0e 100644 --- a/prepare-headers.sh +++ b/prepare-headers.sh @@ -1,6 +1,9 @@ IN=$1 OUT=$2 +# Make Mac OS X's tr and sed not complain that the files are not UTF-8 +export LANG=en + # cp $IN/[A-Z]*.h $OUT/ for file in $(cd $IN; ls [A-Z]*.h); do tr '\r' '\n' < $IN/$file > $OUT/$file