Package: sparse / 0.6.0-3

Metadata

Package Version Patches format
sparse 0.6.0-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
machine.h Fix MACH_NATIVE on m68k.patch | (download)

machine.h | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch] machine.h: fix mach_native on m68k

This fixes a failure to compile on m68k as MACH_68K is undefined.

Fixes: ce50c885b8b0 ("add detection of native platform")
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Makefile default to LD CC.patch | (download)

Makefile | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch] makefile: default to ld = cc

Usually the compiler is used as linker. Assuming that if someone wants
to change the compiler the linker should be changed, too, simplify that
use case by using "$(CC)" as linker instead of the hard coded "gcc".
This also matches the behaviour of make when using the built-in rules
of GNU Make which include:

	LINK.o = $(CC) $(LDFLAGS) $(TARGET_ARCH)
	%: %.o
		$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
testsuite remove unneeded m64 from command line.patch | (download)

validation/call-variadic.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch] testsuite: remove unneeded -m64 from command-line

The test was called with the flag '-m64' but doesn't need it.
So, remove it.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tested-by: Uwe Kleine-König <uwe@kleine-koenig.org>
lib.c move predefines out of handle_arch_m64_finaliz.patch | (download)

lib.c | 36 24 + 12 - 0 !
1 file changed, 24 insertions(+), 12 deletions(-)

 [patch] lib.c: move predefines out of handle_arch_m64_finalize()

In handle_arch_m64_finalize(), some types (like size_t_ctype)
are set to support the flag '-m64' and native 64-bit archs.
But some predefines are also issued.

As a preparatory step to fix a bug related to a inconstency
between this function and init_target(), move the predefines
to predefined_macros().

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tested-by: Uwe Kleine-König <uwe@kleine-koenig.org>
lib.c move handle_arch_m64_finalize to init_target.patch | (download)

lib.c | 42 1 + 41 - 0 !
target.c | 35 35 + 0 - 0 !
2 files changed, 36 insertions(+), 41 deletions(-)

 [patch] lib.c: move handle_arch_m64_finalize() to init_target()

It must be done after init_target because of some archs (PPC32,
mips32, ...) have int32_t set to long. These 32-bit ints would
then become 64-bit.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tested-by: Uwe Kleine-König <uwe@kleine-koenig.org>
target.c ignore m64 on archs where int32_t is a long.patch | (download)

target.c | 1 1 + 0 - 0 !
validation/call-inlined.c | 1 1 + 0 - 0 !
validation/cast-kinds-check.c | 1 1 + 0 - 0 !
validation/cast-weirds.c | 1 1 + 0 - 0 !
validation/compound-assign-type.c | 2 2 + 0 - 0 !
validation/constant-suffix-64.c | 1 1 + 0 - 0 !
validation/enum-bounds.c | 1 1 + 0 - 0 !
validation/enum-sign-gcc.c | 1 1 + 0 - 0 !
validation/expand/builtin-expect.c | 1 1 + 0 - 0 !
validation/linear/bitfield-size.c | 1 1 + 0 - 0 !
validation/linear/bool-cast-lp64.c | 1 1 + 0 - 0 !
validation/linear/bool-cast.c | 1 1 + 0 - 0 !
validation/linear/call-complex-pointer.c | 1 1 + 0 - 0 !
validation/linear/cast-constants.c | 1 1 + 0 - 0 !
validation/linear/degen-array.c | 1 1 + 0 - 0 !
validation/linear/degen-function.c | 1 1 + 0 - 0 !
validation/linear/deref-ptr-ptr.c | 1 1 + 0 - 0 !
validation/linear/logical.c | 1 1 + 0 - 0 !
validation/optim/cast-kinds.c | 1 1 + 0 - 0 !
19 files changed, 20 insertions(+)

 [patch] target.c: ignore -m64 on archs where int32_t is a long

If the flag '-m64' is used on a 32-bit architecture/machine having
int32_t set to 'long', then these int32_t are forced to 64-bit ...

So, ignore the effect of -m64 on these archs and ignore
'64-bit only' tests on them.

Reported-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tested-by: Uwe Kleine-König <uwe@kleine-koenig.org>
predefs fix for MIPS system headers needing _MIPS_SZ.patch | (download)

lib.c | 9 9 + 0 - 0 !
1 file changed, 9 insertions(+)

 [patch] predefs: fix for mips system headers needing
 _MIPS_SZ{INT,LONG,PTR}

System headers (at least glibc's ones) define and use __WORDSIZE
which, on most archs, is defined depending on __LP64 or __ILP32.
But on MIPS, __WORDISZE is defined depending on the value of the
builtin macro _MIPS_SZPTR.

So, add the predefine for _MIPS_SZPTR on MIPS.

Reported-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
predefs add arch specific predefines.patch | (download)

cgcc | 18 8 + 10 - 0 !
lib.c | 67 60 + 7 - 0 !
2 files changed, 68 insertions(+), 17 deletions(-)

 [patch] predefs: add arch-specific predefines

Predefined macros like '__x86_64__', '__arm__', ... are used
in systems headers (and surely at other places too).

So, when appropriate, define the following symbols which seems
to be somehow needed by glibc:
m68k:	__m68k__
mips:	__mpis64, __mips
ppc:	__ppc64__, __powerpc, __ppc__
riscv:	__riscv__, __riscv_xlen__
s390:	__zarch__
sparc:	__sparc_v9__, __sparcv9
x86-64:	__x86_64__, __x86_64

Also, the following symbols, which were previously only defined
in cgcc, are now defined in Sparse itself:
i386	__i386, __i386__
sparc	__sparc, __sparc__, __arch64__, __sparc64__, __sparcv9__
s390	__s390__, __s390x__
ppc	__PPC__, __powerpc__, __PPC64__, __powerpc64__
arm	__arm__
arm64	__aarch64__

Note: these  are only tested on i386, x86-64, arm, arm64,
      mips64 (ABI O32), ppc, ppc64 (power7), ppc64el (power8)
      and sparc64, most of them on a not-so-new OS version.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
cgcc teach cgcc about Hurd GNU.patch | (download)

cgcc | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 [patch] cgcc: teach cgcc about hurd/gnu

cgcc fails if it doesn't know about the system/OS as
returned by `uname -s`. This creates a build failure for
Debian since Hurd is one of their non-official 'ports'
but unknown to cgcc.

So, teach cgcc about 'GNU' (the OS/system name returned
on Hurd) and add the few predefines used to identify it.

Reported-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
validation Add patterns FAIL PASS XPASS and XFAIL to.patch | (download)

validation/test-suite | 15 9 + 6 - 0 !
1 file changed, 9 insertions(+), 6 deletions(-)

 [patch] validation: add patterns fail, pass, xpass and xfail to test

This simplifies finding the offending test when the build ended with

	KO: out of 584 tests, 527 passed, 57 failed
		56 of them are known to fail

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
fix parallel install.patch | (download)

Makefile | 9 3 + 6 - 0 !
1 file changed, 3 insertions(+), 6 deletions(-)

 [patch] fix parallel install

The current make rules for 'install' were mixing pure declarative
and procedural style. As consequence, the binaries or the manpages
could be installed before their target directory was created.

Fix this by removing the rule to create these dirs and use install
with the '-D' option to create them.
Also remove the first prerequisites '$(INST_PROGRAMS) $(INST_MAN1)'
since these are not needed (the effective install rules already depend
them) and somehow misleading (it's not because they're first in
the dependencies list that they will be created before the next ones).

Spotted-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
honor CFLAGS from environment.patch | (download)

Makefile | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch] honor cflags from environment

Debian build scripts pass CFLAGS in the environment. To honor these only set
CFLAGS to "-O2 -g" if CFLAGS is unset. The warnings in the following line
are added unconditionally. This makes sparse builds reproducible.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
ld as needed.patch | (download)

Makefile | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 use ld --as-needed to drop superfluous dependencies

This fixes:

	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libgio-2.0.so.0 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libgdk_pixbuf-2.0.so.0 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libpango-1.0.so.0 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libcairo.so.2 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libfontconfig.so.1 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libatk-1.0.so.0 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libpangocairo-1.0.so.0 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libfreetype.so.6 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libgdk-x11-2.0.so.0 (it uses none of the library's symbols)
	dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/sparse/usr/bin/test-inspect was not linked against libpangoft2-1.0.so.0 (it uses none of the library's symbols)


use gcc 8.patch | (download)

Makefile | 2 1 + 1 - 0 !
cgcc | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

 [patch] cgcc: use gcc-8 explicitly

By default sparse uses include files from the compiler it is compiled with. To
prevent that these include files are removed the sparse package has an explicit
dependency on gcc-8 and is patched to make use of (only) this version.