Bug#754799: kfreebsd-10: Please update the clang dependency from 3.3 to 3.4

2014-07-15 Thread Steven Chamberlain
On 14/07/14 15:08, Steven Chamberlain wrote:
 [...] 10.0 is very likely to work with clang-3.4, and 10-STABLE
 already been heavily tested with it, perhaps only needing some small
 changes backported to 10.0, if anything.

Well, I tried and it was much more work than I expected.  FreeBSD likes
to compile with -Werror but clang-3.4 introduced new warnings that
trigger in dozens of places - dead code that's been there for years.

I eventually gave up on trying to backport all the cleanup commits from
10-STABLE, and decided it was easier and probably safe to just ignore
the new warnings with -Wno-error flags instead.

I saw nothing to suggest the new optimisations in clang-3.4 at -O2 level
were a problem.

Attached patches allow a 10.0 kernel to build with clang-3.4 (after
installing it, and adjusting debian/control).  Maybe we should put
something like this in experimental for now - in that case perhaps with
DEBUG options turned back on - it would be a good baseline for when we
have 10.1 BETA builds.

Depending how soon the clang-3.3 removal ought to happen, after some
testing in experimental, we could upload a 10.0 built with clang-3.4 and
these patches (but no DEBUG options) to sid.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org
Description:
 Pick SVN r259991 from 10-STABLE to fix a -Wnon-literal-null-conversion

--- kfreebsd-10-10.0.orig/sys/vm/vm_pageout.c
+++ kfreebsd-10-10.0/sys/vm/vm_pageout.c
@@ -1693,7 +1693,7 @@
 		}
 	}
 #endif
-	vm_pageout_worker((uintptr_t)0);
+	vm_pageout_worker((void *)(uintptr_t)0);
 }
 
 /*
Description:
 Use -Wno-error-unused-const-variable because Clang 3.4 revealed many of
 these, too many to be worth backporting, and some code compiled only by
 Debian (e.g. IPFILTER) has not been cleaned up yet.
 .
 Use -Wno-error-unused-function because Clang 3.4 revealed many of these
 and not all have been cleaned up yet upstream.

--- kfreebsd-10-10.0.orig/sys/conf/kern.mk
+++ kfreebsd-10-10.0/sys/conf/kern.mk
@@ -29,7 +29,8 @@
 # enough to error out the whole kernel build.  Display them anyway, so there is
 # some incentive to fix them eventually.
 CWARNEXTRA?=	-Wno-error-tautological-compare -Wno-error-empty-body \
-		-Wno-error-parentheses-equality ${NO_WFORMAT}
+		-Wno-error-parentheses-equality -Wno-error-unused-function \
+		-Wno-error-unused-const-variable ${NO_WFORMAT}
 .endif
 
 # External compilers may not support our format extensions.  Allow them
Description:
 Pick SVN r260495 from 10-STABLE to avoid __wchar_t typedef conflict
 if -fms-extensions is used together with Clang 3.4
Author: d...@freebsd.org

--- kfreebsd-10-10.0.orig/sys/conf/kern.pre.mk
+++ kfreebsd-10-10.0/sys/conf/kern.pre.mk
@@ -99,6 +99,8 @@
 
 .if ${COMPILER_TYPE} == clang
 CLANG_NO_IAS= -no-integrated-as
+.else
+GCC_MS_EXTENSIONS= -fms-extensions
 .endif
 
 .if defined(PROFLEVEL)  ${PROFLEVEL} = 1
@@ -157,7 +159,7 @@
 # Infiniband C flags.  Correct include paths and omit errors that linux
 # does not honor.
 OFEDINCLUDES=	-I$S/ofed/include/
-OFEDNOERR=	-Wno-cast-qual -Wno-pointer-arith -fms-extensions
+OFEDNOERR=	-Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}
 OFEDCFLAGS=	${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR}
 OFED_C_NOIMP=	${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF}
 OFED_C=		${OFED_C_NOIMP} ${.IMPSRC}
--- kfreebsd-10-10.0.orig/sys/modules/drm2/radeonkms/Makefile
+++ kfreebsd-10-10.0/sys/modules/drm2/radeonkms/Makefile
@@ -103,7 +103,6 @@
 	iicbus_if.h			\
 	pci_if.h
 
-CFLAGS  += -I${.CURDIR}/../../../dev/drm2/radeon			\
-	   -fms-extensions
+CFLAGS  += -I${.CURDIR}/../../../dev/drm2/radeon ${GCC_MS_EXTENSIONS}
 
 .include bsd.kmod.mk
--- kfreebsd-10-10.0.orig/sys/modules/ibcore/Makefile
+++ kfreebsd-10-10.0/sys/modules/ibcore/Makefile
@@ -20,4 +20,4 @@
 
 .include bsd.kmod.mk
 
-CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
+CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}
--- kfreebsd-10-10.0.orig/sys/modules/ipoib/Makefile
+++ kfreebsd-10-10.0/sys/modules/ipoib/Makefile
@@ -28,4 +28,4 @@
 
 .include bsd.kmod.mk
 
-CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
+CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}
--- kfreebsd-10-10.0.orig/sys/modules/mlx4/Makefile
+++ kfreebsd-10-10.0/sys/modules/mlx4/Makefile
@@ -26,4 +26,4 @@
 
 .include bsd.kmod.mk
 
-CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
+CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}
--- kfreebsd-10-10.0.orig/sys/modules/mlx4ib/Makefile
+++ kfreebsd-10-10.0/sys/modules/mlx4ib/Makefile
@@ -31,4 +31,4 @@
 
 .include bsd.kmod.mk
 
-CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
+CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}
--- kfreebsd-10-10.0.orig/sys/modules/mlxen/Makefile
+++ kfreebsd-10-10.0/sys/modules/mlxen/Makefile
@@ -25,4 +25,4 @@
 
 .include bsd.kmod.mk
 
-CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
+CFLAGS+= -Wno-cast-qual -Wno-pointer-arith 

Bug#754799: kfreebsd-10: Please update the clang dependency from 3.3 to 3.4

2014-07-15 Thread Sylvestre Ledru
On 15/07/2014 13:37, Steven Chamberlain wrote:
 On 14/07/14 15:08, Steven Chamberlain wrote:
 [...] 10.0 is very likely to work with clang-3.4, and 10-STABLE
 already been heavily tested with it, perhaps only needing some small
 changes backported to 10.0, if anything.
[...]

 Depending how soon the clang-3.3 removal ought to happen, after some
 testing in experimental, we could upload a 10.0 built with clang-3.4 and
 these patches (but no DEBUG options) to sid.
I would like to see the removal done before Jessie... So, that should
give you some time.

Cheers,
Sylvestre



signature.asc
Description: OpenPGP digital signature


Bug#754799: kfreebsd-10: Please update the clang dependency from 3.3 to 3.4

2014-07-15 Thread Steven Chamberlain
Control: tags -1 + patch confirmed

On 15/07/14 12:39, Sylvestre Ledru wrote:
 I would like to see the removal done before Jessie... So, that should
 give you some time.

OK, thanks.  We'll either have kfreebsd 10.1 with clang-3.4 enter sid in
October, or perhaps a kfreebsd-10.0 built with clang-3.4 using my
patches before then.  Either way, we won't need clang-3.3 by the time of
the jessie freeze.

transitions are supposed to be done before 5th September, but I don't
suppose that's what this is;  I expect it will be a simple ftpmaster
removal once we are no longer using it.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org



signature.asc
Description: OpenPGP digital signature


Processed: Re: Bug#754799: kfreebsd-10: Please update the clang dependency from 3.3 to 3.4

2014-07-15 Thread Debian Bug Tracking System
Processing control commands:

 tags -1 + patch confirmed
Bug #754799 [src:kfreebsd-10] kfreebsd-10: Please update the clang dependency 
from 3.3 to 3.4
Added tag(s) confirmed and patch.

-- 
754799: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754799
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/handler.s.b754799.140542536516749.transcr...@bugs.debian.org



Bug#754799: kfreebsd-10: Please update the clang dependency from 3.3 to 3.4

2014-07-14 Thread Sylvestre Ledru
Source: kfreebsd-10
Severity: important

Hello,

Could you update the clang build dep from 3.3 to 3.4?
It prevents the removal of llvm clang 3.3.

Thanks,
Sylvestre

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (900, 'testing'), (600, 'unstable'), (500, 'stable-updates'), 
(500, 'stable'), (300, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20140714121126.26480.82203.report...@leyte.mozilla.com



Bug#754799: kfreebsd-10: Please update the clang dependency from 3.3 to 3.4

2014-07-14 Thread Cyril Brulebois
Sylvestre Ledru sylves...@debian.org (2014-07-14):
 Source: kfreebsd-10
 Severity: important
 
 Hello,
 
 Could you update the clang build dep from 3.3 to 3.4?
 It prevents the removal of llvm clang 3.3.

The important part is not 3.3 going away; it's about making sure stuff
still works fine with 3.4 *first*. Whenever old packages go away really
shouldn't be a goal on its own…

Mraw,
KiBi.


signature.asc
Description: Digital signature


Bug#754799: kfreebsd-10: Please update the clang dependency from 3.3 to 3.4

2014-07-14 Thread Steven Chamberlain
On 14/07/14 13:58, Cyril Brulebois wrote:
 Sylvestre Ledru sylves...@debian.org (2014-07-14):
 Could you update the clang build dep from 3.3 to 3.4?
 It prevents the removal of llvm clang 3.3.
 
 The important part is not 3.3 going away; it's about making sure stuff
 still works fine with 3.4 *first*. Whenever old packages go away really
 shouldn't be a goal on its own…

It's okay, I think we can do this, or at least I am in favour of trying.
 IMHO you could raise the severity of this bug to serious.

(This will be much, much easier than in the wheezy cycle where older GCC
versions went away with *hundreds* of reverse deps still using it, and
kfreebsd never having been tested with anything newer).

We like to use the same version of Clang that upstream used to build the
kernels, to be safe.  So for now, kfreebsd-10 uses clang-3.3 which is
what FreeBSD 10.0 was released with.  kfreebsd-11, and the 10-STABLE
branch which will become 10.1, have both jumped to clang-3.4 already.

That suggests 10.0 is very likely to work with clang-3.4, and 10-STABLE
already been heavily tested with it, perhaps only needing some small
changes backported to 10.0, if anything.

But anyway, some of us would prefer to actually release jessie with
10.1, in which case that would definitely be built with clang-3.4.  See
http://alpine.lnx.2.00.1407130920110.13...@contest.felk.cvut.cz

The timing of that would be very tight though, so we're likely to have
10.0 in either jessie or sid up until about October.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org



signature.asc
Description: OpenPGP digital signature