In my quest to port Duke Nukem 3D to FreeBSD, I'm trying to profile
the program to see what's making it so low, as suggested on the
3drealms forum. I add -pg to CFLAGS and LDFLAGS, and when it gets to
the linking stage, it dies like this:
gcc -o build -g -pg -L/usr/local/lib -Wl,-rpath,/usr/local/lib \
-lSDL-1.1 -pthread build.o bstub.o engine.o cache1d.o \
sdl_driver.o unix_compat.o a.o pragmas.o
/usr/local/lib/libaa.so.1: undefined reference to `longjmp'
/usr/local/lib/libaa.so.1: undefined reference to `setjmp'
/usr/X11R6/lib/libX11.so.6: undefined reference to `getgid'
/usr/local/lib/libaa.so.1: undefined reference to `random'
/usr/local/lib/libesd.so.2: undefined reference to `connect'
[snip about 50 more similar lines]
If I take the -pg out, it compiles fine again. After googling, I
thought I might be missing the profiling libraries, so I set NOPROFILE
to false in /etc/make.conf and did a full installworld and kernel
(4.8-R). But I still get the same error above. I looked in /usr/lib,
and I do have a bunch of lib*_p.a files, like libc_p.a. They're all
dated from the day I originally installed this system, so it doesn't
look like my installworld installed them, but they do exist.
Anyone know what I'm missing here?
Thanks,
--
Aaron