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 here. I wonder what is different about your clang and mine. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev