1 # Copyright (C) 2021-2022 Free Software Foundation, Inc. 2 # 3 # This file is part of GCC. 4 # 5 # GCC is free software; you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 3, or (at your option) 8 # any later version. 9 # 10 # GCC is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with GCC; see the file COPYING3. If not see 17 # <http://www.gnu.org/licenses/>. 18 19 # Multilib 20 MULTILIB_OPTIONS = mabi=lp64d/mabi=lp64f/mabi=lp64s 21 MULTILIB_DIRNAMES = base/lp64d base/lp64f base/lp64s 22 23 # The GCC driver always gets all abi-related options on the command line. 24 # (see loongarch-driver.c:driver_get_normalized_m_opts) 25 comma=, 26 MULTILIB_REQUIRED = $(subst $(comma), ,$(TM_MULTILIB_CONFIG)) 27 28 # Multiarch 29 ifneq ($(call if_multiarch,yes),yes) 30 # Define LA_DISABLE_MULTIARCH if multiarch is disabled. 31 tm_defines += LA_DISABLE_MULTIARCH 32 else 33 # Only define MULTIARCH_DIRNAME when multiarch is enabled, 34 # or it would always introduce ${target} into the search path. 35 MULTIARCH_DIRNAME = $(LA_MULTIARCH_TRIPLET) 36 endif 37 38 # Don't define MULTILIB_OSDIRNAMES if multilib is disabled. 39 ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),) 40 41 MULTILIB_OSDIRNAMES = \ 42 mabi.lp64d=../lib64$\ 43 $(call if_multiarch,:loongarch64-linux-gnu) 44 45 MULTILIB_OSDIRNAMES += \ 46 mabi.lp64f=../lib64/f32$\ 47 $(call if_multiarch,:loongarch64-linux-gnuf32) 48 49 MULTILIB_OSDIRNAMES += \ 50 mabi.lp64s=../lib64/sf$\ 51 $(call if_multiarch,:loongarch64-linux-gnusf) 52 53 endif 54