Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Sep 1996 22:36:24 +0200 (MET DST)
From:      "Ph. Charnier" <charnier@xp11.frmug.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   gnu/1683: c++/g++ file.cc fails at link time (no libstdc++).
Message-ID:  <199609262036.WAA07020@xp11.frmug.org>
Resent-Message-ID: <199609262040.NAA03269@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1683
>Category:       gnu
>Synopsis:       c++/g++ tries to link with libstdc++.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 26 13:40:03 PDT 1996
>Last-Modified:
>Originator:     Ph. Charnier
>Organization:
>Release:        FreeBSD 2.2-CURRENT i386
>Environment:

	

>Description:

	libstdc++ is not included but g++ wants it.

>How-To-Repeat:

	g++ file.cc -o file

>Fix:
	
Index: cp/g++.c
===================================================================
RCS file: /home2h/FreeBSD.cvsroot/src/contrib/gcc/cp/g++.c,v
retrieving revision 1.2
diff -u -r1.2 g++.c
--- g++.c	1996/09/18 06:33:32	1.2
+++ g++.c	1996/09/26 20:25:13
@@ -371,6 +371,8 @@
 
   /* This will be 0 if we encounter a situation where we should not
      link in libstdc++, or 2 if we should link in libg++ as well.  */
+  /* Under FreeBSD library == 1 is dummy because libstdc++ doesn't 
+     exist. */
   int library = 1;
 
   /* Used to track options that take arguments, so we don't go wrapping
@@ -542,8 +544,10 @@
       /* Add `-lg++' if we haven't already done so.  */
       if (library == 2)
 	arglist[j++] = "-lg++";
+#ifndef __FreeBSD__
       if (library)
 	arglist[j++] = "-lstdc++";
+#endif
       if (saw_math)
 	arglist[j++] = saw_math;
       else if (library)
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609262036.WAA07020>