Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 2009 23:43:51 -0700
From:      freebsd@t41t.com
To:        freebsd-questions@freebsd.org
Subject:   gcc -pg and ld error, "cannot find -lgcc_p"
Message-ID:  <20091027064351.GQ22136@ece.pdx.edu>

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

On 7.2-RELEASE-p4, I have a very complicated C program:

	int main(int argc, char** argv)
	{
		return 5;
	}

I can compile this program (cc example.c -o example) and it compiles
and runs fine. However, if I try to enable profiling of this program by
compiling it as "cc example.c -pg -o example" I get an error:

	/usr/bin/ld: cannot find -lgcc_p

Is there some port/package that I'm missing? A configuration somewhere? Why
is ld stumbling on the profiling flag?

Thanks.





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