[Glibc-bsd-commits] r4148 - in trunk/kfreebsd-10/debian: . patches

Robert Millan rmh at alioth.debian.org
Sat Mar 17 09:09:06 UTC 2012


Author: rmh
Date: 2012-03-17 09:09:05 +0000 (Sat, 17 Mar 2012)
New Revision: 4148

Modified:
   trunk/kfreebsd-10/debian/changelog
   trunk/kfreebsd-10/debian/control.in
   trunk/kfreebsd-10/debian/patches/001_misc.diff
   trunk/kfreebsd-10/debian/rules
Log:
Misc adjustments to make it possible to build with Clang (if enabled in debian/rules).

Modified: trunk/kfreebsd-10/debian/changelog
===================================================================
--- trunk/kfreebsd-10/debian/changelog	2012-03-17 00:16:32 UTC (rev 4147)
+++ trunk/kfreebsd-10/debian/changelog	2012-03-17 09:09:05 UTC (rev 4148)
@@ -2,8 +2,10 @@
 
   * Set -DWITHOUT_KERNEL_SYMBOLS MK knob to make lintian happy.
   * Replace 950_no_stack_protector.diff with -DWITHOUT_SSP build knob.
+  * Misc adjustments to make it possible to build with Clang (if enabled
+    in debian/rules).
 
- -- Robert Millan <rmh at debian.org>  Sat, 17 Mar 2012 01:16:08 +0100
+ -- Robert Millan <rmh at debian.org>  Sat, 17 Mar 2012 10:08:57 +0100
 
 kfreebsd-10 (10.0~svn232747-1) experimental; urgency=low
 

Modified: trunk/kfreebsd-10/debian/control.in
===================================================================
--- trunk/kfreebsd-10/debian/control.in	2012-03-17 00:16:32 UTC (rev 4147)
+++ trunk/kfreebsd-10/debian/control.in	2012-03-17 09:09:05 UTC (rev 4148)
@@ -7,9 +7,9 @@
 Vcs-Svn: svn://svn.debian.org/glibc-bsd/trunk/kfreebsd-@major@/
 Build-Depends: debhelper (>= 5.0.0), bzip2, sharutils, flex-old | flex,
  freebsd-buildutils (>= 9.0-9~),
- gcc- at gcc_version@, libdb-dev,
+ @kernel_cc@, libdb-dev,
  libbsd-dev (>= 0.3.0), pkg-config,
- libsbuf-dev, libsbuf-dev (>= 8.2-2) | kfreebsd-kernel-headers (<< 0.56),
+ libsbuf-dev (>= 9.0+ds1-2),
  kernel-wedge (>= 2.79) [kfreebsd-any],
 Standards-Version: 3.9.2
 

Modified: trunk/kfreebsd-10/debian/patches/001_misc.diff
===================================================================
--- trunk/kfreebsd-10/debian/patches/001_misc.diff	2012-03-17 00:16:32 UTC (rev 4147)
+++ trunk/kfreebsd-10/debian/patches/001_misc.diff	2012-03-17 09:09:05 UTC (rev 4148)
@@ -3,12 +3,10 @@
 
 --- a/sys/conf/kern.mk
 +++ b/sys/conf/kern.mk
-@@ -1,11 +1,20 @@
+@@ -1,11 +1,18 @@
  # $FreeBSD$
  
-+.if ${CC:T:Mclang} != "clang"
 +FREEBSD_CC!=   ${CC} -dM -E -</dev/null | awk '/__FreeBSD_cc_version/ { print $$3 }' || true
-+.endif
 +
  #
  # Warning flags for compiling the kernel and components of the kernel:
@@ -25,7 +23,7 @@
  		-Wmissing-include-dirs -fdiagnostics-show-option \
  		${CWARNEXTRA}
  #
-@@ -51,7 +60,7 @@
+@@ -51,7 +58,7 @@
  #
  .if ${MACHINE_CPUARCH} == "i386"
  .if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"

Modified: trunk/kfreebsd-10/debian/rules
===================================================================
--- trunk/kfreebsd-10/debian/rules	2012-03-17 00:16:32 UTC (rev 4147)
+++ trunk/kfreebsd-10/debian/rules	2012-03-17 09:09:05 UTC (rev 4148)
@@ -22,7 +22,7 @@
 configfile	:= DEBCUSTOM
 abiname		:= 0
 ld_target	:= $(shell ld --help | sed -ne "s/[^ :]*: supported targets: \([^ ]*\) .*/\1/p")
-gcc_version	:= 4.6
+kernel_cc	:= gcc-4.6
 
 ifeq ($(cpu), mipsel)
 kfreebsd_cpu	:= mips
@@ -43,7 +43,7 @@
 FLAVOR_DIR	:= flavor-$(version)-$(abiname)
 ORIG_DIR	:= kfreebsd-$(major)-$(tar_version)
 ORIG_TAR	:= kfreebsd-$(major)_$(tar_version).orig.tar.gz
-MAKE		:= make MACHINE_ARCH=$(kfreebsd_cpu) CC=gcc-$(gcc_version) WERROR= -DWITHOUT_SOURCELESS
+MAKE		:= make MACHINE_ARCH=$(kfreebsd_cpu) WERROR= -DWITHOUT_SOURCELESS
 PATH		:= $(CURDIR)/config:/usr/lib/freebsd:$(PATH)
 
 # Disable install of *.ko.symbols files (their presence would trigger an
@@ -80,7 +80,7 @@
 		fi ; \
 		echo ; \
 	done
-	sed -e "s/@major@/$(major)/g" -e "s/@version@/$(version)/g" -e "s/@abiname@/$(abiname)/g" -e "s/@flavor@/$$flavor/g" -e "s/@gcc_version@/$(gcc_version)/g" \
+	sed -e "s/@major@/$(major)/g" -e "s/@version@/$(version)/g" -e "s/@abiname@/$(abiname)/g" -e "s/@flavor@/$$flavor/g" -e "s/@kernel_cc@/$(kernel_cc)/g" \
 		$(CURDIR)/debian/control.in > $(CURDIR)/debian/control
 	echo >> $(CURDIR)/debian/control
 	for arch in `ls $(CURDIR)/debian/arch/` ; do \
@@ -145,7 +145,7 @@
 config-stamp: src
 	rm -rf config
 	cp -af src/usr.sbin/config config
-	CFLAGS="-D__va_list=__builtin_va_list $(shell pkg-config --cflags libbsd-overlay) -lbsd" $(MAKE) -C config
+	CFLAGS="$(shell pkg-config --cflags libbsd-overlay) -lbsd" $(MAKE) -C config
 	touch $@
 
 build-arch: $(foreach flavor,$(flavours),build-flavor-$(flavor)-stamp)
@@ -179,8 +179,8 @@
 		&& config $(configfile)
 
 	# Build it
-	$(MAKE) -C $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/compile/$(configfile)/ depend
-	$(MAKE) -C $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/compile/$(configfile)/
+	$(MAKE) CC=$(kernel_cc) -C $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/compile/$(configfile)/ depend
+	$(MAKE) CC=$(kernel_cc) -C $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/compile/$(configfile)/
 
 	touch build-flavor-$*-stamp
 
@@ -235,7 +235,7 @@
 		$(IMAGE_PACKAGE)-$*/boot/config-$(version)-$(abiname)-$*
 
 	# now install the kernel
-	$(MAKE) -C $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/compile/$(configfile) DESTDIR=$(IMAGE_PACKAGE)-$* install
+	$(MAKE) CC=$(kernel_cc) -C $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/compile/$(configfile) DESTDIR=$(IMAGE_PACKAGE)-$* install
 	mv $(IMAGE_PACKAGE)-$*/lib/modules/$(version)-$(abiname)-$*/kernel $(IMAGE_PACKAGE)-$*/boot/kfreebsd-$(version)-$(abiname)-$*
 	chmod 644 $(IMAGE_PACKAGE)-$*/boot/kfreebsd-$(version)-$(abiname)-$*
 	gzip -9 $(IMAGE_PACKAGE)-$*/boot/kfreebsd-$(version)-$(abiname)-$*




More information about the Glibc-bsd-commits mailing list