[ovs-dev] [PATCH] INSTALL: Describe how to use a separate build directory.
yamamoto at valinux.co.jp
Tue May 13 01:36:30 UTC 2014
> On Sat, May 10, 2014 at 08:17:16AM -0700, Ben Pfaff wrote:
>> On Sat, May 10, 2014 at 02:17:26PM +0900, YAMAMOTO Takashi wrote:
>> > btw, --enable-Werror CC=clang doesn't work.
>> > (clang complains about -g for linking)
>> > is it only for me? a workaround is LDFLAGS=-Qunused-argument.
> Thinking about it a bit further, I am a little surprised that we are
> passing -Werror as part of flags for linking. I think that we only add
> -Werror to CFLAGS, so it should not appear when linking. Are we doing
> something wrong there?
my undestanding is:
- AC_PROG_CC considers clang as gcc and sets CFLAGS=-g -O2.
- --enable-Werror ends up to add -Werror to CFLAGS.
(thus CFLAGS=-g -O2 -Werror)
- automake generates the following for linking on my environment.
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
- clang complains "clang: error: argument unused during compilation: '-g'"
i'm not familiar enough with autofoo tools to say which step is wrong.
More information about the dev