[ovs-dev] [PATCH] INSTALL: Describe how to use a separate build directory.
YAMAMOTO Takashi
yamamoto at valinux.co.jp
Wed May 14 19:13:55 UTC 2014
> 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.
no idea.
kuma% clang --version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64--netbsd
Thread model: posix
kuma% clang -'###' -g a.o
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64--netbsd
Thread model: posix
clang: warning: argument unused during compilation: '-g'
"/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so" "-o" "a.out" "/usr/lib/crt0.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "a.o" "-lc" "/usr/lib/crtend.o" "/usr/lib/crtn.o"
kuma%
YAMAMOTO Takashi
More information about the dev
mailing list