https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113218
Bug ID: 113218 Summary: gcc -pg fails on contemporary FreeBSD Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: emaste at freebsd dot org Target Milestone: --- FreeBSD retired _p profiled libraries in FreeBSD 14.0, so GCC specs need to be updated. Demonstrated below using the default FreeBSD devel/gcc port, but looking at gcc git I don't see any change. FreeBSD version: root@14:~ # uname -a FreeBSD 14 14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023 r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 GCC: root@14:~ # gcc --version gcc (FreeBSD Ports Collection) 12.2.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Failure: root@14:~ # gcc -pg hello.c /usr/local/bin/ld: cannot find -lc_p: No such file or directory Invocation, from gcc -v: collect2: error: ld returned 1 exit status /usr/local/libexec/gcc12/gcc/x86_64-portbld-freebsd14.0/12.2.0/collect2 -plugin /usr/local/libexec/gcc12/gcc/x86_64-portbld-freebsd14.0/12.2.0/liblto_plugin.so -plugin-opt=/usr/local/libexec/gcc12/gcc/x86_64-portbld-freebsd14.0/12.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp//ccGg5YU1.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc_p -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64_fbsd -V -dynamic-linker /libexec/ld-elf.so.1 /usr/lib/gcrt1.o /usr/lib/crti.o /usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd14.0/12.2.0/crtbegin.o -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd14.0/12.2.0 -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd14.0/12.2.0/../../../../../x86_64-portbld-freebsd14.0/lib -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd14.0/12.2.0/../../.. /tmp//cckdrIDm.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc_p -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd14.0/12.2.0/crtend.o /usr/lib/crtn.o