From 5d988071d4763a08e3637ab9e4e9962d8bc2f94f Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Thu, 30 Dec 2021 13:16:52 +0700 Subject: [PATCH] xtensa: use psram-fix multilib for esp32 chip only --- gcc/config.gcc | 5 +++++ gcc/config/xtensa/t-xtensa | 4 ++-- gcc/config/xtensa/t-xtensa-psram-fix | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 gcc/config/xtensa/t-xtensa-psram-fix diff --git a/gcc/config.gcc b/gcc/config.gcc index 357b0bed06739..6c5468f522778 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -3564,6 +3564,11 @@ xstormy16-*-elf) extra_options=stormy16/stormy16.opt tmake_file="stormy16/t-stormy16" ;; +xtensa*-esp32-elf*) + tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h" + tmake_file="${tmake_file} xtensa/t-xtensa-psram-fix" + extra_options="${extra_options} xtensa/elf.opt" + ;; xtensa*-*-elf*) tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h" extra_options="${extra_options} xtensa/elf.opt" diff --git a/gcc/config/xtensa/t-xtensa b/gcc/config/xtensa/t-xtensa index cc4fb0c32caaa..12a277f845aea 100644 --- a/gcc/config/xtensa/t-xtensa +++ b/gcc/config/xtensa/t-xtensa @@ -18,5 +18,5 @@ $(out_object_file): gt-xtensa.h -MULTILIB_OPTIONS = mfix-esp32-psram-cache-issue fno-rtti -MULTILIB_DIRNAMES = esp32-psram no-rtti +MULTILIB_OPTIONS = fno-rtti +MULTILIB_DIRNAMES = no-rtti diff --git a/gcc/config/xtensa/t-xtensa-psram-fix b/gcc/config/xtensa/t-xtensa-psram-fix new file mode 100644 index 0000000000000..f91799ec2d672 --- /dev/null +++ b/gcc/config/xtensa/t-xtensa-psram-fix @@ -0,0 +1,22 @@ +# Copyright (C) 2002-2018 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 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 +# . + +$(out_object_file): gt-xtensa.h + +MULTILIB_OPTIONS = mfix-esp32-psram-cache-issue fno-rtti +MULTILIB_DIRNAMES = esp32-psram no-rtti