Date: Sat, 13 Nov 2010 12:27:32 -0800 From: Garrett Cooper <gcooper@FreeBSD.org> To: Warner Losh <imp@freebsd.org> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: [PATCH] Unbreak buildworld post-r215254 Message-ID: <AANLkTi=070ry%2BibdfoKdp-V%2Bt=i7g0BD9BbNLNm4fPpz@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Looks like buildworld is broken when TARGET/TARGET_ARCH isn't specified:
$ make buildworld
"/usr/src/Makefile.inc1", line 127: Malformed conditional
(${TARGET_ARCH} == "mips" && ${TARGET} == "mips")
"/usr/src/Makefile.inc1", line 128: warning: "TARGET_ARCH of mips is
deprecated in favor of mipsel or mipseb"
"/usr/src/Makefile.inc1", line 134: if-less endif
"/usr/src/Makefile.inc1", line 152: Unknown target mipsel:amd64.
*** Error code 1
This change fixed it:
$ svn diff Makefile.inc1
Index: Makefile.inc1
===================================================================
--- Makefile.inc1 (revision 215254)
+++ Makefile.inc1 (working copy)
@@ -124,7 +124,8 @@
TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm}
.endif
# Legacy names, for a transition period mips:mips -> mipsel:mips
-.if ${TARGET_ARCH} == "mips" && ${TARGET} == "mips"
+.if defined(TARGET_ARCH) && defined(TARGET) && ${TARGET_ARCH} == "mips" && \
+ ${TARGET} == "mips"
.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb"
.if defined(TARGET_BIG_ENDIAN)
TARGET_ARCH=mipseb
@@ -133,7 +134,8 @@
.endif
.endif
# arm with TARGET_BIG_ENDIAN -> armeb
-.if ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN)
+.if defined(TARGET_ARCH) && ${TARGET_ARCH} == "arm" && \
+ defined(TARGET_BIG_ENDIAN)
.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. use armeb"
TARGET_ARCH=armeb
.endif
Thanks!
-Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=070ry%2BibdfoKdp-V%2Bt=i7g0BD9BbNLNm4fPpz>
