emaste created this revision.
emaste added reviewers: kib, imp.
Herald added subscribers: jhibbits, andrew.
Herald added a reviewer: manu.
emaste requested review of this revision.
REVISION SUMMARY
With the transition to Git `$FreeBSD$` serves no purpose. Stop embedding
`__FBSDID()` by default. Switch to opt-in, in case any downstream consumers
have external tooling to populate it.
REVISION DETAIL
https://reviews.freebsd.org/D33604
AFFECTED FILES
lib/csu/Makefile.inc
lib/libc/Makefile
sys/amd64/include/asm.h
sys/arm/include/asm.h
sys/arm64/include/asm.h
sys/i386/include/asm.h
sys/mips/include/asm.h
sys/powerpc/include/asm.h
sys/riscv/include/asm.h
sys/sys/cdefs.h
usr.sbin/lpr/common_source/lp.cdefs.h
EMAIL PREFERENCES
https://reviews.freebsd.org/settings/panel/emailpreferences/
To: emaste, kib, imp, manu
Cc: andrew, freebsd-toolchain-list, jhibbits, mhorne
diff --git a/usr.sbin/lpr/common_source/lp.cdefs.h b/usr.sbin/lpr/common_source/lp.cdefs.h
--- a/usr.sbin/lpr/common_source/lp.cdefs.h
+++ b/usr.sbin/lpr/common_source/lp.cdefs.h
@@ -87,7 +87,7 @@
* handle rcs id's.
*/
#if !defined(__FBSDID)
-# if defined(lint) || defined(STRIP_FBSDID)
+# if defined(lint) || !defined(EMBED_FBSDID)
# define __FBSDID(s) struct skip_rcsid_struct
# elif defined(__IDSTRING) /* NetBSD */
# define __FBSDID(s) __IDSTRING(rcsid,s)
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -580,7 +580,7 @@
* __FBSDID("$FreeBSD$");
*/
#ifndef __FBSDID
-#if !defined(STRIP_FBSDID)
+#if defined(EMBED_FBSDID)
#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
#else
#define __FBSDID(s) struct __hack
diff --git a/sys/riscv/include/asm.h b/sys/riscv/include/asm.h
--- a/sys/riscv/include/asm.h
+++ b/sys/riscv/include/asm.h
@@ -38,11 +38,11 @@
#define _MACHINE_ASM_H_
#undef __FBSDID
-#if !defined(lint) && !defined(STRIP_FBSDID)
+#if !defined(lint) && defined(EMBED_FBSDID)
#define __FBSDID(s) .ident s
#else
#define __FBSDID(s) /* nothing */
-#endif /* not lint and not STRIP_FBSDID */
+#endif /* not lint and EMBED_FBSDID */
#define _C_LABEL(x) x
diff --git a/sys/powerpc/include/asm.h b/sys/powerpc/include/asm.h
--- a/sys/powerpc/include/asm.h
+++ b/sys/powerpc/include/asm.h
@@ -247,11 +247,11 @@
#define RCSID(x) .text; .asciz x
#undef __FBSDID
-#if !defined(lint) && !defined(STRIP_FBSDID)
+#if !defined(lint) && defined(EMBED_FBSDID)
#define __FBSDID(s) .ident s
#else
#define __FBSDID(s) /* nothing */
-#endif /* not lint and not STRIP_FBSDID */
+#endif /* not lint and EMBED_FBSDID */
#define WEAK_REFERENCE(sym, alias) \
.weak alias; \
diff --git a/sys/mips/include/asm.h b/sys/mips/include/asm.h
--- a/sys/mips/include/asm.h
+++ b/sys/mips/include/asm.h
@@ -64,7 +64,7 @@
#include <machine/cdefs.h>
#undef __FBSDID
-#if !defined(lint) && !defined(STRIP_FBSDID)
+#if !defined(lint) && defined(EMBED_FBSDID)
#define __FBSDID(s) .ident s
#else
#define __FBSDID(s) /* nothing */
diff --git a/sys/i386/include/asm.h b/sys/i386/include/asm.h
--- a/sys/i386/include/asm.h
+++ b/sys/i386/include/asm.h
@@ -124,10 +124,10 @@
#define RCSID(x) .text; .asciz x
#undef __FBSDID
-#if !defined(STRIP_FBSDID)
+#if defined(EMBED_FBSDID)
#define __FBSDID(s) .ident s
#else
#define __FBSDID(s) /* nothing */
-#endif /* not STRIP_FBSDID */
+#endif /* not EMBED_FBSDID */
#endif /* !_MACHINE_ASM_H_ */
diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h
--- a/sys/arm64/include/asm.h
+++ b/sys/arm64/include/asm.h
@@ -30,7 +30,7 @@
#define _MACHINE_ASM_H_
#undef __FBSDID
-#if !defined(lint) && !defined(STRIP_FBSDID)
+#if !defined(lint) && defined(EMBED_FBSDID)
#define __FBSDID(s) .ident s
#else
#define __FBSDID(s) /* nothing */
diff --git a/sys/arm/include/asm.h b/sys/arm/include/asm.h
--- a/sys/arm/include/asm.h
+++ b/sys/arm/include/asm.h
@@ -163,7 +163,7 @@
#endif /* PIC */
#undef __FBSDID
-#if !defined(lint) && !defined(STRIP_FBSDID)
+#if !defined(lint) && defined(EMBED_FBSDID)
#define __FBSDID(s) .ident s
#else
#define __FBSDID(s) /* nothing */
diff --git a/sys/amd64/include/asm.h b/sys/amd64/include/asm.h
--- a/sys/amd64/include/asm.h
+++ b/sys/amd64/include/asm.h
@@ -103,10 +103,10 @@
#define RCSID(x) .text; .asciz x
#undef __FBSDID
-#if !defined(STRIP_FBSDID)
+#if defined(EMBED_FBSDID)
#define __FBSDID(s) .ident s
#else
#define __FBSDID(s) /* nothing */
-#endif /* !STRIP_FBSDID */
+#endif /* !EMBED_FBSDID */
#endif /* !_MACHINE_ASM_H_ */
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -21,6 +21,7 @@
LIBC_ARCH=${MACHINE_CPUARCH}
.endif
+# XXX
# All library objects contain FreeBSD revision strings by default; they may be
# excluded as a space-saving measure. To produce a library that does
# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
diff --git a/lib/csu/Makefile.inc b/lib/csu/Makefile.inc
--- a/lib/csu/Makefile.inc
+++ b/lib/csu/Makefile.inc
@@ -19,7 +19,6 @@
ACFLAGS+= -DLOCORE
-CFLAGS+= -DSTRIP_FBSDID
CFLAGS+= -fno-asynchronous-unwind-tables
CFLAGS+= -fno-omit-frame-pointer
CFLAGS+= -I${.CURDIR:H}/common \