Skip to content

Commit 5d8708c

Browse files
keith-packardstephanosio
authored andcommitted
arm: Add missing multilib default values
The arm multilib configuration includes two more parameters which affect multilib selection, marm/mthumb and mfloat-abi. Without those, the default multilib selection is mis-specified and the only reason it works is because '.' is the fall-back path. Add "marm" and "mfloat-abi=soft" to MULTILIB_DEFAULTS to actually match when the compiler is run without any target parameters. This hasn't caused any problems in practice because there are no non-default multilib options which can be applied to the default -march target as it has neither an FPU nor any branch protection support. Specifying another cpu or architecture always sets -marm and -mfloat-abi and so those multilib configuration don't rely on the defaults. Signed-off-by: Keith Packard <keithp@keithp.com>
1 parent c94c5d0 commit 5d8708c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

gcc/config.gcc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4517,6 +4517,7 @@ case "${target}" in
45174517
case ${arm_multilib} in
45184518
aprofile|rmprofile)
45194519
tmake_profile_file="arm/t-multilib"
4520+
tm_mlib_file="arm/arm-mlib.h"
45204521
;;
45214522
@*)
45224523
ml=`echo "X$arm_multilib" | sed '1s,^X@,,'`
@@ -4555,6 +4556,7 @@ case "${target}" in
45554556
# through to the multilib selector
45564557
with_float="soft"
45574558
tmake_file="${tmake_file} ${tmake_profile_file}"
4559+
tm_file="$tm_file $tm_mlib_file"
45584560
TM_MULTILIB_CONFIG="$with_multilib_list"
45594561
fi
45604562
fi

gcc/config/arm/arm-mlib.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* Arm multilib default option include file.
2+
3+
Copyright (C) 2023-2024 Free Software Foundation, Inc.
4+
Contributed by Arm.
5+
6+
This file is part of GCC.
7+
8+
GCC is free software; you can redistribute it and/or modify it
9+
under the terms of the GNU General Public License as published
10+
by the Free Software Foundation; either version 3, or (at your
11+
option) any later version.
12+
13+
GCC is distributed in the hope that it will be useful, but WITHOUT
14+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15+
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16+
License for more details.
17+
18+
You should have received a copy of the GNU General Public License
19+
along with GCC; see the file COPYING3. If not see
20+
<http://www.gnu.org/licenses/>. */
21+
22+
#define MULTILIB_DEFAULTS { "marm", "mfloat-abi=soft", }

0 commit comments

Comments
 (0)