https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100856
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by SRINATH PARVATHANENI <sripa...@gcc.gnu.org>: https://gcc.gnu.org/g:85f85b7e62aacc6abae475932cf483a4c80176ce commit r11-8620-g85f85b7e62aacc6abae475932cf483a4c80176ce Author: Srinath Parvathaneni <srinath.parvathan...@arm.com> Date: Fri Jun 18 13:21:51 2021 +0100 arm: Fix multilib mapping for CDE extensions [PR100856]. On passing +cdecp[0-7] extension to the -march string in command line options, multilib linking is failing as mentioned in PR100856. This patch fixes this issue by generating a separate canonical string by removing compiler options which are not required for multilib linking from march string and assign the new string to mlibarch option. This mlibarch string is used for multilib comparison. gcc/ChangeLog: 2021-06-10 Srinath Parvathaneni <srinath.parvathan...@arm.com> PR target/100856 * common/config/arm/arm-common.c (arm_canon_arch_option_1): New function derived from arm_canon_arch. (arm_canon_arch_option): Call it. (arm_canon_arch_multilib_option): New function. * config/arm/arm-cpus.in (IGNORE_FOR_MULTILIB): New fgroup. * config/arm/arm.h (arm_canon_arch_multilib_option): New prototype. (CANON_ARCH_MULTILIB_SPEC_FUNCTION): New macro. (MULTILIB_ARCH_CANONICAL_SPECS): New macro. (DRIVER_SELF_SPECS): Add MULTILIB_ARCH_CANONICAL_SPECS. * config/arm/arm.opt (mlibarch): New option. * config/arm/t-rmprofile (MULTILIB_MATCHES): For armv8*-m, replace use of march on RHS with mlibarch. gcc/testsuite/ChangeLog: 2021-06-10 Srinath Parvathaneni <srinath.parvathan...@arm.com> PR target/100856 * gcc.target/arm/acle/pr100856.c: New test. * gcc.target/arm/multilib.exp: Add tests for cde options. (cherry picked from commit f58d03b5df25f9eab06b7eacea8da780fc2e0219)