[ovs-dev] [PATCH] INSTALL: Describe how to use a separate build directory.

Ben Pfaff blp at nicira.com
Thu May 15 02:49:01 UTC 2014


On Thu, May 15, 2014 at 04:13:55AM +0900, YAMAMOTO Takashi wrote:
> > On Tue, May 13, 2014 at 10:36:30AM +0900, YAMAMOTO Takashi wrote:
> >> > 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'"
> > 
> > OK.  I see you're right.  So every project that uses Autoconf and
> > Automake generates such a warning (or error, with -Werror), with every
> > link step, on your system when building with clang?  I do not see one
> 
> while i haven't tried other autoconf/automake using programs,
> google'ing told me that it isn't so rare symptom.
> 
> > here.  I wonder what is different about your clang and mine.

OK.

I'm happy enough with a patch that adds -Qunused-argument, in cases
where the compiler accepts it.  (If we can figure out the root cause,
and fix that, then that is better, but I do not know what the root cause
is.)



More information about the dev mailing list