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

Robert Millan rmh at alioth.debian.org
Wed Jul 13 19:38:42 UTC 2011


Author: rmh
Date: 2011-07-13 19:38:42 +0000 (Wed, 13 Jul 2011)
New Revision: 3586

Added:
   trunk/kfreebsd-9/debian/patches/200_xen.diff
Modified:
   trunk/kfreebsd-9/debian/changelog
   trunk/kfreebsd-9/debian/patches/005_linux_cflags.diff
   trunk/kfreebsd-9/debian/patches/020_linker.diff
   trunk/kfreebsd-9/debian/patches/950_no_stack_protector.diff
   trunk/kfreebsd-9/debian/patches/series
   trunk/kfreebsd-9/debian/rules
Log:
Revert part of 005_linux_cflags.diff which isn't going to be accepted by upstream, and caused build breakage on GNU/Linux. Bring back needed parts of the sed kludge.

Modified: trunk/kfreebsd-9/debian/changelog
===================================================================
--- trunk/kfreebsd-9/debian/changelog	2011-07-13 17:38:32 UTC (rev 3585)
+++ trunk/kfreebsd-9/debian/changelog	2011-07-13 19:38:42 UTC (rev 3586)
@@ -1,3 +1,11 @@
+kfreebsd-9 (9.0~svn223966-2) UNRELEASED; urgency=low
+
+  * Revert part of 005_linux_cflags.diff which isn't going to be
+    accepted by upstream, and caused build breakage on GNU/Linux. Bring
+    back needed parts of the sed kludge.
+
+ -- Robert Millan <rmh at debian.org>  Wed, 13 Jul 2011 21:35:23 +0200
+
 kfreebsd-9 (9.0~svn223966-1) experimental; urgency=low
 
   * New upstream snapshot.

Modified: trunk/kfreebsd-9/debian/patches/005_linux_cflags.diff
===================================================================
--- trunk/kfreebsd-9/debian/patches/005_linux_cflags.diff	2011-07-13 17:38:32 UTC (rev 3585)
+++ trunk/kfreebsd-9/debian/patches/005_linux_cflags.diff	2011-07-13 19:38:42 UTC (rev 3586)
@@ -1,109 +1,6 @@
 
-sys/conf and sys/sys/cdefs.h bits submitted (as separate patches) to
-freebsd-hackers on 2011-07-12 and 2011-07-04, respectively.
+Submitted to freebsd-hackers on 2011-07-04
 
-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 @@

Modified: trunk/kfreebsd-9/debian/patches/020_linker.diff
===================================================================
--- trunk/kfreebsd-9/debian/patches/020_linker.diff	2011-07-13 17:38:32 UTC (rev 3585)
+++ trunk/kfreebsd-9/debian/patches/020_linker.diff	2011-07-13 19:38:42 UTC (rev 3586)
@@ -19,7 +19,7 @@
  	${OBJCOPY} --strip-debug ${.TARGET}
 --- a/sys/conf/kmod.mk
 +++ b/sys/conf/kmod.mk
-@@ -197,7 +197,9 @@
+@@ -189,7 +189,9 @@
  
  .if ${__KLD_SHARED} == yes
  ${FULLPROG}: ${KMOD}.kld

Copied: trunk/kfreebsd-9/debian/patches/200_xen.diff (from rev 3578, trunk/kfreebsd-9/debian/patches/200_xen.diff)
===================================================================
--- trunk/kfreebsd-9/debian/patches/200_xen.diff	                        (rev 0)
+++ trunk/kfreebsd-9/debian/patches/200_xen.diff	2011-07-13 19:38:42 UTC (rev 3586)
@@ -0,0 +1,22 @@
+--- a/sys/dev/xen/evtchn/evtchn_dev.c
++++ b/sys/dev/xen/evtchn/evtchn_dev.c
+@@ -41,7 +41,7 @@
+ } evtchn_softc_t;
+ 
+ 
+-#ifdef linuxcrap
++#if 0
+ /* NB. This must be shared amongst drivers if more things go in /dev/xen */
+ static devfs_handle_t xen_dev_dir;
+ #endif
+--- a/sys/xen/evtchn/evtchn_dev.c
++++ b/sys/xen/evtchn/evtchn_dev.c
+@@ -39,7 +39,7 @@
+ } evtchn_softc_t;
+ 
+ 
+-#ifdef linuxcrap
++#if 0
+ /* NB. This must be shared amongst drivers if more things go in /dev/xen */
+ static devfs_handle_t xen_dev_dir;
+ #endif

Modified: trunk/kfreebsd-9/debian/patches/950_no_stack_protector.diff
===================================================================
--- trunk/kfreebsd-9/debian/patches/950_no_stack_protector.diff	2011-07-13 17:38:32 UTC (rev 3585)
+++ trunk/kfreebsd-9/debian/patches/950_no_stack_protector.diff	2011-07-13 19:38:42 UTC (rev 3586)
@@ -19,7 +19,7 @@
  CFLAGS+=	-fstack-protector
 --- a/sys/conf/kmod.mk
 +++ b/sys/conf/kmod.mk
-@@ -149,6 +149,9 @@
+@@ -141,6 +141,9 @@
  CTFFLAGS+=	-g
  .endif
  

Modified: trunk/kfreebsd-9/debian/patches/series
===================================================================
--- trunk/kfreebsd-9/debian/patches/series	2011-07-13 17:38:32 UTC (rev 3585)
+++ trunk/kfreebsd-9/debian/patches/series	2011-07-13 19:38:42 UTC (rev 3586)
@@ -12,6 +12,7 @@
 108_teken_utf8_table.diff
 109_linprocfs_non_x86.diff
 110_disable_trampoline_flavour.diff
+200_xen.diff
 902_version.diff
 903_disable_non-free_drivers.diff 
 904_dev_full.diff

Modified: trunk/kfreebsd-9/debian/rules
===================================================================
--- trunk/kfreebsd-9/debian/rules	2011-07-13 17:38:32 UTC (rev 3585)
+++ trunk/kfreebsd-9/debian/rules	2011-07-13 19:38:42 UTC (rev 3586)
@@ -84,6 +84,18 @@
 	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*\(__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' \
+	; done)
+
 	install debian/gen-ld-u-options src/usr.sbin/config
 
 	touch src-stamp




More information about the Glibc-bsd-commits mailing list