|
| 1 | +diff --git a/gcc/config.gcc b/gcc/config.gcc |
| 2 | +index c5064dd3766..b244608f001 100644 |
| 3 | +--- a/gcc/config.gcc |
| 4 | ++++ b/gcc/config.gcc |
| 5 | +@@ -1366,6 +1366,11 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*) |
| 6 | + tm_file="$tm_file newlib-stdint.h" |
| 7 | + tmake_file="${tmake_file} arm/t-bpabi" |
| 8 | + use_gcc_stdint=wrap |
| 9 | ++ tm_file="${tm_file} devkitpro.h" |
| 10 | ++ extra_options="${extra_options} devkitpro.opt" |
| 11 | ++ case ${enable_threads} in |
| 12 | ++ "" | yes | posix) thread_file='posix' ;; |
| 13 | ++ esac |
| 14 | + ;; |
| 15 | + arm*-*-fuchsia*) |
| 16 | + tm_file="${tm_file} fuchsia.h arm/fuchsia-elf.h glibc-stdint.h" |
1 | 17 | diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in |
2 | 18 | index 0d3082b569f..15be7fc47b3 100644 |
3 | 19 | --- a/gcc/config/arm/arm-cpus.in |
@@ -168,6 +184,74 @@ index bfb294beaa3..7e2e1c7bbbe 100644 |
168 | 184 | -#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %{!nolibc:%L} --end-group" |
169 | 185 | +#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group" |
170 | 186 | + |
| 187 | +diff --git a/gcc/config/devkitpro.h b/gcc/config/devkitpro.h |
| 188 | +new file mode 100644 |
| 189 | +index 00000000000..180a9ea8553 |
| 190 | +--- /dev/null |
| 191 | ++++ b/gcc/config/devkitpro.h |
| 192 | +@@ -0,0 +1,27 @@ |
| 193 | ++/* Definitions for devkitPro toolchains. |
| 194 | ++ Copyright (C) 2016-2018 Free Software Foundation, Inc. |
| 195 | ++ This file is part of GCC. |
| 196 | ++ GCC is free software; you can redistribute it and/or modify it |
| 197 | ++ under the terms of the GNU General Public License as published |
| 198 | ++ by the Free Software Foundation; either version 3, or (at your |
| 199 | ++ option) any later version. |
| 200 | ++ GCC is distributed in the hope that it will be useful, but WITHOUT |
| 201 | ++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 202 | ++ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 203 | ++ License for more details. |
| 204 | ++ Under Section 7 of GPL version 3, you are granted additional |
| 205 | ++ permissions described in the GCC Runtime Library Exception, version |
| 206 | ++ 3.1, as published by the Free Software Foundation. |
| 207 | ++ You should have received a copy of the GNU General Public License and |
| 208 | ++ a copy of the GCC Runtime Library Exception along with this program; |
| 209 | ++ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
| 210 | ++ <http://www.gnu.org/licenses/>. */ |
| 211 | ++ |
| 212 | ++#undef TARGET_OS_CPP_BUILTINS |
| 213 | ++#define TARGET_OS_CPP_BUILTINS() \ |
| 214 | ++ do { \ |
| 215 | ++ builtin_define ("__DEVKITPRO__"); \ |
| 216 | ++ builtin_define ("__DEVKITARM__"); \ |
| 217 | ++ } while (0) |
| 218 | ++ |
| 219 | ++ |
| 220 | +diff --git a/gcc/config/devkitpro.opt b/gcc/config/devkitpro.opt |
| 221 | +new file mode 100644 |
| 222 | +index 00000000000..9acbbf9d27c |
| 223 | +--- /dev/null |
| 224 | ++++ b/gcc/config/devkitpro.opt |
| 225 | +@@ -0,0 +1,29 @@ |
| 226 | ++; Options for devkitPro toolchains. |
| 227 | ++ |
| 228 | ++; Copyright (C) 2011-2018 Free Software Foundation, Inc. |
| 229 | ++; |
| 230 | ++; This file is part of GCC. |
| 231 | ++; |
| 232 | ++; GCC is free software; you can redistribute it and/or modify it under |
| 233 | ++; the terms of the GNU General Public License as published by the Free |
| 234 | ++; Software Foundation; either version 3, or (at your option) any later |
| 235 | ++; version. |
| 236 | ++; |
| 237 | ++; GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
| 238 | ++; WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 239 | ++; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 240 | ++; for more details. |
| 241 | ++; |
| 242 | ++; You should have received a copy of the GNU General Public License |
| 243 | ++; along with GCC; see the file COPYING3. If not see |
| 244 | ++; <http://www.gnu.org/licenses/>. |
| 245 | ++ |
| 246 | ++; See the GCC internals manual (options.texi) for a description of |
| 247 | ++; this file's format. |
| 248 | ++ |
| 249 | ++; Please try to keep this file in ASCII collating order. |
| 250 | ++ |
| 251 | ++pthread |
| 252 | ++Driver |
| 253 | ++ |
| 254 | ++; This comment is to ensure we retain the blank line above. |
171 | 255 | diff --git a/gcc/config/i386/host-mingw32.cc b/gcc/config/i386/host-mingw32.cc |
172 | 256 | index 3b0d83ffc60..6e063b6ccd0 100644 |
173 | 257 | --- a/gcc/config/i386/host-mingw32.cc |
@@ -239,3 +323,48 @@ index b98b86a5a88..3f62b3616d2 100644 |
239 | 323 | /* Declare the __dso_handle variable. It should have a unique value |
240 | 324 | in every shared-object; in a main program its value is zero. The |
241 | 325 | object should in any case be protected. This means the instance |
| 326 | +diff --git a/libgcc/gthr.h b/libgcc/gthr.h |
| 327 | +index 7943c94f6d1..1edc5360f6a 100644 |
| 328 | +--- a/libgcc/gthr.h |
| 329 | ++++ b/libgcc/gthr.h |
| 330 | +@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
| 331 | + /* The pe-coff weak support isn't fully compatible to ELF's weak. |
| 332 | + For static libraries it might would work, but as we need to deal |
| 333 | + with shared versions too, we disable it for mingw-targets. */ |
| 334 | +-#ifdef __MINGW32__ |
| 335 | ++#ifdef __MINGW32__ || defined(__DEVKITARM__) |
| 336 | + #undef GTHREAD_USE_WEAK |
| 337 | + #define GTHREAD_USE_WEAK 0 |
| 338 | + #endif |
| 339 | +diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am |
| 340 | +index 7708f4cf6c5..01743392303 100644 |
| 341 | +--- a/libstdc++-v3/include/Makefile.am |
| 342 | ++++ b/libstdc++-v3/include/Makefile.am |
| 343 | +@@ -1366,6 +1366,7 @@ ${host_builddir}/gthr.h: ${toplevel_srcdir}/libgcc/gthr.h stamp-${host_alias} |
| 344 | + -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \ |
| 345 | + -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \ |
| 346 | + -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \ |
| 347 | ++ -e 's/_GLIBCXX___DEVKITARM_GLIBCXX___/__DEVKITARM__/g' \ |
| 348 | + -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ |
| 349 | + < $< > $@ |
| 350 | + |
| 351 | +diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in |
| 352 | +index 7023c2de23e..33bec80c2ce 100644 |
| 353 | +--- a/libstdc++-v3/include/Makefile.in |
| 354 | ++++ b/libstdc++-v3/include/Makefile.in |
| 355 | +@@ -336,6 +336,7 @@ prefix = @prefix@ |
| 356 | + program_transform_name = @program_transform_name@ |
| 357 | + psdir = @psdir@ |
| 358 | + python_mod_dir = @python_mod_dir@ |
| 359 | ++runstatedir = @runstatedir@ |
| 360 | + sbindir = @sbindir@ |
| 361 | + sharedstatedir = @sharedstatedir@ |
| 362 | + srcdir = @srcdir@ |
| 363 | +@@ -1857,6 +1858,7 @@ ${host_builddir}/gthr.h: ${toplevel_srcdir}/libgcc/gthr.h stamp-${host_alias} |
| 364 | + -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \ |
| 365 | + -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \ |
| 366 | + -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \ |
| 367 | ++ -e 's/_GLIBCXX___DEVKITARM_GLIBCXX___/__DEVKITARM__/g' \ |
| 368 | + -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ |
| 369 | + < $< > $@ |
| 370 | + |
0 commit comments