Last week, a new cross-compiler based on GnatDroid was introduced into the FreeBSD Ports Collection. The host machine for this compiler is x86 FreeBSD or DragonFly while the target is aarch64--freebsd (FreeBSD/ARM64). See Freshports GnatCross AArch64 This cross compiler was then used to bootstrap a native FSF GCC 6.3.1 with Ada frontend on FreeBSD/ARM64 (based on the 64-bit ARMv8 architecture). It passes every test in the GCC testsuite thanks to FreeBSD-specific signal frame unwinder I wrote that will be pushed to upstream to the GNU GCC project. The existing GCC6-AUX port was updated to support aarch64, increasing the number of platforms to four:
In related pkgsrc news, lang/gcc5-aux was upgraded from vesion 5.1 to 5.4 and lang/gcc6-aux (version 6.2) was introduced at the end of 2016. They support FreeBSD, DragonFly, and SunOS, but are limited to x86 architecture. The FreeBSD Ada framework is built by GCC FSF 5.3 currently, but when GCC FSF 6.0 is released in a month or so, that compiler will become the default. The oldest compiler in ports, gcc-aux (GCC FSF 4.9.3) needs to be retired, but both GnatDroid ports were based on it. I rebased them on GCC 6.0 today, which brings in two releases worth of new features. I also added Marshmellow support (Android API 23) to both the ARMv7 and x86 compilers. I removed Froyo (API 8) and Gingerbread (API 9) from the ARMv7 options. Together they represent about 2% of active Android devices and that's dropping every month. Even though FSF 6.0.0 is still in development, it's entered stage 3 which is unusally relatively stable for the Ada front-end. It has been placed in FreeBSD ports at lang/gcc6-aux, and the Ada framework can optionally use it instead of GNAT FSF 5.3. It currently builds everything except OpenToken (caught by new code restriction / detection and needs code to be fixed) and Ironsides which fails during compilation with a STORAGE error, so an internal compiler error is suspected. If you have FreeBSD or DragonFly and you want to testdrive GNAT 6, then add ADA_DEFAULT=6 to /etc/make.conf and rebuild everything from source. Remember GnatDroid, the FreeBSD/DragonFly Ada cross-compiler targetting Android on the ARMv7 processor? It's alive and well, and it is based on GNAT FSF 4.9. Now there's a second cross-compiler known as GnatDroid-x86. It's similar except it targets Android on x86 (32-bit) which can be installed in a virtual machine such as Virtual Box. Running ACATS tests on GnatDroid-x86 shows that it even handles stack checks due to a functioning unwind support that the ARMv7 version lacks. See Freshports GnatDroid-x86 for more details. The upcoming FSF GCC5 has not even produced a release candidate yet, but that didn't prevent GNAT 5 from being put into ports, making it available to FreeBSD and DragonFly BSD. After some adjustments to the other ports, it builds everything except GtkAda version 3. The problem with GtkAda is that it uses invalid Ada according to GNAT 5, but Adacore has migrated from Subversion version control to Git, and none of Adacore's respositories are publically available. Supposedly they will be at some point in the future, but it is not a priority, and as a result, the GtkAda fix is not available either. Hopefully the repositories will be mirrored on GitHub in the future, but there's no timeline for that. The new port is located at /usr/ports/lang/gcc5-aux, and it will install at /usr/local/gcc5-aux/bin. To build all ports with it, you'd have to put "ADA_DEFAULT=5" in /etc/make.conf, but I do not recommend that you do this unless you are testing the port. Adacore releases most of its GPL-licensed software on an annual basis, usually in May. That happened again, and as a result a number of packages have been updated to their latest releases in ports for FreeBSD and DragonFly:
Additional two more ports were added:
Note that versions that equal "2014" are the exact Adacore GPL release and the ports with 4-group versions are working versions from public-facing repositories. In some cases it was necessary to use later versions, e.g. we don't want two versions of xmlada (one for GPS, one for general use) and sometimes trying to maintain a single version of the dependencies means using codebase from something newer than the release. For example, GPS was frozen 7 months ago and the release wasn't compatible with the latest versions of gtkada3 and xmlada. In other news, ANet was updated to version 0.3.0, a release that exists mainly to clean up the code for BSD based on our patches. Despite good intentions, support for GNAT-AUX/GCC-AUX had never been added to pkgsrc. The reason is that multilib support was desired (this means x86-64 Solaris can build 32-bit executables), but all builds failed on the Ada libraries on gcc 4.7.x. It turns out that this was a reported bug and it has since been fixed. Happily a multilib-capable x86-64 bootstrap compiler was created on OmniOS. After some tweaking, pkgsrc is now capable of building gcc 4.9.0 i386 compilers (demonstrated on Joyent's SmartOS development server) and new x86-64 compilers on OmniOS. This has not been tested on Solaris 10 or Solaris 11 yet, but it is not expected to work as the bootstrap is dynamically linked to system libraries (static linking is no longer possible since Solaris 9). There could be symbols created by Illumos that Solaris 10/11 don't understand. If that is the case, another bootstrap compiler specifically for Solaris 10/11 will be required for those platforms. After pkgsrc branches its next quarterly, Joyent will start producing binary packages of gcc-aux which can be used on any Illumos distribution. Otherwise any installation of pkgsrc on an Illumos platform can build it from source right now. By the way, it passed both testsuites perfectly. It's a reliable compiler! While DragonFly and FreeBSD have been enjoying FSF GNAT 4.9 for several weeks now (first snapshots and finally the actual 22 April 2014 release) from FreeBSD's Ports Collection, NetBSD was excluded as exclusively uses the FSF GNAT 4.7 from pkgsrc. This changed yesterday though. New bootstrap compilers were made for NetBSD i386 and x86-64, and the bootstraps from the Ports Collection were also utilized. Now pkgsrc also features the latest GNAT, which is also the only version of GCC 4.9 available in pkgsrc. This means GNAT is available on six pkgsrc platforms: i386 and x86-64 on DragonFly, FreeBSD, and NetBSD. Due to the lack of a current and conforming bootstrap compiler, the SunOS support was disabled. Potential future work is to add OpenBSD bootstraps to add GNAT for OpenBSD and MirBSD through pkgsrc, and also to restore support for SunOS (Solaris 11 / SmartOS / OmniOS). The Ada testsuites were run on the latest NetBSD 6.1.4 releases and passed perfectly. The results on display on the front page of DragonLace. There is one downside. The new GNAT apparently requires a version of binutils newer that what NetBSD 6.1 features (version 2.21). The GNAT Programming Studio will not link with the new GNAT when it uses the base linker, but unfortunately GNAT fails to build on NetBSD 6.1 with newer binutils from pkgsrc. NetBSD 6.99 (the precursor to NetBSD 7) features binutils 2.23 in base and thus GPS builds fine. A Problem Report has been raised, but there is no estimate of when (or if) a fix for NetBSD 6 or earlier will come. Recently added to the FreeBSD ports collection was codelabs.ch's pscs-ada (thick Ada binding to PC/SC-middleware) and the APQ Ada95 database binding with drivers for MySQL, PostgreSQL, and ODBC included as as separate ports. A huge effort went into updating the GNATDroid ARM cross-compiler to be based on GCC 4.9. This is the only ARM compiler that supports sockets to my knowledge -- socket support is disabled on a stock gcc, but I've got it working and it passes the related testsuite. The only thing that doesn't pass is the stack-check tests. That is because stack-checking as not yet been implemented for the ARM target on GCC. A patch to add the capability was created but never added, but hopefully it gets added soon. Other internal improvements include getting the ACATS test to run on a remote device in 15 minutes rather than 6 hours, and to get the gnat.dg testsuite to run for the first time on a remote device. The results are publish on the main page (they look good!) Four new packages have been added to FreeBSD ports collection:
Three of those are the works of Gautier de Montmollin, and they have been converted into static libraries with dedicated gpr files in the standard GNAT location. |
|