osx-cross / homebrew-arm

Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7).
BSD 2-Clause "Simplified" License
152 stars 21 forks source link

Add arm-gcc-bin@11 #39

Closed salkinium closed 2 years ago

salkinium commented 2 years ago

Add ARM 11.2-2022.02 toolchain

Should I also change the alias to point to the latest version?

salkinium commented 2 years ago

So maybe we need to skip this version, I get internal compiler errors when using it, which seems to be a known limitation? https://bugs.launchpad.net/gcc-arm-embedded/+bug/1970029

salkinium commented 2 years ago

Seems to be a bit of a disaster… https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain#Resources

ladislas commented 2 years ago

thanks for the pr @salkinium!

maybe @fauxpark can fix this by compiling from source as he is doing for gcc@8 & gcc@9

salkinium commented 2 years ago

ARM released a new version without the compiler bugs: ARM 11.3-2022.08 toolchain.

ladislas commented 2 years ago

@salkinium could you update the PR? :)

salkinium commented 2 years ago

Sorry, I rebased the old commit by accident.

salkinium commented 2 years ago

Do you want me to add a test block to satisfy the CI? Some simple main.c compilation to catch at least big internal compiler errors?

ladislas commented 2 years ago

Do you want me to add a test block to satisfy the CI? Some simple main.c compilation to catch at least big internal compiler errors?

That would be great yes!

I think that something like this would be enough as we are using ARM binaries, we are not building anything ourselves.

https://github.com/osx-cross/homebrew-avr/blob/5088b5f15eaa1820b77185eb4995977cfd4e2906/Formula/avr-binutils.rb#L70-L73

salkinium commented 2 years ago

I'm not familiar with ruby at all, so I'm poking in the dark about best practices etc. I also don't understand how to test the changes locally? Can you help me?

ladislas commented 2 years ago

@salkinium the output of ...-gcc -v is a bit more verbose, so the assert was not working:

Using built-in specs.
COLLECT_GCC=arm-none-eabi-c++
COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/arm-gcc-bin@10/10.3-2021.10_1/bin/../lib/gcc/arm-none-eabi/10.3.1/lto-wrapper
Target: arm-none-eabi
Configured with: /tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/src/gcc/configure --target=arm-none-eabi --prefix=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/install-native --libexecdir=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/install-native/lib --infodir=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/install-native/arm-none-eabi --build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --with-gmp=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/build-native/host-libs/usr --with-mpfr=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/build-native/host-libs/usr --with-mpc=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/build-native/host-libs/usr --with-isl=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/build-native/host-libs/usr --with-libelf=/tmp/jenkins-GCC-10-pipeline-338_20211018_1634516195/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-lstdc++ -lm' --with-pkgversion='GNU Arm Embedded Toolchain 10.3-2021.10' --with-multilib-list=rmprofile,aprofile
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20210824 (release) (GNU Arm Embedded Toolchain 10.3-2021.10)

I replaced it with

  test do
    system "true"
  end

to make it simpler.

40 fixes this.

salkinium commented 2 years ago

Ah, I was trying to use substring matching and failed. Your way is a simpler solution.