[Bug 1106014] New: cross-arm-none-gcc8-8.1.1+r262873-1.3.x86_64 -mcpu=cortex-m0plus emits incorrect arch
http://bugzilla.suse.com/show_bug.cgi?id=1106014 Bug ID: 1106014 Summary: cross-arm-none-gcc8-8.1.1+r262873-1.3.x86_64 -mcpu=cortex-m0plus emits incorrect arch Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: bnc-team-screening@forge.provo.novell.com Reporter: william@blackhats.net.au QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Hi, The cross-arm-none-gcc8 package in OpenSUSE may have an incorrect definition for -mcpu=cortex-m0plus. On Fedora27 compiling the code found in the tomu-sample repo causes the ELF to have the following details: No version information found in this file. Attribute Section: aeabi File Attributes Tag_CPU_name: "Cortex-M0+" Tag_CPU_arch: v6S-M Tag_CPU_arch_profile: Microcontroller Tag_THUMB_ISA_use: Thumb-1 Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-byte Tag_ABI_align_preserved: 8-byte, except leaf SP Tag_ABI_enum_size: small Tag_ABI_optimization_goals: Aggressive Size Please note the Tap_CPU_arch. On OpenSUSE the following is shown: No version information found in this file. Attribute Section: aeabi File Attributes Tag_CPU_name: "ARM v6K" Tag_CPU_arch: v6K Tag_CPU_arch_profile: Microcontroller Tag_ARM_ISA_use: Yes Tag_THUMB_ISA_use: Thumb-1 Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-byte Tag_ABI_align_preserved: 8-byte, except leaf SP Tag_ABI_enum_size: small Tag_ABI_optimization_goals: Aggressive Size This causes the development board to fail to initialise as it is the wrong CPU arch. There are other platforms (arch linux, macOSX) where they correctly emit armv6s-m for -mcpu=cortex-m0plus. Version of affected packages: cross-arm-binutils-2.31-1.1.x86_64 cross-arm-none-newlib-devel-3.0.0-2.5.x86_64 cross-arm-none-gcc8-8.1.1+r262873-1.3.x86_64 Reproduction: https://github.com/im-tomu/tomu-samples Follow the readme, or: git submodule init git submodule update make -C libopencm3 make -C usb_simple readelf -A usb_simple/usb_simple.elf -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1106014 https://bugzilla.suse.com/show_bug.cgi?id=1106014#c7 --- Comment #7 from Richard Biener <rguenther@suse.com> --- (In reply to Matthew Trescott from comment #6)
There is a little more work required than I realized; newlib also needs to be rebuilt. This requires applying the same steps outlined above to the cross-arm-none-eabi-gcc10-bootstrap package, building it, then using that package to build cross-arm-none-newlib-devel. (I put the gcc bootstrap packages in my Documents folder and used osc build --local-package --prefer-pkgs=~/Documents). This is required because newlib calls
arm-none-eabi-gcc --print-multi-lib
during the configure stage to determine the which multilib architectures to build. If the bootstrap GCC wasn't compiled with all the multilibs, newlib won't have them enabled either.
With GCC 10 at least this requires updating the package from newlib 2.1.0 to 2.3.0; otherwise it'll attempt to compile this assembly file as Thumb and fail: https://sourceware.org/git/?p=newlib-cygwin.git;a=commit; h=cc430406ac09d99570b5218668f2bb00371ae983
I am now able to run ChibiOS on my Cortex-M4 board without any problems, including calling functions using newlib's memcpy(). Should I open the necessary submitrequests on OBS?
Yes please - if you can manage to keep them to small isolated changes that will ease review/acceptance. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1106014 https://bugzilla.suse.com/show_bug.cgi?id=1106014#c9 --- Comment #9 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1106014) was mentioned in https://build.opensuse.org/request/show/844614 Factory / gcc10 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1106014 https://bugzilla.suse.com/show_bug.cgi?id=1106014#c13 --- Comment #13 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1106014) was mentioned in https://build.opensuse.org/request/show/853584 Factory / newlib -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1106014 https://bugzilla.suse.com/show_bug.cgi?id=1106014#c15 --- Comment #15 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2021:1796-1: An update that has 7 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1029961,1106014,1178577,1178624,1178675,1182016,1185337 CVE References: JIRA References: Sources used: SUSE OpenStack Cloud Crowbar 9 (src): gcc10-10.3.0+git1587-1.6.2 SUSE OpenStack Cloud Crowbar 8 (src): gcc10-10.3.0+git1587-1.6.2 SUSE OpenStack Cloud 9 (src): gcc10-10.3.0+git1587-1.6.2 SUSE OpenStack Cloud 8 (src): gcc10-10.3.0+git1587-1.6.2 SUSE Linux Enterprise Server for SAP 12-SP4 (src): gcc10-10.3.0+git1587-1.6.2 SUSE Linux Enterprise Server for SAP 12-SP3 (src): gcc10-10.3.0+git1587-1.6.2 SUSE Linux Enterprise Server 12-SP5 (src): gcc10-10.3.0+git1587-1.6.2 SUSE Linux Enterprise Server 12-SP4-LTSS (src): gcc10-10.3.0+git1587-1.6.2 SUSE Linux Enterprise Server 12-SP3-LTSS (src): gcc10-10.3.0+git1587-1.6.2 SUSE Linux Enterprise Server 12-SP3-BCL (src): gcc10-10.3.0+git1587-1.6.2 SUSE Linux Enterprise Server 12-SP2-BCL (src): gcc10-10.3.0+git1587-1.6.2 SUSE Linux Enterprise Module for Toolchain 12 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.1, gcc10-10.3.0+git1587-1.6.2 HPE Helion Openstack 8 (src): gcc10-10.3.0+git1587-1.6.2 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1106014 https://bugzilla.suse.com/show_bug.cgi?id=1106014#c16 --- Comment #16 from Swamp Workflow Management <swamp@suse.de> --- SUSE-RU-2021:1861-1: An update that has 6 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1029961,1106014,1178577,1178624,1178675,1182016 CVE References: JIRA References: Sources used: SUSE MicroOS 5.0 (src): gcc10-10.3.0+git1587-1.6.4 SUSE Manager Server 4.0 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Manager Retail Branch Server 4.0 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Manager Proxy 4.0 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Server for SAP 15-SP1 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Server for SAP 15 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Server 15-SP1-LTSS (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Server 15-SP1-BCL (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Server 15-LTSS (src): gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Module for Development Tools 15-SP3 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Module for Development Tools 15-SP2 (src): gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Module for Basesystem 15-SP3 (src): gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise Module for Basesystem 15-SP2 (src): gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise High Performance Computing 15-LTSS (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Linux Enterprise High Performance Computing 15-ESPOS (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE Enterprise Storage 6 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 SUSE CaaS Platform 4.0 (src): cross-nvptx-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1106014 https://bugzilla.suse.com/show_bug.cgi?id=1106014#c17 --- Comment #17 from Swamp Workflow Management <swamp@suse.de> --- openSUSE-RU-2021:0854-1: An update that has 6 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1029961,1106014,1178577,1178624,1178675,1182016 CVE References: JIRA References: Sources used: openSUSE Leap 15.2 (src): cross-nvptx-gcc10-10.3.0+git1587-lp152.5.1, gcc10-10.2.1+git583-lp152.4.1 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1106014 https://bugzilla.suse.com/show_bug.cgi?id=1106014#c18 --- Comment #18 from Swamp Workflow Management <swamp@suse.de> --- openSUSE-RU-2021:1861-1: An update that has 6 recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1029961,1106014,1178577,1178624,1178675,1182016 CVE References: JIRA References: Sources used: openSUSE Leap 15.3 (src): cross-aarch64-gcc10-10.3.0+git1587-1.6.3, cross-arm-gcc10-10.3.0+git1587-1.6.3, cross-hppa-gcc10-10.3.0+git1587-1.6.3, cross-i386-gcc10-10.3.0+git1587-1.6.3, cross-m68k-gcc10-10.3.0+git1587-1.6.3, cross-mips-gcc10-10.3.0+git1587-1.6.3, cross-nvptx-gcc10-10.3.0+git1587-1.6.3, cross-ppc64-gcc10-10.3.0+git1587-1.6.3, cross-ppc64le-gcc10-10.3.0+git1587-1.6.3, cross-riscv64-gcc10-10.3.0+git1587-1.6.3, cross-s390x-gcc10-10.3.0+git1587-1.6.3, cross-sparc-gcc10-10.3.0+git1587-1.6.3, cross-sparc64-gcc10-10.3.0+git1587-1.6.3, cross-x86_64-gcc10-10.3.0+git1587-1.6.3, gcc10-10.3.0+git1587-1.6.4, gcc10-testresults-10.3.0+git1587-1.6.7 -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com