Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 09 Aug 2011 17:48:42 +0200
From: Luka Marčetić <>
Subject: Re: cluts makefiles

On 08/09/2011 01:30 PM, Vasiliy Kulikov wrote:
> Hi,
> This is a patch to enhance musl building things.
> 1) Divided a single Makefile to the cluts, tests/, compile flags.
> 2) Used gcc's ability to identify dependencies.

Do others free compilers support nr 2?

> Unrelated things:
> include "sequence.c" is weird :)  It's better to use .h with
> declarations and .c files which build into .o.

It's an ad-hoc dir structure, therefore suboptimal. I'll add prototypes 
and other declarations into .h some day.

> With glibc:
> a) _SVID_SOURCE is needed for alphasort.

Maybe older glibc needed it (I get no warnings). I'm not sure it 
warrants an inclusion (it's SUSv4).

> b) SA_NODEFER is undefined in all .c.

It should be defined in signal.h. Alexander had problems with this. 
Trying to apply the patch that you wrote told me you're missing an 
_XOPEN_SOURCE flag I've relatively recently added to the Make-file on 
Rich's incentive, so perhaps you could should try that. If it's an old 
kernel version instead, necessary modifications would be more extensive, 
involving unblocking when entering the handler (sigprocmask?), removing 
SA_NODEFERs, using sig*jmp, and perhaps more in some cases.

> diff --git a/Makefile b/Makefile

Having made dirs a and b (both from the same repo dir), I tried `patch 
-p0 < yourpatch`, and got:

Hunk #1 FAILED at 7.
1 out of 1 hunk FAILED -- saving rejects to file a/Makefile.rej
patching file b/
patching file b/tests/Makefile

I tried to replace the offending line with:

-CFLAGS = -std=c99 -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -Wall 
-Wextra -O2

but somehow the error message persists. Is there something I'm missing?


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.