Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148758613
D41661.id126917.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
D41661.id126917.diff
View Options
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -7,12 +7,14 @@
LIBC_SRCTOP?= ${.CURDIR}
-# Pick the current architecture directory for libc. In general, this is
-# named MACHINE_CPUARCH, but some ABIs are different enough to require
-# their own libc, so allow a directory named MACHINE_ARCH to override this.
-
-.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/})
-LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/}
+# Pick the current architecture directory for libc. In general, this is named
+# MACHINE_CPUARCH, but some ABIs are different enough to require their own libc,
+# so allow a directory named MACHINE_ARCH to override this (though treat
+# powerpc64le and powerpc64 the same).
+# Note: This is copeid to msun/Makefile
+M=${MACHINE_ARCH:S/powerpc64le/powerpc64/}
+.if exists(${LIBC_SRCTOP}/${M})
+LIBC_ARCH=${M}
.else
LIBC_ARCH=${MACHINE_CPUARCH}
.endif
diff --git a/lib/msun/Makefile b/lib/msun/Makefile
--- a/lib/msun/Makefile
+++ b/lib/msun/Makefile
@@ -97,17 +97,27 @@
s_sinpi.c s_sinpif.c \
s_tanpi.c s_tanpif.c
+# LIBCSRCDIR is defined lazily, so can't be used for exists() below
+LIBC_SRCTOP=${SRCTOP}/lib/libc
# Location of fpmath.h and _fpmath.h
-.if exists(${LIBCSRCDIR}/${MACHINE_ARCH})
-LIBC_ARCH=${MACHINE_ARCH}
+
+# Pick the current architecture directory for libc. In general, this is named
+# MACHINE_CPUARCH, but some ABIs are different enough to require their own libc,
+# so allow a directory named MACHINE_ARCH to override this (though treat
+# powerpc64le and powerpc64 the same).
+# Note: This is copied from libc/Makefile
+M=${MACHINE_ARCH:S/powerpc64le/powerpc64/}
+.if exists(${LIBC_SRCTOP}/${M})
+LIBC_ARCH=${M}
.else
LIBC_ARCH=${MACHINE_CPUARCH}
.endif
-CFLAGS+= -I${.CURDIR}/src -I${LIBCSRCDIR}/include \
- -I${LIBCSRCDIR}/${LIBC_ARCH}
+
+CFLAGS+= -I${.CURDIR}/src -I${LIBC_SRCTOP}/include \
+ -I${LIBC_SRCTOP}/${LIBC_ARCH}
SYM_MAPS+= ${.CURDIR}/Symbol.map
-VERSION_DEF= ${LIBCSRCDIR}/Versions.def
+VERSION_DEF= ${LIBC_SRCTOP}/Versions.def
SYMBOL_MAPS= ${SYM_MAPS}
# C99 long double functions
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 21, 1:58 AM (12 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30053482
Default Alt Text
D41661.id126917.diff (2 KB)
Attached To
Mode
D41661: msun: LIBCSRCDIR is too fragile, use ${SRCTOP}/lib/libc instead
Attached
Detach File
Event Timeline
Log In to Comment