PERFORCE change 222356 for review

Brooks Davis brooks at FreeBSD.org
Mon Feb 25 19:02:25 UTC 2013


http://p4web.freebsd.org/@@222356?ac=10

Change 222356 by brooks at brooks_zenith on 2013/02/25 19:02:10

	Allow an external cross compiler to be used by setting XCC, XCXX
	and XCPP.  Currently 32-bit compatibility libs require the
	normal cross compiler and thus building it is not supressed.  You
	must also specify -DWITHOUT_RESCUE because I've not yet figured
	out a way to pass --sysroot through to the crunchgen create
	makefiles.

Affected files ...

.. //depot/projects/ctsrd/tesla/src/Makefile.inc1#2 edit
.. //depot/projects/ctsrd/tesla/src/share/mk/bsd.dep.mk#2 edit
.. //depot/projects/ctsrd/tesla/src/share/mk/bsd.own.mk#2 edit
.. //depot/projects/ctsrd/tesla/src/sys/boot/i386/boot2/Makefile#2 edit
.. //depot/projects/ctsrd/tesla/src/sys/boot/i386/gptboot/Makefile#2 edit
.. //depot/projects/ctsrd/tesla/src/sys/boot/i386/gptzfsboot/Makefile#2 edit
.. //depot/projects/ctsrd/tesla/src/sys/boot/i386/zfsboot/Makefile#2 edit

Differences ...

==== //depot/projects/ctsrd/tesla/src/Makefile.inc1#2 (text+ko) ====

@@ -280,16 +280,23 @@
 .if ${MK_CDDL} == "no"
 WMAKEENV+=	NO_CTF=1
 .endif
-.if ${CC:T:Mgcc} == "gcc"
+XCC?=	${CC}
+XCXX?=	${CXX}
+XCPP?=	${CPP}
+.if ${XCC:T:Mgcc} == "gcc"
 WMAKE_COMPILER_TYPE=	gcc
-.elif ${CC:T:Mclang} == "clang"
+.elif ${XCC:T:Mclang} == "clang"
 WMAKE_COMPILER_TYPE=	clang
 .elif ${MK_CLANG_IS_CC} == "no"
 WMAKE_COMPILER_TYPE=	gcc
 .else
 WMAKE_COMPILER_TYPE=	clang
 .endif
-WMAKEENV+=	COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
+.if ${XCC:M/*}
+WMAKEENV+=	SYSROOT=${WORLDTMP}
+.endif
+WMAKEENV+=	CC=${XCC} CXX=${XCXX} CPP=${XCPP} \
+		COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
 WMAKE=		${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP}
 
 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"

==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.dep.mk#2 (text+ko) ====

@@ -129,9 +129,10 @@
 # Different types of sources are compiled with slightly different flags.
 # Split up the sources, and filter out headers and non-applicable flags.
 MKDEP_CFLAGS=	${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \
-		${CFLAGS:M-ansi}
+		${CFLAGS:M-ansi} ${CFLAGS:M--sysroot*}
 MKDEP_CXXFLAGS=	${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} \
-		${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*}
+		${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*} \
+		${CXXFLAGS:M--sysroot*}
 
 DPSRCS+= ${SRCS}
 ${DEPENDFILE}: ${DPSRCS}

==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.own.mk#2 (text+ko) ====

@@ -646,4 +646,9 @@
 
 .endif # !_WITHOUT_SRCCONF
 
+.if defined(SYSROOT)
+CFLAGS+=	--sysroot=${SYSROOT}
+LDFLAGS+=	--sysroot=${SYSROOT}
+.endif
+
 .endif	# !target(__<bsd.own.mk>__)

==== //depot/projects/ctsrd/tesla/src/sys/boot/i386/boot2/Makefile#2 (text+ko) ====

@@ -42,6 +42,10 @@
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
 	-Winline --param max-inline-insns-single=100 \
 	${CLANG_OPT_SMALL}
+.if defined(SYSROOT)
+CFLAGS+=	--sysroot=${SYSROOT}
+.endif
+
 
 LDFLAGS=-static -N --gc-sections
 

==== //depot/projects/ctsrd/tesla/src/sys/boot/i386/gptboot/Makefile#2 (text+ko) ====

@@ -35,6 +35,10 @@
 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
 	-Winline --param max-inline-insns-single=100
+.if defined(SYSROOT)
+CFLAGS+=	--sysroot=${SYSROOT}
+.endif
+
 
 LDFLAGS=-static -N --gc-sections
 

==== //depot/projects/ctsrd/tesla/src/sys/boot/i386/gptzfsboot/Makefile#2 (text+ko) ====

@@ -33,6 +33,10 @@
 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
 	-Winline --param max-inline-insns-single=100
+.if defined(SYSROOT)
+CFLAGS+=	--sysroot=${SYSROOT}
+.endif
+
 
 LDFLAGS=-static -N --gc-sections
 

==== //depot/projects/ctsrd/tesla/src/sys/boot/i386/zfsboot/Makefile#2 (text+ko) ====

@@ -30,6 +30,10 @@
 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
 	-Winline --param max-inline-insns-single=100
+.if defined(SYSROOT)
+CFLAGS+=	--sysroot=${SYSROOT}
+.endif
+
 
 LDFLAGS=-static -N --gc-sections
 


More information about the p4-projects mailing list