From owner-freebsd-stable Wed Aug 6 09:10:43 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA04362 for stable-outgoing; Wed, 6 Aug 1997 09:10:43 -0700 (PDT) Received: from david.siemens.de (david.siemens.de [139.23.36.11]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA04339 for ; Wed, 6 Aug 1997 09:10:37 -0700 (PDT) Received: from salomon.mchp.siemens.de (salomon.siemens.de [139.23.33.13]) by david.siemens.de (8.8.6/8.8.5) with ESMTP id SAA18729 for ; Wed, 6 Aug 1997 18:10:30 +0200 (MDT) Received: from curry.mchp.siemens.de (daemon@curry.mchp.siemens.de [146.180.31.23]) by salomon.mchp.siemens.de (8.8.6/8.8.5) with ESMTP id SAA05551 for ; Wed, 6 Aug 1997 18:10:29 +0200 (MDT) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.8.6/8.8.6) id SAA28420 for ; Wed, 6 Aug 1997 18:10:26 +0200 (MET DST) From: Andre Albsmeier Message-Id: <199708061610.SAA01377@curry.mchp.siemens.de> Subject: Bug in libg++ Makefile To: freebsd-stable@freebsd.org Date: Wed, 6 Aug 1997 18:10:10 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I tried to compile the following program: #include int main(void) { double_complex a(1.0, 0.0),b; b=a+a; printf("b=%f %f\n",real(b),imag(b)); return 0; } It fails during the link stage with the error: /var/tmp/cc0255091.o: Undefined symbol `___pl__FRCt7complex1ZdT0' referenced from text segment However, when I replaced b=a+a with b=a-a everything worked. At least, I found a missing definition in /usr/src/gnu/lib/libstdc++/Makefile: We find SUBCC SUBCF SUBFC defined but only ADDCF ADDFC. After applying the following path everything worked. Is this correct or is there something different wrong (This is the first time I had something to do with g++ :-))? If it is correct, could someone bring it into the STABLE-tree, please? Thanks, Andre *** Makefile.ORI Wed Aug 6 17:41:05 1997 --- Makefile Wed Aug 6 17:39:01 1997 *************** *** 164,170 **** # ======== fcomplex.o ======= FCOMPLEX= -DF ! .for i in MAIN ADD CC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT FCOMPLEX+= -D${i} --- 164,170 ---- # ======== fcomplex.o ======= FCOMPLEX= -DF ! .for i in MAIN ADD CC ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT FCOMPLEX+= -D${i} *************** *** 206,212 **** # ======== dcomplex.o ======= DCOMPLEX= -DD ! .for i in MAIN ADD CC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT DCOMPLEX+= -D${i} --- 206,212 ---- # ======== dcomplex.o ======= DCOMPLEX= -DD ! .for i in MAIN ADD CC ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT DCOMPLEX+= -D${i} *************** *** 248,254 **** # ======== ldcomplex.o ======= LDCOMPLEX= -DLD ! .for i in MAIN ADD CC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT LDCOMPLEX+= -D${i} --- 248,254 ---- # ======== ldcomplex.o ======= LDCOMPLEX= -DLD ! .for i in MAIN ADD CC ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT LDCOMPLEX+= -D${i}