Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111646875
D36076.id110373.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D36076.id110373.diff
View Options
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -162,7 +162,7 @@
# If there are no machine dependent sources, append all the
# machine-independent sources:
-.if empty(MDSRCS)
+.if empty(MDSRCS) || ${MK_MACHDEP_OPTIMIZATIONS} == no
SRCS+= ${MISRCS}
.else
# Append machine-dependent sources, then append machine-independent sources
diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile
--- a/lib/libmd/Makefile
+++ b/lib/libmd/Makefile
@@ -103,7 +103,7 @@
.PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH}
USE_ASM_SOURCES?=1
-.if defined(BOOTSTRAPPING)
+.if defined(BOOTSTRAPPING) || ${MK_MACHDEP_OPTIMIZATIONS} == no
# Don't build ASM sources when bootstrapping to avoid toolchain dependencies
USE_ASM_SOURCES:=0
.endif
diff --git a/lib/msun/Makefile b/lib/msun/Makefile
--- a/lib/msun/Makefile
+++ b/lib/msun/Makefile
@@ -151,7 +151,7 @@
#COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c
# Exclude the generic versions of what we provide in the MD area.
-.if defined(ARCH_SRCS)
+.if defined(ARCH_SRCS) && ${MK_MACHDEP_OPTIMIZATIONS} != no
.for i in ${ARCH_SRCS}
COMMON_SRCS:= ${COMMON_SRCS:N${i:R}.c}
.endfor
diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -1094,6 +1094,8 @@
Build
.Xr ls 1
without support for colors to distinguish file types.
+.It Va WITHOUT_MACHDEP
+Prefer machine-independent non-assembler code across the code base.
.It Va WITHOUT_MAIL
Do not build any mail support (MUA or MTA).
When set, it enforces these options:
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -142,6 +142,7 @@
LOCATE \
LPR \
LS_COLORS \
+ MACHDEP_OPTIMIZATIONS \
MAIL \
MAILWRAPPER \
MAKE \
diff --git a/tools/build/options/WITHOUT_MACHDEP_OPTIMIZATIONS b/tools/build/options/WITHOUT_MACHDEP_OPTIMIZATIONS
new file mode 100644
--- /dev/null
+++ b/tools/build/options/WITHOUT_MACHDEP_OPTIMIZATIONS
@@ -0,0 +1 @@
+Prefer machine-independent non-assembler code in libc and libm.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 11:39 AM (19 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17026752
Default Alt Text
D36076.id110373.diff (2 KB)
Attached To
Mode
D36076: src.conf: Introduce WITHOUT_MACHDEP knob.
Attached
Detach File
Event Timeline
Log In to Comment