# MontaVista GNU/Linux Configuration.
# Copyright (C) 2009
# 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
# <http://www.gnu.org/licenses/>.

# Build big-endian and little-endian support libraries.
MULTILIB_OPTIONS = mel msoft-float march=octeon/march=octeon2 mabi=n32/mabi=64
MULTILIB_DIRNAMES = mel soft-float octeon octeon2 n32 64
MULTILIB_EXCEPTIONS = *mel*/*mabi=n32* *mel*/*mabi=64*
MULTILIB_EXCEPTIONS += *mel*/*march=octeon* *mel*/*march=octeon2* march=octeon
MULTILIB_EXCEPTIONS += march=octeon2 march=octeon/mabi=n32
MULTILIB_EXCEPTIONS += march=octeon2/mabi=n32 march=octeon2/mabi=64
MULTILIB_EXCEPTIONS += march=octeon/mabi=64 msoft-float/march=octeon
MULTILIB_EXCEPTIONS += msoft-float/march=octeon2

# These files must be built for each multilib.
EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o

# See comment in montavista-linux.h on STARTFILE_PREFIX_SPEC for how the real
# directories used in the sysroots are determined.  These directories
# are specified so that (a) they are distinct and (b) removing the
# components that form part of the sysroot suffix leaves the real
# directory within the sysroot.
MULTILIB_OSDIRNAMES = msoft-float/mabi.n32=../lib32/soft-float
MULTILIB_OSDIRNAMES += msoft-float/mabi.64=../lib64/soft-float
MULTILIB_OSDIRNAMES += msoft-float/march.octeon/mabi.n32=../lib32/soft-float/octeon
MULTILIB_OSDIRNAMES += msoft-float/march.octeon/mabi.64=../lib64/soft-float/octeon
MULTILIB_OSDIRNAMES += msoft-float/march.octeon2/mabi.n32=../lib32/soft-float/octeon2
MULTILIB_OSDIRNAMES += msoft-float/march.octeon2/mabi.64=../lib64/soft-float/octeon2
MULTILIB_OSDIRNAMES += mel/msoft-float=!mel/soft-float
MULTILIB_OSDIRNAMES += msoft-float=!soft-float
MULTILIB_OSDIRNAMES += mabi.64=../lib64
MULTILIB_OSDIRNAMES += mabi.n32=../lib32
