Bug#961091: gcc-arm-none-eabi: Provide gdc (D compiler) cross-compiler for arm-none-eabi

2021-01-21 Thread Witold Baryluk
Package: gcc-arm-none-eabi
Version: 15:8-2019-q3-1+b1
Followup-For: Bug #961091
X-Debbugs-Cc: witold.bary...@gmail.com

gdc is now merged in gcc main tree in 9.x and 10.x, so it should be even
easier now than before.

It is present in Arm toolchain bundle from

https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-src.tar.bz2


To compile it at configure you will need:

--enable-languages=c,c++,d,lto
--disable-libphobos

Other options can remain as they are in current rules file

https://salsa.debian.org/debian/gcc-arm-none-eabi/-/blob/master/debian/rules

I didn't test --enable-tls, but I don't think there should be any issue
with that.

Adding `gdc` to Build-Depends is also required, as it is not included by
default in `build-essential`.


Here is example of compiling gdc for arm-none-eabi for Cortex-M machines
for example.

https://github.com/JinShil/arm-none-eabi-gdc/blob/master/arm-none-eabi-gdc.sh
but it is pretty old, and since then there is no need to apply out of
tree patches for gdc.

--enable-lto \
--enable-gold\
--enable-plugins


would also be useful, for reducing binary sizes in some cases. I am not sure if 
these
are enabled by default, but I assume yes.

Extra references (a bit dated):

http://wiki.dlang.org/GDC/Cross_Compiler/Generic
http://wiki.dlang.org/Bare_Metal_ARM_Cortex-M_GDC_Cross_Compiler

Thanks!



Bug#961091: gcc-arm-none-eabi: Provide gdc (D compiler) cross-compiler for arm-none-eabi

2020-05-19 Thread Witold Baryluk
Package: gcc-arm-none-eabi
Version: 15:8-2019-q3-1
Severity: normal

Hi.

I know it does work, I did managed to build gdc and use it for
cross-compilation to Arm, in particular ARM Cortex-M4, and run it
succesfully.

Would be great to have this cross compiler available on amd64, and few
other archs.

Just the cross-compiler, no phobos or druntime necassirarly. They will
fail to build, but they are not needed to use D succesfully on this
platform.

Cheers,
Witold




-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-3-amd64 (SMP w/32 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gcc-arm-none-eabi depends on:
ii  binutils-arm-none-eabi  2.34-4+14
ii  libc6   2.30-8
ii  libgcc-s1   10.1.0-1
ii  libgmp102:6.2.0+dfsg-4
ii  libisl220.22.1-1
ii  libmpc3 1.1.0-1
ii  libmpfr64.0.2-1
ii  libstdc++6  10.1.0-1
ii  zlib1g  1:1.2.11.dfsg-2

Versions of packages gcc-arm-none-eabi recommends:
ii  libnewlib-arm-none-eabi  3.3.0-1

gcc-arm-none-eabi suggests no packages.

-- no debconf information