Porting Newlib with current autotools
autotools, kernel, operating-system
Solution
Unfortunately I'm afraid using automake 1.12 or earlier is your only choice. Ubuntu has an `Automake1.11` separate package to help you there, if I'm not mistaken, since the compatibility between 1.12 and 1.14 is generally good, but before that it was spotty.
Problem
I'm trying to build a toolchain for my hobby kernel, but I'm running into problems when building Newlib. Whenever I try to run `autoreconf` in my kernels directory under newlib/libc/sys/ I get an error: ``` configure.in:5: error: support for Cygnus-style trees has been removed ``` Here is the content of configure.in (basically, taken from the below tutorial): ``` AC_PREREQ(2.59) AC_INIT([newlib], [NEWLIB_VERSION]) AC_CONFIG_SRCDIR([crt0.S]) AC_CONFIG_AUX_DIR(../../../..) NEWLIB_CONFIGURE(../../..) AC_CONFIG_FILES([Makefile]) AC_OUTPUT ``` and the source for Makefile.am (again mostly from tutorial): ``` AUTOMAKE_OPTIONS = cygnus INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) AM_CCASFLAGS = $(INCLUDES) noinst_LIBRARIES = lib.a if MAY_SUPPLY_SYSCALLS extra_objs = $(lpfx)syscalls.o else extra_objs = endif lib_a_SOURCES = lib_a_LIBADD = $(extra_objs) EXTRA_lib_a_SOURCES = syscalls.c crt0.S lib_a_DEPENDENCIES = $(extra_objs) lib_a_CCASFLAGS = $(AM_CCASFLAGS) lib_a_CFLAGS = $(AM_CFLAGS) if MAY_SUPPLY_SYSCALLS all: crt0.o endif ACLOCAL_AMFLAGS = -I ../../.. CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host ``` Yes, I have tried removing the `AUTOMAKE_OPTIONS=cygnus`. I've Googled around and been trying to understand this, and as far as I can tell, it is because of the version of autotools I'm using. According to the tutorial I used originally (OSDev - OS Specific Toolchain), I need an older version. My problem is that I'm using Kubuntu, which uses the apt package manager, and that version is not available to fall back to even temporarily. There has to be some fix for this. Either Newlib is outdated (this release is from December of 2013...) or the developers are crazy for depending on an outdated autotools version. The only other thing I can think is that this is a message from the newlib configuration scheme itself in which case I have no idea how to modify my configure.in and Makefile.am to align with the new newlib configure format. That tutorial is the only one I've found that didn't use libgloss (which I'd prefer not to do) so far and the documentation of adding a new target is rather lacking in the documentation for newlib (or I missed something). Here is some version information: - System: Kubuntu 14.04 - Automake: 1.14.1 - Autoconf: 2.69 - Newlib: 2.1.0