From owner-freebsd-hackers Thu Feb 7 22:59:42 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from femail32.sdc1.sfba.home.com (femail32.sdc1.sfba.home.com [24.254.60.22]) by hub.freebsd.org (Postfix) with ESMTP id E8BC137B41F; Thu, 7 Feb 2002 22:59:37 -0800 (PST) Received: from math.missouri.edu ([24.12.197.197]) by femail32.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20020208065937.RAOW5531.femail32.sdc1.sfba.home.com@math.missouri.edu>; Thu, 7 Feb 2002 22:59:37 -0800 Message-ID: <3C63773A.8DBF36F6@math.missouri.edu> Date: Fri, 08 Feb 2002 00:59:06 -0600 From: Stephen Montgomery-Smith X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: "M. Warner Losh" Cc: sobomax@FreeBSD.ORG, jdp@FreeBSD.ORG, deischen@FreeBSD.ORG, jasone@FreeBSD.ORG, hackers@FreeBSD.ORG, jlemon@FreeBSD.ORG Subject: Re: Linking libc before libc_r into application causes weirdproblems References: <1013147180.73417.2.camel@notebook> <20020207.234939.69060047.imp@village.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "M. Warner Losh" wrote: > > Confirmed. test.c appears to work properly when compiled: > > cc -o test test.c -pthread > ./test > > Generally speaking, if you want to add -lc_r, you are doing things > incorrectly. I've done way to much building... In FreeBSD 3.x you > did need to do -lc_r, but that was changed to -pthread in 4.0. > > Warner > According to the man page for gcc, you are supposed to write cc -o test test.c -pthread -D_THREAD_SAFE or am I misunderstanding something? -- Stephen Montgomery-Smith stephen@math.missouri.edu http://www.math.missouri.edu/~stephen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message