From nobody Fri May 23 23:48:29 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4b420s4rcGz5wmmL; Fri, 23 May 2025 23:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b420s1gscz41Bj; Fri, 23 May 2025 23:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748044109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=20L/O1n9jI+IBYal7irVkDDGnPVEbKw7goYlUowLrno=; b=Tr0+UZQ/spHZvOzQs9MPpxgJBa9yjT2iSrxSa60iX7Qo2KrdG6QGSVcbhRpR0zb9fADVyk 0ed1iCpQ1tTRF2k83sG5kQsh27KWth1LKsZ2CzxfaB+0Hfnoe5Jf06S8jkCHN6qnPxGUpx TtFVxzS5FKn9DMFEOm3utoJfeCrNev9pZqxLwUv+rtN9WgYQkGgvERyNek8K8csQLOS1QE k0Vq5o6B95ZCfHVBDKddOaZSNNN7wFhwPOycixyv/I6eSFt4F2p5+3rsZ1M/jiie4TzrIv cdO9wi7IBqhCoudFwZi1XVtap53E9D9QAeT/NZ3Dif4PJWBB0EIO6bC8uFjMQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748044109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=20L/O1n9jI+IBYal7irVkDDGnPVEbKw7goYlUowLrno=; b=k4ghKKeJ08qrHdjvkkSD/PHlsumZTOR7nr/pOgV6dC78MAfqBie0nkzUSn23ciHjm8T0zr 1PQ0t8qVHDSyqCCWRZ43z50ufwN5ry+lCSIZHjxfGqydSpKhgTYWQvPJUYCk7+Z7p7muzG u6ud7K4T3RUA37c1rjZX24m3HK3JEyy9NIfzNJ+24/+aX17sGN7OcHCIY7nZbYIgLcKIDJ 9/fdaosUFyX4FOjI4exOfRk7gaVRAYvFwBj132zlspXkEliPbaaE3mhhUCpAZTjqAMvu8c UdMl0jY0+kcodAp7nzFPwx/ttDGMksyN3mcLKQaKChospBOjb1YA6s9yoxfZUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748044109; a=rsa-sha256; cv=none; b=f0V4mj4AwYNiiFLFUb6wtu4bqS6c2VkzLJYKolxd9tskCAqDu7A92U2XXLWWqCpG/ncgiy M+b1/iu47NprwgdwDiUsxTdsVuLB6mIVvJa79t0usVjjp91ie76kx/KvrsMDLVmfMAtFpP oxuRA8dGqIU3WcHT+Va5B9DSg8DzedrFPVlm+smv/kqqxhaMOsVkYNSVabXF4soHsAqREI NS+fFDYYjzwPz8Ke8hyQuw0BwSIGRkULXcZyqOm+y/mJgsaQaNPBfNZwvAHP1yvD2l9hyd JtAl9guCWtePvgLv/e/DjSSmQud9nCwoq5AFnh6G/4duU37rQF3kEXn5XlAMUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4b420s0tZxz1QGn; Fri, 23 May 2025 23:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54NNmTv3046818; Fri, 23 May 2025 23:48:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54NNmTjR046815; Fri, 23 May 2025 23:48:29 GMT (envelope-from git) Date: Fri, 23 May 2025 23:48:29 GMT Message-Id: <202505232348.54NNmTjR046815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: fbfc85d9e81f - main - share/mk: make *ADD and *FLAGS descriptions common List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbfc85d9e81f751c52f3ded445d4ae03b8307667 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=fbfc85d9e81f751c52f3ded445d4ae03b8307667 commit fbfc85d9e81f751c52f3ded445d4ae03b8307667 Author: Brooks Davis AuthorDate: 2025-05-23 23:34:26 +0000 Commit: Brooks Davis CommitDate: 2025-05-23 23:37:50 +0000 share/mk: make *ADD and *FLAGS descriptions common Move ACFLAGS, AFLAGS, CFLAGS, CXXFLAGS, DPADD, LDADD, LDFLAGS, and LIBADD descriptions into the common section since they aren't limited to bsd.progs.mk. Mostly just relocated, but updated the DPADD text to reflect its relocation. Reviewed by: jhb Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D50479 --- share/mk/bsd.README | 114 +++++++++++++++++++++++++--------------------------- 1 file changed, 54 insertions(+), 60 deletions(-) diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 6bab0effbcf4..03cb996f0f67 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -120,14 +120,20 @@ stack smashing protection and without sanitizer instrumentation. The following variables are common: -AFLAGS.${SRC} - Flags dependent on source file name. -AFLAGS.${.TARGET:T} - Flags dependent on output file name. +ACFLAGS Flags to the compiler when preprocessing and + assembling .S files. ACFLAGS.${SRC} Flags dependent on source file name. ACFLAGS.${.TARGET:T} Flags dependent on output file name. + +AFLAGS Flags to the assembler when assembling .s files. +AFLAGS.${SRC} + Flags dependent on source file name. +AFLAGS.${.TARGET:T} + Flags dependent on output file name. + +CFLAGS Flags to the compiler when creating C objects. CFLAGS.${SRC} Flags dependent on source file name. CFLAGS.${.TARGET:T} @@ -139,6 +145,7 @@ CFLAGS.${MACHINE_ARCH} CFLAGS_NO_SIMD Add this to CFLAGS for programs that don't want any SIMD instructions generated. It is setup in bsd.cpu.mk to an appropriate value for the compiler and target. + CXXFLAGS.${COMPILER_TYPE} Flags dependent on compiler added to CXXFLAGS. CXXFLAGS.${MACHINE_ARCH} @@ -147,6 +154,49 @@ CXXFLAGS.${SRC} Flags dependent on source file name. CXXFLAGS.${.TARGET:T} Flags dependent on output file name. + +DPADD Additional dependencies. Usually used for libraries. + For example, to depend on the compatibility and utility + libraries use: + + DPADD=${LIBCOMPAT} ${LIBUTIL} + + 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 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. + +LDADD Additional loader objects. Usually used to add libraries. + For example, to load with the compatibility and utility + libraries, use: + + LDADD=-lutil -lcompat + +LDADD.${.TARGET:T} + Loader objects dependent on output file name. + +LDFLAGS Additional loader flags. Passed to the loader via CC, + since that's used to link programs as well, so loader + specific flags need to be prefixed with -Wl, to work. +LDFLAGS.${.TARGET:T} + Flags dependent on output file name. + +LIBADD Additional libraries. This is for base system libraries + and is only valid inside of the FreeBSD tree. + Use LIBADD=name instead of LDADD=-lname. + +LIBADD.${.TARGET:T} + Libraries dependent on output file name. + COMPILER_FEATURES A list of features that the compiler supports. Zero or more of: @@ -281,19 +331,12 @@ It has seven targets: It sets/uses the following variables: -ACFLAGS Flags to the compiler when preprocessing and - assembling .S files. - -AFLAGS Flags to the assembler when assembling .s files. - BINGRP Binary group. BINMODE Binary mode. BINOWN Binary owner. -CFLAGS Flags to the compiler when creating C objects. - CLEANDIRS Additional files (CLEANFILES) and directories (CLEANDIRS) to CLEANFILES remove during clean and cleandir targets. "rm -rf" and "rm -f" are used, respectively. @@ -310,54 +353,11 @@ DIRS A list of variables referring to directories. For example: will be created before the files are installed and the dependencies will be set correctly. -DPADD Additional dependencies for the program. Usually used for - libraries. For example, to depend on the compatibility and - utility libraries use: - - DPADD=${LIBCOMPAT} ${LIBUTIL} - - 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 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, FILESGRP, FILESMODE, FILESDIR variables that can be further specialized by FILES_. -LDADD Additional loader objects. Usually used for libraries. - For example, to load with the compatibility and utility - libraries, use: - - LDADD=-lutil -lcompat - -LDADD.${.TARGET:T} - Loader objects dependent on output file name. - -LDFLAGS Additional loader flags. Passed to the loader via CC, - since that's used to link programs as well, so loader - specific flags need to be prefixed with -Wl, to work. - -LDFLAGS.${.TARGET:T} - Flags dependent on output file name. - -LIBADD Additional libraries. This is for base system libraries - and is only valid inside of the /usr/src tree. - Use LIBADD=name instead of LDADD=-lname. - -LIBADD.${.TARGET:T} - Libraries dependent on output file name. - LINKS The list of binary links; should be full pathnames, the linked-to file coming first, followed by the linked file. The files are hard-linked. For example, to link @@ -568,16 +568,10 @@ the BSD tree. It sets/uses the following variables: -LDADD Additional loader objects. - LIB The name of the library to build. Both a shared and static library will be built. NO_PIC can be set to only build a static library. -LIBADD Additional libraries. This is for base system libraries - and is only valid inside of the /usr/src tree. - Use LIBADD=name instead of LDADD=-lname. - LIBDIR Target directory for libraries. LIBGRP Library group.