Hi -
On 2016-08-10 at 13:21 Dan Cross <[email protected]> wrote:
> Add a Makefile and patchset to build coreutils for Akaros.
>
> Note that we hack the Makefile to fake manpage generation,
> as this requires running the output of the freshly-built
> commands through 'help2man'. But since those commands target
> Akaros, they won't run on the build machine (which will
> typically run some sort of POSIXy operating system like
> Linux).
>
> Change-Id: Icf3e17107184a4b024582e41063e251fe1b07880
> Signed-off-by: Dan Cross <[email protected]>
> ---
> tools/sys-apps/coreutils/Makefile | 57 +++++
> .../coreutils/akaros-patches/coreutils-8.25.patch | 233
> +++++++++++++++++++++ 2 files changed, 290 insertions(+)
> create mode 100644 tools/sys-apps/coreutils/Makefile
> create mode 100644
> tools/sys-apps/coreutils/akaros-patches/coreutils-8.25.patch
>
> diff --git a/tools/sys-apps/coreutils/Makefile
> b/tools/sys-apps/coreutils/Makefile new file mode 100644
> index 0000000..f868221
> --- /dev/null
> +++ b/tools/sys-apps/coreutils/Makefile
> @@ -0,0 +1,57 @@
> +include ../../Makefrag
> +
> +########## Package-specific variables
> +version := 8.25
> +src-dir = coreutils-$(version)
> +build-dir = $(src-dir)/build
> +tarball = coreutils-$(version).tar.xz
> +fetch-url = http://ftp.gnu.org/gnu/coreutils/$(tarball)
> +config-opts = --prefix=/usr \
> + --bindir=/bin \
> + --disable-nls \
> + --host=x86_64-ucb-akaros \
> + --build=i686-pc-linux-gnu
> +
> +########## Generic Infrastructure
> +
> +PHONY := all
> +all: make
> +
> +%.tar.xz:
> + $(Q)wget $(fetch-url)
> +
> +akaros-patches := akaros-patches/coreutils-8.25.patch
Can you put the patches in akaros-patches/8.25/*.patch? (basically
so there's a version directory).
> +
> +$(build-dir): $(tarball) $(akaros-patches)
> + rm -fr $(src-dir)
> + tar -xf $<
> + $(Q)mkdir $(build-dir)
> && \
> + for i in $(akaros-patches);
> do \
> + (cd $(src-dir) && patch -p1
> < ../$$i); \
> + done
> +
> +PHONY += config
> +$(build-dir)/Makefile config: $(build-dir)
> + cd $(build-dir) && env ../configure $(config-opts) && \
> + sed -i '/^.run_help2man = .*dummy-man/s/^.//' Makefile && \
> + sed -i '/^run_help2man = .*help2man/d' Makefile
> +
> +PHONY += make
> +make: config
> + $(Q)$(MAKE) -C $(build-dir)
> +
> +PHONY += install
> +install: make
> + $(Q)$(MAKE) -C $(build-dir) install-exec DESTDIR=$(KFS_ROOT)
> +
> +PHONY += clean
> +clean:
> + $(Q)[ -d $(build-dir) ]
> && \
> + [ -f $(build-dir)/Makefile ]
> && \
> + $(MAKE) -C $(build-dir) clean || true
> +
> +PHONY += mrproper
> +mrproper:
> + $(Q)rm -rf $(src-dir)
> +
> +.PHONY: $(PHONY)
> +diff -ur coreutils-8.25.dist/src/ls.c coreutils-8.25/src/ls.c
> +--- coreutils-8.25.dist/src/ls.c 2016-01-14
> 07:16:23.000000000 -0500 ++++ coreutils-8.25/src/ls.c
> 2016-05-25 13:50:13.426213819 -0400 +@@ -3203,6 +3203,7 @@
> + if (nlink_width < b_len)
> + nlink_width = b_len;
> +
> ++#ifndef __ros__
> + if (S_ISCHR (f->stat.st_mode) || S_ISBLK
> (f->stat.st_mode))
> + {
> + char buf[INT_BUFSIZE_BOUND (uintmax_t)];
> +@@ -3218,6 +3219,7 @@
> + }
> + else
> + {
> ++#endif
We might be able to fix whatever is missing in Akaros, so we don't need
a patch. Low priority though. =)
Barret
--
You received this message because you are subscribed to the Google Groups
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.