public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100856] New: Arm: Multilib mapping is missing for CDE arguments.
@ 2021-06-01 13:27 sripar01 at gcc dot gnu.org
  2021-06-01 13:29 ` [Bug target/100856] " sripar01 at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sripar01 at gcc dot gnu.org @ 2021-06-01 13:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100856

            Bug ID: 100856
           Summary: Arm: Multilib mapping is missing for CDE arguments.
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sripar01 at gcc dot gnu.org
  Target Milestone: ---

For the +cdecp<N> extensions, properly multilib linking is missing in
arm-none-eabi.

$ arm-none-eabi-gcc  -march=armv8.1-m.main+mve.fp+cdecp0+cdecp1+cdecp2 
-mfloat-abi=hard -fomit-frame-pointer -mfpu=auto --print-multi-dir
.

$ cat xx.c
#include "arm_cde.h"

int main()
{
  return 0;
}

$ arm-none-eabi-gcc  -march=armv8.1-m.main+mve.fp+cdecp0+cdecp1+cdecp2 
-mfloat-abi=hard
/media/sripar01/2tb_work/CDE/src/gcc/gcc/testsuite/gcc.target/arm/acle/xx.c
--specs=rdimon.specs
/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/install/lib/gcc/arm-none-eabi/12.0.0/../../../../arm-none-eabi/bin/ld:
error: /tmp/ccUBPNX2.o uses VFP register arguments, a.out does not
/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/install/lib/gcc/arm-none-eabi/12.0.0/../../../../arm-none-eabi/bin/ld:
error: /tmp/ccUBPNX2.o: conflicting CPU architectures 2/21
/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/install/lib/gcc/arm-none-eabi/12.0.0/../../../../arm-none-eabi/bin/ld:
failed to merge target specific data of file /tmp/ccUBPNX2.o
collect2: error: ld returned 1 exit status

$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/install/libexec/gcc/arm-none-eabi/12.0.0/lto-wrapper
Target: arm-none-eabi
Configured with: /media/sripar01/2tb_work/Bug_fixing/src/gcc/configure
--target=arm-none-eabi
--prefix=/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/install//
--with-gmp=/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/host-tools
--with-mpfr=/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/host-tools
--with-mpc=/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/host-tools
--with-isl=/media/sripar01/2tb_work/Bug_fixing/build-arm-none-eabi/host-tools
--disable-shared --disable-nls --disable-threads --disable-tls
--enable-checking=yes --enable-languages=c,c++,fortran --with-newlib
--with-multilib-list=rmprofile --with-pkgversion=unknown
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210520 (experimental) (unknown)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100856] Arm: Multilib mapping is missing for CDE arguments.
  2021-06-01 13:27 [Bug target/100856] New: Arm: Multilib mapping is missing for CDE arguments sripar01 at gcc dot gnu.org
@ 2021-06-01 13:29 ` sripar01 at gcc dot gnu.org
  2021-06-18 12:22 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sripar01 at gcc dot gnu.org @ 2021-06-01 13:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100856

SRINATH PARVATHANENI <sripar01 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2021-06-01
     Ever confirmed|0                           |1
             Target|                            |arm-none-eabi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100856] Arm: Multilib mapping is missing for CDE arguments.
  2021-06-01 13:27 [Bug target/100856] New: Arm: Multilib mapping is missing for CDE arguments sripar01 at gcc dot gnu.org
  2021-06-01 13:29 ` [Bug target/100856] " sripar01 at gcc dot gnu.org
@ 2021-06-18 12:22 ` cvs-commit at gcc dot gnu.org
  2021-06-18 15:48 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-18 12:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100856

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by SRINATH PARVATHANENI
<sripar01@gcc.gnu.org>:

https://gcc.gnu.org/g:f58d03b5df25f9eab06b7eacea8da780fc2e0219

commit r12-1644-gf58d03b5df25f9eab06b7eacea8da780fc2e0219
Author: Srinath Parvathaneni <srinath.parvathaneni@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.parvathaneni@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.parvathaneni@arm.com>

            PR target/100856
            * gcc.target/arm/acle/pr100856.c: New test.
            * gcc.target/arm/multilib.exp: Add tests for cde options.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100856] Arm: Multilib mapping is missing for CDE arguments.
  2021-06-01 13:27 [Bug target/100856] New: Arm: Multilib mapping is missing for CDE arguments sripar01 at gcc dot gnu.org
  2021-06-01 13:29 ` [Bug target/100856] " sripar01 at gcc dot gnu.org
  2021-06-18 12:22 ` cvs-commit at gcc dot gnu.org
@ 2021-06-18 15:48 ` cvs-commit at gcc dot gnu.org
  2021-06-18 15:49 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-18 15:48 UTC (permalink / raw)
  To: gcc-bugs

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
<sripar01@gcc.gnu.org>:

https://gcc.gnu.org/g:85f85b7e62aacc6abae475932cf483a4c80176ce

commit r11-8620-g85f85b7e62aacc6abae475932cf483a4c80176ce
Author: Srinath Parvathaneni <srinath.parvathaneni@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.parvathaneni@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.parvathaneni@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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100856] Arm: Multilib mapping is missing for CDE arguments.
  2021-06-01 13:27 [Bug target/100856] New: Arm: Multilib mapping is missing for CDE arguments sripar01 at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-06-18 15:48 ` cvs-commit at gcc dot gnu.org
@ 2021-06-18 15:49 ` cvs-commit at gcc dot gnu.org
  2021-06-18 15:53 ` sripar01 at gcc dot gnu.org
  2021-08-23  9:06 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-18 15:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100856

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by SRINATH PARVATHANENI
<sripar01@gcc.gnu.org>:

https://gcc.gnu.org/g:e5384e746639b2d4084a95605f7be1ef45395768

commit r10-9944-ge5384e746639b2d4084a95605f7be1ef45395768
Author: Srinath Parvathaneni <srinath.parvathaneni@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.parvathaneni@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.parvathaneni@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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100856] Arm: Multilib mapping is missing for CDE arguments.
  2021-06-01 13:27 [Bug target/100856] New: Arm: Multilib mapping is missing for CDE arguments sripar01 at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-06-18 15:49 ` cvs-commit at gcc dot gnu.org
@ 2021-06-18 15:53 ` sripar01 at gcc dot gnu.org
  2021-08-23  9:06 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: sripar01 at gcc dot gnu.org @ 2021-06-18 15:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100856

SRINATH PARVATHANENI <sripar01 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from SRINATH PARVATHANENI <sripar01 at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/100856] Arm: Multilib mapping is missing for CDE arguments.
  2021-06-01 13:27 [Bug target/100856] New: Arm: Multilib mapping is missing for CDE arguments sripar01 at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-06-18 15:53 ` sripar01 at gcc dot gnu.org
@ 2021-08-23  9:06 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-23  9:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100856

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Christophe Lyon <clyon@gcc.gnu.org>:

https://gcc.gnu.org/g:63f68535550f77998ad907ba3d3be05a4324fbe8

commit r12-3067-g63f68535550f77998ad907ba3d3be05a4324fbe8
Author: Christophe Lyon <christophe.lyon@foss.st.com>
Date:   Thu Jul 15 12:57:18 2021 +0000

    arm: Fix multilib mapping for CDE extensions [PR100856]

    This is a followup to Srinath's recent patch: the newly added test is
    failing e.g. on arm-linux-gnueabihf without R/M profile multilibs.

    It is also failing on arm-eabi with R/M profile multilibs if the
    execution engine does not support v8.1-M instructions.

    The patch avoids this by adding check_effective_target_FUNC_multilib
    in target-supports.exp which effectively checks whether the target
    supports linking and execution, like what is already done for other
    ARM effective targets.  pr100856.c is updated to use it instead of
    arm_v8_1m_main_cde_mve_ok (which makes the testcase a bit of a
    duplicate with check_effective_target_FUNC_multilib).

    In addition, I noticed that requiring MVE does not seem necessary and
    this enables the test to pass even when targeting a CPU without MVE:
    since the test does not involve actual CDE instructions, it can pass
    on other architecture versions.  For instance, when requiring MVE, we
    have to use cortex-m55 under QEMU for the test to pass because the
    memset() that comes from v8.1-m.main+mve multilib uses LOB
    instructions (DLS) (memset is used during startup).  Keeping
    arm_v8_1m_main_cde_mve_ok would mean we would enable the test provided
    we have the right multilibs, causing a runtime error if the simulator
    does not support LOB instructions (e.g. when targeting cortex-m7).

    I do not update sourcebuild.texi since the CDE effective targets are
    already collectively documented.

    Finally, the patch fixes two typos in comments.

    2021-07-15  Christophe Lyon  <christophe.lyon@foss.st.com>

            PR target/100856
            gcc/
            * config/arm/arm.opt: Fix typo.
            * config/arm/t-rmprofile: Fix typo.

            gcc/testsuite/
            * gcc.target/arm/acle/pr100856.c: Use arm_v8m_main_cde_multilib
            and arm_v8m_main_cde.
            * lib/target-supports.exp: Add
            check_effective_target_FUNC_multilib for ARM CDE.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-23  9:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 13:27 [Bug target/100856] New: Arm: Multilib mapping is missing for CDE arguments sripar01 at gcc dot gnu.org
2021-06-01 13:29 ` [Bug target/100856] " sripar01 at gcc dot gnu.org
2021-06-18 12:22 ` cvs-commit at gcc dot gnu.org
2021-06-18 15:48 ` cvs-commit at gcc dot gnu.org
2021-06-18 15:49 ` cvs-commit at gcc dot gnu.org
2021-06-18 15:53 ` sripar01 at gcc dot gnu.org
2021-08-23  9:06 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).