summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authorwma <wma@FreeBSD.org>2016-04-20 17:54:53 +0000
committerwma <wma@FreeBSD.org>2016-04-20 17:54:53 +0000
commit9aa0848a7e49b971afc93230a51b4867423b3fbd (patch)
tree2d254862b84964c3478f44fcd2eea975c07324f6 /sys/conf
parent03d3355a7151dbaee5bb492bfcc24a9416543ac1 (diff)
downloadFreeBSD-src-9aa0848a7e49b971afc93230a51b4867423b3fbd.zip
FreeBSD-src-9aa0848a7e49b971afc93230a51b4867423b3fbd.tar.gz
Fix MFS symbol redefinition with clang 3.8.0
Newest CLANG objcpy uses different name parsing. Modify regexp to match (i.e. avoid substitution of "/" or "-" with "_"). Obtained from: Semihalf Sponsored by: Juniper Networks Reviewed by: hselasky, zbb Differential Revision: https://reviews.freebsd.org/D5873
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/kern.post.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 3286c66..8e01374c 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -364,6 +364,9 @@ embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE}
--output-target ${EMBEDFS_FORMAT.${MACHINE_ARCH}} \
--binary-architecture ${EMBEDFS_ARCH.${MACHINE_ARCH}} \
${MFS_IMAGE} ${.TARGET}
+ # Provide set of two distinct regexp to match for GCC (first three)
+ # and for CLANG >= 3.8.0 (last three). First three should be removed
+ # once support for GCC and CLANG < 3.8.0 is abandoned.
${OBJCOPY} \
--rename-section .data=mfs,contents,alloc,load,readonly,data \
--redefine-sym \
@@ -372,6 +375,12 @@ embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE}
_binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_start=mfs_root \
--redefine-sym \
_binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_end=mfs_root_end \
+ --redefine-sym \
+ _binary_${MFS_IMAGE:C,[^-/[:alnum:]],_,g}_size=__mfs_root_size \
+ --redefine-sym \
+ _binary_${MFS_IMAGE:C,[^-/[:alnum:]],_,g}_start=mfs_root \
+ --redefine-sym \
+ _binary_${MFS_IMAGE:C,[^-/[:alnum:]],_,g}_end=mfs_root_end \
${.TARGET}
.endif
.endif
OpenPOWER on IntegriCloud