Use patches for existing toolchain files (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 7 Mar 2017 17:12:29 +0000 (12:12 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 3 May 2017 16:13:02 +0000 (12:13 -0400)
commitdab4fff40e3de91f8291cf1042183d316c61f89a
tree539e523c18b77d11ea975df03f7145fd9e796d64
parentfc8f506c206ffe82c2c4b9e589670a8404616695
Use patches for existing toolchain files (XCC)

When building gcc and glibc, we use the same technique: extract the
tarball, copy over everything from the -akaros directory, apply a few
patches, and build.

The -akaros directory is nice since we can easily edit and maintain those
files, e.g. sysdeps/akaros/write.c.  Most of those files do not exist in
the tarball.  However, on occasion, we do need to change files in the
tarball, such as gcc-4.9.2/config.sub.  For those, we had been keeping a
copy in the -akaros directory, and that slightly modified copy would
replace the version from the tarball.

The problem with this approach is that it is hard to know what has changed
in those files without comparing to the native version in the tarball.
It'll also be harder to port those changes when we eventually upgrade to a
newer toolchain.

Now we'll have two sources of changes.  We'll still have the -akaros
directory for the files that only exist in our port.  Anything that is part
of the tarball that needs to be changed will be in the existing.patch.
Note that during development, you can still put files in the -akaros
directory and they will overwrite the tarball files.  Just be sure to not
commit those files, and instead apply the appropriate patch.  You can get
the guts of the patch from the hidden file generated during make (e.g.
.glibc-$(GLIBC_VERSION)-akaros-directory.patch).

Rebuild your toolchain.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
32 files changed:
tools/compilers/gcc-glibc/Makefile
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/config.sub [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/config/gthr.m4 [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/gcc/config.gcc [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/gcc/configure [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/libgcc/config.host [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/libgcc/configure [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/libgcc/crtstuff.c [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/libgomp/configure.tgt [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/libstdc++-v3/configure [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/libstdc++-v3/configure.host [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-akaros/libstdc++-v3/crossconfig.m4 [deleted file]
tools/compilers/gcc-glibc/gcc-4.9.2-existing.patch [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/Makeconfig [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/abi-tags [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/configure [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/configure.ac [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/elf/Makefile [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/include/alloca.h [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/include/errno.h [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/include/libc-symbols.h [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/nptl/shlib-versions [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/rt/Makefile [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/scripts/config.sub [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/shlib-versions [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/stdio-common/vfprintf.c [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sunrpc/netname.c [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/i386/configure [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/i386/configure.ac [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/i386/tlsdesc.sym [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/x86_64/tlsdesc.sym [deleted file]
tools/compilers/gcc-glibc/glibc-2.19-existing.patch [new file with mode: 0644]