chiark / gitweb /
gnupg2 (2.1.17-3) unstable; urgency=medium
[gnupg2.git] / build-aux / speedo / patches / sqlite.patch
1 #! /bin/sh
2 grep static-libgcc Makefile.am >/dev/null && exit 0
3 patch -p0 -l -f $* < $0
4 exit $?
5
6 Use -static-libgcc to avoid linking to libgcc_s_sjlj-1.dll.
7
8 Since gcc 4.8 there is a regression in that plain C programs may link
9 to libgcc_s.a which has a dependency on libgcc_s_sjlj.dll.  This is
10 for example triggered by using long long arithmetic on a 32 bit
11 Windows (e.g symbol __udivdi3).
12
13 As usual the gcc maintainers don't care about backward compatibility
14 and declare that as some kind of compatibility fix and not as
15 regression from 4.7 and all earlier versions.
16
17 Note that we ignore this patch if it seems to be already applied
18 upstream.
19
20 --- Makefile.am~        2016-04-18 20:56:32.000000000 +0200
21 +++ Makefile.am 2016-05-04 12:08:53.254035717 +0200
22 @@ -3,7 +3,7 @@
23
24  lib_LTLIBRARIES = libsqlite3.la
25  libsqlite3_la_SOURCES = sqlite3.c
26 -libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
27 +libsqlite3_la_LDFLAGS = -XCClinker -static-libgcc -no-undefined -version-info 8:6:8
28
29  bin_PROGRAMS = sqlite3
30  sqlite3_SOURCES = shell.c sqlite3.h
31
32 --- Makefile.in~        2016-04-18 20:56:36.000000000 +0200
33 +++ Makefile.in 2016-05-04 12:13:36.570020590 +0200
34 @@ -365,7 +365,7 @@
35  AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
36  lib_LTLIBRARIES = libsqlite3.la
37  libsqlite3_la_SOURCES = sqlite3.c
38 -libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
39 +libsqlite3_la_LDFLAGS = -XCClinker -static-libgcc -no-undefined -version-info 8:6:8
40  sqlite3_SOURCES = shell.c sqlite3.h
41  EXTRA_sqlite3_SOURCES = sqlite3.c
42  sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@