coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] build: Option for building all tools in a single binary


From: Alex Deymo
Subject: Re: [PATCH v2] build: Option for building all tools in a single binary
Date: Mon, 16 Jun 2014 00:02:03 -0700

Hi again,

1. If I set main with noreturn:
int main (int argc, char **argv) ATTRIBUTE_NORETURN;

...then I get this error, presumably because of the implicit "return 0" on
main... So I opted for adding ATTRIBUTE_NORETURN only when the main
function is renamed:
<built-in>:0:0: error: function declared 'noreturn' has a 'return'
statement [-Werror]

2. Added --enable-single-binary-exceptions=prog1,prog2,... to handle this.
It build those as separated binaries. make install works without changes
(since the flag changes the variables at configure time).

3. Still no clue what's supposed to happen in that test with env, and can't
reproduce any difference between the single-binary and the normal mode
outside the test.

4. "make" and "make check" problem
The all-am target depends on the manpages $(MANS), which has all the
man/$prog.1 files. Those man/$prog.1 files depend on the src/$prog, which
should not be build in the single-binary case. Because of this dependency,
both src/coreutils and all the src/$prog are built. I added a PHONY target
after all-am that creates the symlinks on src/, but that doesn't work the
first time because makefile will evaluate the dependencies before we create
the symlinks, and it will use the rule it knows to generate the src/$prog
file (overriding the symlink).
Ideas on how to solve this?

Other changes included in v4 make the "make distcheck" happier, also
rebased to the last version.

Thanks!


On Fri, Jun 13, 2014 at 12:56 PM, Alex Deymo <address@hidden> wrote:

> Hi!
> I'm attaching the v3 of this patch (also v2 for reference).
>
> In short, what's new: "make check" with symlinks, --help/--version, NEWS,
> README, changes to bootstrap.conf; ls/dir/vdir case.
>
> The remaining points are:
> 1. Add ATTRIBUTTE_NORETURN to main() (probably on src/system.h), and fix
> all the mains that return.
> 2. Add another option to configure for exclude some binaries from the
> coreutils single-binary option. I don't see much value on this, but's not
> hard.
> 3. Fix the tests/misc/env.sh test case. No idea why it is not working.
>
> deymo.
>
>

Attachment: single-binary_v4.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]