Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105921840
D34125.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34125.diff
View Options
diff --git a/Mk/Uses/elfctl.mk b/Mk/Uses/elfctl.mk
new file mode 100644
--- /dev/null
+++ b/Mk/Uses/elfctl.mk
@@ -0,0 +1,27 @@
+# Change an ELF binary's feature control note
+#
+# Feature: elfctl
+# Usage: USES=elfctl
+# Valid ARGS: none
+#
+# Variables
+#
+# ELF_FEATURES= featurelist:path/to/file1 \
+# featurelist:path/to/file1 \
+ featurelist:path/to/file2
+#
+# The file paths listed in ELF_FEATURES are relative to ${BUILD_WRKSRC}.
+#
+
+.if !defined(_INCLUDE_USES_ELFCTL_MK)
+_INCLUDE_USES_ELFCTL_MK= yes
+
+. if ! empty(ELF_FEATURES)
+_USES_build+= 720:elfctl-post-build
+elfctl-post-build:
+. for feat in ${ELF_FEATURES}
+ ${ELFCTL} -i -e ${feat:C/:.*//} ${BUILD_WRKSRC}/${feat:C/.*://}
+. endfor
+. endif
+
+.endif
diff --git a/Mk/bsd.commands.mk b/Mk/bsd.commands.mk
--- a/Mk/bsd.commands.mk
+++ b/Mk/bsd.commands.mk
@@ -34,6 +34,7 @@
DIFF?= /usr/bin/diff
DIRNAME?= /usr/bin/dirname
EGREP?= /usr/bin/egrep
+ELFCTL?= /usr/bin/elfctl
EXPR?= /bin/expr
FALSE?= false # Shell builtin
FILE?= /usr/bin/file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 5:16 PM (18 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15572237
Default Alt Text
D34125.diff (1 KB)
Attached To
Mode
D34125: Mk/Uses: Add elfctl
Attached
Detach File
Event Timeline
Log In to Comment