Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 2025 14:50:44 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 0e4c4cc4916c - main - share/mk: Remove more support for building profiled libraries
Message-ID:  <202502051450.515EoiHM016247@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=0e4c4cc4916c965f7f3116e1840396755d6b21f4

commit 0e4c4cc4916c965f7f3116e1840396755d6b21f4
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-02-05 14:49:11 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2025-02-05 14:49:11 +0000

    share/mk: Remove more support for building profiled libraries
    
    - Remove documentation of profiled library support from bsd.README
    
    - Remove rules to create individual .po files.  The rules to generate
      an archive from these files was already removed, so these .po rules
      aren't used.
    
    Reviewed by:    emaste
    Fixes:          3750ccefb862 ("Retire MK_PROFILE infrastructure")
    Differential Revision:  https://reviews.freebsd.org/D48819
---
 share/mk/bsd.README | 27 +++++++++++----------------
 share/mk/bsd.lib.mk | 32 +++-----------------------------
 2 files changed, 14 insertions(+), 45 deletions(-)

diff --git a/share/mk/bsd.README b/share/mk/bsd.README
index e957e9cdd48b..6bab0effbcf4 100644
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -112,9 +112,7 @@ the Makefile.
 The variable DESTDIR works as before.  It's not set anywhere but will change
 the tree where the file gets installed.
 
-The profiled libraries are no longer built in a different directory than
-the regular libraries.  A new suffix, ".po", is used to denote a profiled
-object, and ".pico" denotes a position-independent relocatable object.
+A ".pico" suffix denotes a position-independent relocatable object.
 ".nossppico" denotes a position-independent relocatable object without
 stack smashing protection and without sanitizer instrumentation.
 
@@ -318,19 +316,19 @@ DPADD		Additional dependencies for the program.  Usually used for
 
 			DPADD=${LIBCOMPAT} ${LIBUTIL}
 
-		There is a predefined identifier for each (non-profiled,
-		non-shared) library and object.  Library file names are
+		There is a predefined identifier for each (non-shared
+		library and object.  Library file names are
 		transformed to identifiers by removing the extension and
 		converting to upper case.
 
-		There are no special identifiers for profiled or shared
-		libraries or objects.  The identifiers for the standard
-		libraries are used in DPADD.  This works correctly iff all
-		the libraries are built at the same time.  Unfortunately,
-		it causes unnecessary relinks to shared libraries when
-		only the static libraries have changed.  Dependencies on
-		shared libraries should be only on the library version
-		numbers.
+		There are no special identifiers for shared libraries
+		or objects.  The identifiers for the standard
+		libraries are used in DPADD.  This works correctly iff
+		all the libraries are built at the same time.
+		Unfortunately, it causes unnecessary relinks to shared
+		libraries when only the static libraries have changed.
+		Dependencies on shared libraries should be only on the
+		library version numbers.
 
 FILES		A list of non-executable files.
 		The installation is controlled by the FILESNAME, FILESOWN,
@@ -629,9 +627,6 @@ SRCS		List of source files to build the library.  Suffix types
 The include file <bsd.lib.mk> includes the file named "../Makefile.inc"
 if it exists, as well as the include file <bsd.man.mk>.
 
-It has rules for building profiled objects; profiled libraries are
-built by default.
-
 Libraries are ranlib'd before installation.
 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index b7d6b333523b..d6e271ce0a06 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -148,23 +148,17 @@ CFLAGS += -mno-relax
 
 .include <bsd.libnames.mk>
 
-# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
+# prefer .s to a .c, remove stuff not used in the BSD libraries
 # .pico used for PIC object files
 # .nossppico used for NOSSP PIC object files
 # .pieo used for PIE object files
-.SUFFIXES: .out .o .bc .ll .po .pico .nossppico .pieo .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln
+.SUFFIXES: .out .o .bc .ll .pico .nossppico .pieo .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln
 
 .if !defined(PICFLAG)
 PICFLAG=-fpic
 PIEFLAG=-fpie
 .endif
 
-PO_FLAG=-pg
-
-.c.po:
-	${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-	${CTFCONVERT_CMD}
-
 .c.pico:
 	${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 	${CTFCONVERT_CMD}
@@ -177,9 +171,6 @@ PO_FLAG=-pg
 	${CC} ${PIEFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 	${CTFCONVERT_CMD}
 
-.cc.po .C.po .cpp.po .cxx.po:
-	${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-
 .cc.pico .C.pico .cpp.pico .cxx.pico:
 	${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
@@ -189,10 +180,6 @@ PO_FLAG=-pg
 .cc.pieo .C.pieo .cpp.pieo .cxx.pieo:
 	${CXX} ${PIEFLAG} ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
-.f.po:
-	${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
-	${CTFCONVERT_CMD}
-
 .f.pico:
 	${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
 	${CTFCONVERT_CMD}
@@ -201,15 +188,10 @@ PO_FLAG=-pg
 	${FC} ${PICFLAG} -DPIC ${FFLAGS:C/^-fstack-protector.*$//:C/^-fstack-clash-protection.*$//} -o ${.TARGET} -c ${.IMPSRC}
 	${CTFCONVERT_CMD}
 
-.s.po .s.pico .s.nossppico .s.pieo:
+.s.pico .s.nossppico .s.pieo:
 	${CC:N${CCACHE_BIN}} -x assembler ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 	${CTFCONVERT_CMD}
 
-.asm.po:
-	${CC:N${CCACHE_BIN}} -x assembler-with-cpp -DPROF ${PO_CFLAGS} \
-	    ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-	${CTFCONVERT_CMD}
-
 .asm.pico:
 	${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${PICFLAG} -DPIC \
 	    ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@@ -225,11 +207,6 @@ PO_FLAG=-pg
 	    ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 	${CTFCONVERT_CMD}
 
-.S.po:
-	${CC:N${CCACHE_BIN}} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \
-	    -o ${.TARGET}
-	${CTFCONVERT_CMD}
-
 .S.pico:
 	${CC:N${CCACHE_BIN}} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \
 	    -c ${.IMPSRC} -o ${.TARGET}
@@ -577,9 +554,6 @@ realinstall: maninstall
 
 .if defined(LIB) && !empty(LIB)
 OBJS_DEPEND_GUESS+= ${SRCS:M*.h}
-.for _S in ${SRCS:N*.[hly]}
-OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.po+=	${_S}
-.endfor
 .endif
 .if defined(SHLIB_NAME) || \
     defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)



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