#undef FBSD_TARGET_LINK_SPEC
#define FBSD_TARGET_LINK_SPEC " \
%{p:%nconsider using `-pg' instead of `-p' with gprof (1)} \
+ " FBSD_LINK_PG_NOTE " \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
#undef LINK_SPEC
#define LINK_SPEC " \
%{p:%nconsider using `-pg' instead of `-p' with gprof (1)} \
+ " FBSD_LINK_PG_NOTE " \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
libc, depending on whether we're doing profiling or need threads support.
(similar to the default, except no -lg, and no -p). */
+#if FBSD_MAJOR < 14
+#define FBSD_LINK_PG_NOTHREADS "%{!pg: -lc} %{pg: -lc_p}"
+#define FBSD_LINK_PG_THREADS "%{!pg: %{pthread:-lpthread} -lc} " \
+ "%{pg: %{pthread:-lpthread} -lc_p}"
+#define FBSD_LINK_PG_NOTE ""
+#else
+#define FBSD_LINK_PG_NOTHREADS "%{-lc} "
+#define FBSD_LINK_PG_THREADS "%{pthread:-lpthread} -lc "
+#define FBSD_LINK_PG_NOTE "%{pg:%nFreeBSD no longer provides profiled "\
+ "system libraries}"
+#endif
+
#ifdef FBSD_NO_THREADS
#define FBSD_LIB_SPEC " \
%{pthread: %eThe -pthread option is only supported on FreeBSD when gcc \
is built with the --enable-threads configure-time option.} \
%{!shared: \
- %{!pg: -lc} \
- %{pg: -lc_p} \
+ " FBSD_LINK_PG_NOTHREADS " \
}"
#else
#define FBSD_LIB_SPEC " \
%{!shared: \
- %{!pg: %{pthread:-lpthread} -lc} \
- %{pg: %{pthread:-lpthread_p} -lc_p} \
+ " FBSD_LINK_PG_THREADS " \
} \
%{shared: \
%{pthread:-lpthread} -lc \
#undef LINK_SPEC
#define LINK_SPEC "\
%{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
+ " FBSD_LINK_PG_NOTE " \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
#define LINK_SPEC "\
%{m32:-m elf_i386_fbsd}%{!m32:-m elf_x86_64_fbsd} \
%{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
+ " FBSD_LINK_PG_NOTE " \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
#define LINK_SPEC " \
-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv \
%{p:%nconsider using `-pg' instead of `-p' with gprof (1)} \
+ " FBSD_LINK_PG_NOTES " \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
-X \
#define LINK_OS_FREEBSD_SPEC_DEF "\
%{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
+ " FBSD_LINK_PG_NOTE " \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
#define LINK_OS_FREEBSD_SPEC "\
%{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
+ " FBSD_LINK_PG_NOTE " \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \