pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/games/gcompris



On Wed, Apr 11, 2012 at 01:01:10AM +0400, Aleksej Saushev wrote:
> > Fixed, thanks. (My main sandbox is now clang-based, but libf2c doesn't
> > compile there,
> 
> Can you show logs or provide steps to reproduce?

I set HAVE_LLVM=yes in my /etc/mk.conf and PKGSRC_COMPILER=clang; this is 
sufficient for all other packages AFAICT.

When building libf2c, pkgsrc still builds using gcc and fails because libtool 
complains (good!)
But why is it using CC=gcc instead of CC=clang?

It works when I do 'make patch && cd ${WRKSRC} && make':
#   compile  libf2c/dfe.o
clang -O2 -std=gnu99 -Werror     -I/usr/include -I. -DSkip_f2c_Undefs 
-DNO_My_ctype  -c    dfe.c -o dfe.o
dfe.c:104:6: error: using the result of an assignment as a condition without 
parentheses [-Werror,-Wparentheses]
        if(n=c_dfe(a))return(n);
           ~^~~~~~~~~
dfe.c:104:6: note: place parentheses around the assignment to silence this 
warning
        if(n=c_dfe(a))return(n);
            ^
           (         )
dfe.c:104:6: note: use '==' to turn this assignment into an equality comparison
        if(n=c_dfe(a))return(n);
            ^
            ==
dfe.c:126:6: error: using the result of an assignment as a condition without 
parentheses [-Werror,-Wparentheses]
        if(n=c_dfe(a)) return(n);
           ~^~~~~~~~~
dfe.c:126:6: note: place parentheses around the assignment to silence this 
warning
        if(n=c_dfe(a)) return(n);
            ^
           (         )
dfe.c:126:6: note: use '==' to turn this assignment into an equality comparison
        if(n=c_dfe(a)) return(n);
            ^
            ==
2 errors generated.

I could probably fix that.

But if I build from outside (just 'make'), I get:
--- f77_aloc.lo ---
libtool  --mode=compile gcc -O2 -std=gnu99 -Werror    -I/usr/include -I. 
-DSkip_f2c_Undefs -DNO_My_ctype  -c -o f77_aloc.lo f77_aloc.c

I.e., it's using gcc, not clang.

Does this work for anyone else?
 Thomas




Home | Main Index | Thread Index | Old Index