Current-Users archive

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

amusing bug in lib/libcrypto Makefile (netbsd-5)


I have a private tree in git where the git sha1, etc. is placed via eventually making its way into kern.version.  That can easily
exceed 256 characters, especially with descriptive branch names that
make their way into build directories.

While testing a workaround for too-long version names, I used as a build


This resulted in failure in lib/libcrypto:

./buildinf.h(3): syntax error 'version' [249]
./buildinf.h(27): syntax error 'sizeof' [249]
./buildinf.h(47): unknown character \134 [250]
./buildinf.h(52): incomplete or misplaced function definition [22]
./buildinf.h(52): warning: redeclaration of BIO_snprintf [27]
./buildinf.h(52): warning: old style declaration; add int [1]

and the problem is this line in lib/libcrypto/Makefile:

        @echo "#define CFLAGS \"`${CC} -v 2>&1 | grep version`\"" >>buildinf.h

which fails to deal with

Using built-in specs.
Target: i386--netbsdelf
Configured with: 
 --target=i386--netbsdelf --disable-nls --enable-long-long --disable-multilib 
--enable-threads --program-transform-name=s,^,i386--netbsdelf-, 
--enable-languages=c c++ objc --enable-__cxa_atexit 
Thread model: posix
gcc version 4.1.3 20080704 (prerelease) (NetBSD nb2 20081120)

because my build directory contains the word "version" and the
grepped-out-string is two lines.

(This is src/lib/libcrypto in netbsd-5 and in -current

I propose to fix this by changing 'grep version' to 'tail -1'.  If there
are no better ideas or objections I'll kick off a build of current with
the change to see if it works.

Attachment: pgpRMq8SvOiuB.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index