[Glibc-bsd-commits] r3577 - in trunk/kfreebsd-9/debian: . patches

Robert Millan rmh at alioth.debian.org
Tue Jul 12 19:49:36 UTC 2011


Author: rmh
Date: 2011-07-12 19:49:36 +0000 (Tue, 12 Jul 2011)
New Revision: 3577

Added:
   trunk/kfreebsd-9/debian/patches/005_linux_cflags.diff
Modified:
   trunk/kfreebsd-9/debian/changelog
   trunk/kfreebsd-9/debian/patches/series
   trunk/kfreebsd-9/debian/rules
Log:
Replace sed kludge with a small patch.

Modified: trunk/kfreebsd-9/debian/changelog
===================================================================
--- trunk/kfreebsd-9/debian/changelog	2011-07-12 17:06:47 UTC (rev 3576)
+++ trunk/kfreebsd-9/debian/changelog	2011-07-12 19:49:36 UTC (rev 3577)
@@ -1,8 +1,9 @@
 kfreebsd-9 (9.0~svn223870-2) UNRELEASED; urgency=low
 
   * Require freebsd-buildutils (>= 8.2-7).
+  * Replace sed kludge with a small patch.
 
- -- Robert Millan <rmh at debian.org>  Tue, 12 Jul 2011 19:06:34 +0200
+ -- Robert Millan <rmh at debian.org>  Tue, 12 Jul 2011 20:25:32 +0200
 
 kfreebsd-9 (9.0~svn223870-1) experimental; urgency=low
 

Added: trunk/kfreebsd-9/debian/patches/005_linux_cflags.diff
===================================================================
--- trunk/kfreebsd-9/debian/patches/005_linux_cflags.diff	                        (rev 0)
+++ trunk/kfreebsd-9/debian/patches/005_linux_cflags.diff	2011-07-12 19:49:36 UTC (rev 3577)
@@ -0,0 +1,117 @@
+
+sys/conf and sys/sys/cdefs.h bits submitted (as separate patches) to
+freebsd-hackers on 2011-07-12 and 2011-07-04, respectively.
+
+Rest of the patch needs some cleanup before it can be submitted.
+
+--- a/sys/conf/kern.pre.mk
++++ b/sys/conf/kern.pre.mk
+@@ -90,6 +90,14 @@
+ .endif
+ WERROR?= -Werror
+ 
++.if !defined(OPSYS)
++OPSYS!= uname -s
++.endif
++
++.if ${OPSYS} != "FreeBSD"
++CFLAGS+= -Ulinux -U__linux__ -D__FreeBSD__
++.endif
++
+ # XXX LOCORE means "don't declare C stuff" not "for locore.s".
+ ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
+ 
+--- a/sys/conf/kmod.mk
++++ b/sys/conf/kmod.mk
+@@ -96,6 +96,14 @@
+ CFLAGS+=	-D_KERNEL
+ CFLAGS+=	-DKLD_MODULE
+ 
++.if !defined(OPSYS)
++OPSYS!=		uname -s
++.endif
++
++.if ${OPSYS} != "FreeBSD"
++CFLAGS+=	-Ulinux -U__linux__ -D__FreeBSD__
++.endif
++
+ # Don't use any standard or source-relative include directories.
+ CSTD=		c99
+ NOSTDINC=	-nostdinc
+--- a/sys/contrib/ipfilter/netinet/ip_compat.h
++++ b/sys/contrib/ipfilter/netinet/ip_compat.h
+@@ -985,10 +985,10 @@
+ typedef struct mbuf mb_t;
+ # endif /* _KERNEL */
+ 
+-# if __FreeBSD__ < 3
++# if 0
+ #  include <machine/spl.h>
+ # else
+-#  if __FreeBSD__ == 3
++#  if 0
+ #   if defined(IPFILTER_LKM) && !defined(ACTUALLY_LKM_NOT_KERNEL)
+ #    define	ACTUALLY_LKM_NOT_KERNEL
+ #   endif
+--- a/sys/contrib/ipfilter/netinet/ip_proxy.c
++++ b/sys/contrib/ipfilter/netinet/ip_proxy.c
+@@ -63,7 +63,7 @@
+ # include <sys/stream.h>
+ # include <sys/kmem.h>
+ #endif
+-#if __FreeBSD__ > 2
++#if 1
+ # include <sys/queue.h>
+ #endif
+ #include <net/if.h>
+--- a/sys/dev/bktr/bktr_reg.h
++++ b/sys/dev/bktr/bktr_reg.h
+@@ -717,7 +717,7 @@
+ /* ioctl_cmd_t int on old versions, u_long on new versions */
+ /***********************************************************/
+ 
+-#if (__FreeBSD__ == 2)
++#if 0
+ typedef int ioctl_cmd_t;
+ #endif
+ 
+--- a/sys/net/if_spppfr.c
++++ b/sys/net/if_spppfr.c
+@@ -25,7 +25,7 @@
+ 
+ #include <sys/param.h>
+ 
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if defined(__FreeBSD__)
+ #include "opt_inet.h"
+ #include "opt_inet6.h"
+ #include "opt_ipx.h"
+@@ -45,7 +45,7 @@
+ #include <sys/sockio.h>
+ #include <sys/socket.h>
+ #include <sys/syslog.h>
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
++#if defined(__FreeBSD__)
+ #include <sys/random.h>
+ #endif
+ #include <sys/malloc.h>
+@@ -149,7 +149,7 @@
+ 	unsigned short  ptarget2;
+ } __packed;
+ 
+-#if defined(__FreeBSD__) && __FreeBSD__ >= 3 && __FreeBSD_version < 501113
++#if defined(__FreeBSD__) && __FreeBSD_version < 501113
+ #define	SPP_FMT		"%s%d: "
+ #define	SPP_ARGS(ifp)	(ifp)->if_name, (ifp)->if_unit
+ #else
+--- a/sys/sys/cdefs.h
++++ b/sys/sys/cdefs.h
+@@ -349,7 +349,7 @@
+ #endif
+ 
+ /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */
+-#if __FreeBSD_cc_version >= 300001 && defined(__GNUC__) && !defined(__INTEL_COMPILER)
++#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && defined(__GNUC__) && !defined(__INTEL_COMPILER)
+ #define	__printf0like(fmtarg, firstvararg) \
+ 	    __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
+ #else

Modified: trunk/kfreebsd-9/debian/patches/series
===================================================================
--- trunk/kfreebsd-9/debian/patches/series	2011-07-12 17:06:47 UTC (rev 3576)
+++ trunk/kfreebsd-9/debian/patches/series	2011-07-12 19:49:36 UTC (rev 3577)
@@ -2,6 +2,7 @@
 002_maxpathlen.diff
 003_glibc_dev_aicasm.diff
 004_xargs.diff
+005_linux_cflags.diff
 007_clone_signals.diff
 #009_disable_duped_modules.diff
 013_ip_packed.diff

Modified: trunk/kfreebsd-9/debian/rules
===================================================================
--- trunk/kfreebsd-9/debian/rules	2011-07-12 17:06:47 UTC (rev 3576)
+++ trunk/kfreebsd-9/debian/rules	2011-07-12 19:49:36 UTC (rev 3577)
@@ -84,30 +84,6 @@
 	mkdir $(CURDIR)/src
 	cp -af $(CURDIR)/sys $(CURDIR)/usr.sbin $(CURDIR)/src
 
-	set -e ; find src/sys -type f | (while read i ; do \
-		sed -i $$i \
-		-e 's/defined\s*(\s*__FreeBSD__\s*)/1/g' \
-		-e 's/#\s*ifdef\s*__FreeBSD__/#if 1/g' \
-		-e 's/#\s*ifndef\s*__FreeBSD__/#if 0/g' \
-		-e 's/__FreeBSD__/$(major)/g' \
-		\
-		-e 's/defined\s*(\s*__FreeBSD_cc_version\s*)/1/g' \
-		-e 's/#\s*ifdef\s*__FreeBSD_cc_version/#if 1/g' \
-		-e 's/#\s*ifndef\s*__FreeBSD_cc_version/#if 0/g' \
-		-e 's/__FreeBSD_cc_version/800001/g' \
-		\
-		-e 's/defined\s*(\s*\(__linux__\|linux\)\s*)/0/g' \
-		-e 's/#\s*ifdef\s*\(__linux__\|linux\)/#if 0/g' \
-		-e 's/#\s*ifndef\s*\(__linux__\|linux\)/#if 1/g' \
-		\
-		-e 's,#\s*include\s*<sys/device.h>,,g' \
-		-e 's,#\s*include\s*<dev/rndvar.h>,,g' \
-		-e 's,#\s*include\s*<sys/pool.h>,,g' \
-		-e 's,#\s*include\s*<netinet/ip_ipsp.h>,,g' \
-		-e 's,#\s*include\s*\(<\|"\)bpfilter.h\(>\|"\),,g' \
-		-e 's,#\s*include\s*\(<\|"\)pflog.h\(>\|"\),,g' \
-	; done)
-
 	install debian/gen-ld-u-options src/usr.sbin/config
 
 	touch src-stamp




More information about the Glibc-bsd-commits mailing list