> From: Joerg Wunsch [mailto:j...@uriah.heep.sax.de] > > Yes. If we release from revision r2473 it will work with gcc-5.1, not > trunk. > > > > If we release from last revision r2474, it will work with gcc trunk, not > gcc-5.1. > > > > So, we need to change avr-libc to build with all versions of gcc. > > Ick. :-(( > > > > What's the state with respect to compiling that using older compiler > > > versions? > > > Lib directories and startup file names are decided in bootstrapping. > > But valid compiler is checked in configure. So, auto detection of > > compiler and configure libs/startups will require infrastructure > > change. > > I see. But at least, if I bootstrap on a certain compiler, then > configure, it will be able to build there, yes? > > > Do you have any input on this? > > Am I right in the assumption that the main issue is that ./devtools/gen- > avr-lib-tree.sh is called only when bootstrapping? I guess it might be > possible to (re-)do this at configure time. It means the script needs to > be delivered into the final release tarball, but that's going to be the > least problem. > > I would (obviously) much prefer that the library can be built on at least > a few recent/stable versions of GCC (say, 4.8 through 5.1), as opposed to > just a single (matching) version.
It is possible to auto-detect the compiler version and enable device library. Attached a patch. It checks for gcc version (less than 5.0, 5.1.0 or greater). If version is >= 5.0.0 then device library is enabled. A configure option "--enable-device-lib" is added so that users can enable device library even with older versions of gcc (if they backport device library patch). Following table illustrates the crt file and device library name/layout expected by gcc. AVR-LibC configure is updated to follow this layout. Example: atmega1280 +----------------+-------------+-------------------------+-----------------+ | | GCC < 5.0.0 | GCC 5.1.0 | Others | +----------------+-------------+-------------------------+-----------------+ | crt file | crtm1280.o | crtm1280.o | crtatmega1280.o | +----------------+-------------+-------------------------+-----------------+ | device library | | dev/atmega1280/libdev.a | libatmega1280.a | +----------------+-------------+-------------------------+-----------------+ Is the attached patch Ok? Regards, Pitchumani
detect-gcc-version-and-build-device-lib.patch
Description: detect-gcc-version-and-build-device-lib.patch
_______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-libc-dev