[PATCH 4/5] Deal with c99 inline semantics.

Thomas Klausner tk at giga.or.at
Tue Nov 6 08:52:04 CET 2012


On Tue, Nov 06, 2012 at 08:37:46AM +0100, Werner Koch wrote:
> On Mon,  5 Nov 2012 17:29, tk at giga.or.at said:
> 
> > The difference between gcc and clang here is that clang by default
> > defines -std=gnu99. You probably will see the same problem when
> > compiling the code with GCC and that setting (see also
> 
> But it seems not to behave exactly as defined for gnu99.  If you can
> show that there is a problem when using gcc -std=gnu99 I will look at it
> again.

That's easy, here goes:
# gcc --version
gcc (NetBSD nb1 20120916) 4.5.4
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# cd /tmp
# tar xzf /distfiles/gnupg-1.4.12.tar.bz2
# cd gnupg-1.4.12
# ./configure CPPFLAGS=-std=gnu99
...
# gmake CPPFLAGS=-std=gnu99
...
gcc  -g -O2 -Wall -Wno-pointer-sign   -o mpicalc mpicalc.o ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a   ../intl/libintl.a
../mpi/libmpi.a(mpi-bit.o): In function `mpihelp_add_1':
/tmp/gnupg-1.4.12/mpi/mpi-inline.h:41: multiple definition of `mpihelp_add_1'
../mpi/libmpi.a(mpi-add.o):/tmp/gnupg-1.4.12/mpi/mpi-inline.h:41: first defined here
../mpi/libmpi.a(mpi-bit.o): In function `mpihelp_add':
/tmp/gnupg-1.4.12/mpi/mpi-inline.h:68: multiple definition of `mpihelp_add'
../mpi/libmpi.a(mpi-add.o):/tmp/gnupg-1.4.12/mpi/mpi-inline.h:68: first defined here
../mpi/libmpi.a(mpi-bit.o): In function `mpihelp_sub_1':
/tmp/gnupg-1.4.12/mpi/mpi-inline.h:87: multiple definition of `mpihelp_sub_1'
../mpi/libmpi.a(mpi-add.o):/tmp/gnupg-1.4.12/mpi/mpi-inline.h:87: first defined here
../mpi/libmpi.a(mpi-bit.o): In function `mpihelp_sub':
/tmp/gnupg-1.4.12/mpi/mpi-inline.h:114: multiple definition of `mpihelp_sub'
../mpi/libmpi.a(mpi-add.o):/tmp/gnupg-1.4.12/mpi/mpi-inline.h:114: first defined here
../mpi/libmpi.a(mpi-div.o): In function `mpihelp_add_1':
/tmp/gnupg-1.4.12/mpi/mpi-inline.h:41: multiple definition of `mpihelp_add_1'
../mpi/libmpi.a(mpi-add.o):/tmp/gnupg-1.4.12/mpi/mpi-inline.h:41: first defined here
../mpi/libmpi.a(mpi-div.o): In function `mpihelp_add':
/tmp/gnupg-1.4.12/mpi/mpi-inline.h:68: multiple definition of `mpihelp_add'
../mpi/libmpi.a(mpi-add.o):/tmp/gnupg-1.4.12/mpi/mpi-inline.h:68: first defined here
../mpi/libmpi.a(mpi-div.o): In function `mpihelp_sub_1':
/tmp/gnupg-1.4.12/mpi/mpi-inline.h:87: multiple definition of `mpihelp_sub_1'
../mpi/libmpi.a(mpi-add.o):/tmp/gnupg-1.4.12/mpi/mpi-inline.h:87: first defined here
../mpi/libmpi.a(mpi-div.o): In function `mpihelp_sub':
/tmp/gnupg-1.4.12/mpi/mpi-inline.h:114: multiple definition of `mpihelp_sub'
../mpi/libmpi.a(mpi-add.o):/tmp/gnupg-1.4.12/mpi/mpi-inline.h:114: first defined here
../mpi/libmpi.a(mpi-gcd.o): In function `mpihelp_add_1':
(and lots more of the same)

 Thomas



More information about the Gnupg-devel mailing list