summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-12-06 19:33:44 (GMT)
committerGitHub <noreply@github.com>2016-12-06 19:33:44 (GMT)
commitda3f8c4ec5345b709a330eebab01cd62c574295d (patch)
tree4ad81b0fed8e92dc49061d11d1f67ff7be0b1b2d
parentee4446c7aea3a9ec0d431377324e8615b61c4ba3 (diff)
parent7e44983388a85ba2ef721b302f97b8accad23ba6 (diff)
Merge pull request #494 from stilor/cygwin-fixes
Cygwin fixes
-rw-r--r--kconfig/.gitignore1
-rw-r--r--patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch (renamed from patches/gettext/0.19.6/110-Fix-linker-error-redefinition-of-vasprintf.patch)0
-rw-r--r--patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch (renamed from patches/gettext/0.19.6/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch)38
-rw-r--r--patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch (renamed from patches/gettext/0.19.6/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch)0
-rw-r--r--patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch44
-rw-r--r--patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch26
-rw-r--r--patches/linux/3.0.9/100-headers_install-fix-__packed-in-exported-kernel-head.patch38
-rw-r--r--patches/linux/3.10.104/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch (renamed from patches/linux/4.2.3/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch)0
-rw-r--r--patches/linux/3.12.67/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--patches/linux/3.16.38/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--patches/linux/3.18.44/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--patches/linux/3.2.83/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--patches/linux/3.4.113/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--patches/linux/4.1.35/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--patches/linux/4.4.32/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--patches/linux/4.7.10/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--patches/linux/4.8.8/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch16
-rw-r--r--scripts/functions8
18 files changed, 241 insertions, 58 deletions
diff --git a/kconfig/.gitignore b/kconfig/.gitignore
index 21fa66f..7f79a8d 100644
--- a/kconfig/.gitignore
+++ b/kconfig/.gitignore
@@ -5,3 +5,4 @@ conf
zconf.lex.c
zconf.hash.c
zconf.tab.c
+*.exe
diff --git a/patches/gettext/0.19.6/110-Fix-linker-error-redefinition-of-vasprintf.patch b/patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch
index dacdfb1..dacdfb1 100644
--- a/patches/gettext/0.19.6/110-Fix-linker-error-redefinition-of-vasprintf.patch
+++ b/patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch
diff --git a/patches/gettext/0.19.6/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch b/patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
index d5c4143..4624cb5 100644
--- a/patches/gettext/0.19.6/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
+++ b/patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
@@ -63,7 +63,7 @@ diff -urN a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am
+$(COLOR_SOURCE) $(OUTPUT_SOURCE) \
msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \
msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c \
- plural-table.c quote.h sentence.h sentence.c libexpat-compat.c \
+ plural-table.c quote.h sentence.h sentence.c \
diff -urN a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in
--- a/gettext-tools/src/Makefile.in 2015-09-11 04:05:11.000000000 +0100
+++ b/gettext-tools/src/Makefile.in 2015-10-22 00:42:26.253852000 +0100
@@ -76,12 +76,12 @@ diff -urN a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in
- msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c \
- msgl-english.c msgl-check.c file-list.c msgl-charset.c \
- po-time.c plural-exp.c plural-eval.c plural-table.c quote.h \
-- sentence.h sentence.c libexpat-compat.c format.c \
-- format-invalid.h format-c.c format-c-parse.h format-sh.c \
-- format-python.c format-python-brace.c format-lisp.c \
-- format-elisp.c format-librep.c format-scheme.c format-java.c \
-- format-csharp.c format-awk.c format-pascal.c format-ycp.c \
-- format-tcl.c format-perl.c format-perl-brace.c format-php.c \
+- sentence.h sentence.c format.c format-invalid.h format-c.c \
+- format-c-parse.h format-sh.c format-python.c \
+- format-python-brace.c format-lisp.c format-elisp.c \
+- format-librep.c format-scheme.c format-java.c format-csharp.c \
+- format-awk.c format-pascal.c format-ycp.c format-tcl.c \
+- format-perl.c format-perl-brace.c format-php.c \
- format-gcc-internal.c format-gfc-internal.c format-qt.c \
- format-qt-plural.c format-kde.c format-kde-kuit.c \
+ dir-list.c str-list.c read-catalog.c color.c \
@@ -92,7 +92,7 @@ diff -urN a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in
+ msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c \
+ msgl-header.c msgl-english.c msgl-check.c file-list.c \
+ msgl-charset.c po-time.c plural-exp.c plural-eval.c \
-+ plural-table.c quote.h sentence.h sentence.c libexpat-compat.c \
++ plural-table.c quote.h sentence.h sentence.c \
+ format.c format-invalid.h format-c.c format-c-parse.h \
+ format-sh.c format-python.c format-python-brace.c \
+ format-lisp.c format-elisp.c format-librep.c format-scheme.c \
@@ -101,7 +101,7 @@ diff -urN a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in
+ format-php.c format-gcc-internal.c format-gfc-internal.c \
+ format-qt.c format-qt-plural.c format-kde.c format-kde-kuit.c \
format-boost.c format-lua.c format-javascript.c \
- ../woe32dll/c++format.cc read-desktop.c \
+ ../woe32dll/c++format.cc read-desktop.c locating-rule.c its.c \
../woe32dll/gettextsrc-exports.c
@@ -413,7 +416,18 @@
libgettextsrc_la-open-catalog.lo libgettextsrc_la-dir-list.lo \
@@ -149,18 +149,19 @@ diff -urN a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in
libgettextsrc_la-msgl-iconv.lo libgettextsrc_la-msgl-equal.lo \
libgettextsrc_la-msgl-cat.lo libgettextsrc_la-msgl-header.lo \
libgettextsrc_la-msgl-english.lo \
-@@ -482,8 +493,8 @@
+@@ -482,9 +493,9 @@
libgettextsrc_la-msgl-charset.lo libgettextsrc_la-po-time.lo \
libgettextsrc_la-plural-exp.lo libgettextsrc_la-plural-eval.lo \
libgettextsrc_la-plural-table.lo libgettextsrc_la-sentence.lo \
-- libgettextsrc_la-libexpat-compat.lo $(am__objects_2) \
-- libgettextsrc_la-read-desktop.lo $(am__objects_3)
-+ libgettextsrc_la-libexpat-compat.lo $(am__objects_4) \
-+ libgettextsrc_la-read-desktop.lo $(am__objects_5)
+- $(am__objects_2) libgettextsrc_la-read-desktop.lo \
++ $(am__objects_4) libgettextsrc_la-read-desktop.lo \
+ libgettextsrc_la-locating-rule.lo libgettextsrc_la-its.lo \
+- $(am__objects_3)
++ $(am__objects_5)
libgettextsrc_la_OBJECTS = $(am_libgettextsrc_la_OBJECTS)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
am_cldr_plurals_OBJECTS = cldr_plurals-cldr-plural.$(OBJEXT) \
-@@ -1975,15 +1986,29 @@
+@@ -1975,15 +1986,28 @@
@WOE32DLL_TRUE@ format-qt.c format-qt-plural.c format-kde.c \
@WOE32DLL_TRUE@ format-kde-kuit.c format-boost.c format-lua.c \
@WOE32DLL_TRUE@ format-javascript.c
@@ -185,15 +186,14 @@ diff -urN a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in
- write-po.c msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c \
- msgl-header.c msgl-english.c msgl-check.c file-list.c \
- msgl-charset.c po-time.c plural-exp.c plural-eval.c \
-- plural-table.c quote.h sentence.h sentence.c libexpat-compat.c \
-- $(FORMAT_SOURCE) read-desktop.c $(am__append_1)
+- plural-table.c quote.h sentence.h sentence.c $(FORMAT_SOURCE) \
+- read-desktop.c locating-rule.c its.c $(am__append_1)
+libgettextsrc_la_SOURCES = $(COMMON_SOURCE) read-catalog.c \
+ $(COLOR_SOURCE) $(OUTPUT_SOURCE) msgl-ascii.c msgl-iconv.c \
+ msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \
+ msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c \
+ plural-eval.c plural-table.c quote.h sentence.h sentence.c \
-+ libexpat-compat.c $(FORMAT_SOURCE) read-desktop.c \
-+ $(am__append_1)
++ $(FORMAT_SOURCE) read-desktop.c locating-rule.c its.c $(am__append_1)
# msggrep needs pattern matching.
LIBGREP = ../libgrep/libgrep.a
diff --git a/patches/gettext/0.19.6/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch b/patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
index 3487302..3487302 100644
--- a/patches/gettext/0.19.6/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
+++ b/patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
diff --git a/patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch b/patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch
new file mode 100644
index 0000000..7f980ac
--- /dev/null
+++ b/patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch
@@ -0,0 +1,44 @@
+>From cfbc1c62a1ea5c5809d11b957ad29cd820db15b8 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <address@hidden>
+Date: Mon, 21 Mar 2016 00:49:17 -0700
+Subject: [PATCH] sys_select: port to new Cygwin
+
+Problem reported by Ken Brown in:
+https://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html
+* lib/sys_select.in.h [__CYGWIN__]: Avoid "unknown type name"
+diagnostics.
+---
+ ChangeLog | 8 ++++++++
+ lib/sys_select.in.h | 10 ++++++----
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/gettext-tools/gnulib-lib/sys_select.in.h b/gettext-tools/gnulib-lib/sys_select.in.h
+index d6d3f9f..7281144 100644
+--- a/gettext-tools/gnulib-lib/sys_select.in.h
++++ b/gettext-tools/gnulib-lib/sys_select.in.h
+@@ -81,8 +81,9 @@
+ of 'struct timeval', and no definition of this type.
+ Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
+ in <sys/time.h>.
+- But avoid namespace pollution on glibc systems. */
+-# ifndef __GLIBC__
++ But avoid namespace pollution on glibc systems and "unknown type
++ name" problems on Cygwin. */
++# if !(defined __GLIBC__ || defined __CYGWIN__)
+ # include <sys/time.h>
+ # endif
+
+@@ -100,10 +101,11 @@
+ #endif
+
+ /* Get definition of 'sigset_t'.
+- But avoid namespace pollution on glibc systems.
++ But avoid namespace pollution on glibc systems and "unknown type
++ name" problems on Cygwin.
+ Do this after the include_next (for the sake of OpenBSD 5.0) but before
+ the split double-inclusion guard (for the sake of Solaris). */
+-#if !(defined __GLIBC__ && !defined __UCLIBC__)
++#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__)
+ # include <signal.h>
+ #endif
+
diff --git a/patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch b/patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch
new file mode 100644
index 0000000..caaf0a0
--- /dev/null
+++ b/patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch
@@ -0,0 +1,26 @@
+--- a/gettext-tools/gnulib-lib/sys_select.in.h
++++ b/gettext-tools/gnulib-lib/sys_select.in.h
+@@ -82,8 +82,8 @@
+ Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
+ in <sys/time.h>.
+ But avoid namespace pollution on glibc systems and "unknown type
+- name" problems on Cygwin. */
+-# if !(defined __GLIBC__ || defined __CYGWIN__)
++ name" problems on newlib systems. */
++# if !(defined __GLIBC__ || defined __NEWLIB__)
+ # include <sys/time.h>
+ # endif
+
+@@ -102,10 +102,10 @@
+
+ /* Get definition of 'sigset_t'.
+ But avoid namespace pollution on glibc systems and "unknown type
+- name" problems on Cygwin.
++ name" problems on newlib systems..
+ Do this after the include_next (for the sake of OpenBSD 5.0) but before
+ the split double-inclusion guard (for the sake of Solaris). */
+-#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__)
++#if !((defined __GLIBC__ || defined __NEWLIB__) && !defined __UCLIBC__)
+ # include <signal.h>
+ #endif
+
diff --git a/patches/linux/3.0.9/100-headers_install-fix-__packed-in-exported-kernel-head.patch b/patches/linux/3.0.9/100-headers_install-fix-__packed-in-exported-kernel-head.patch
deleted file mode 100644
index 8c187c5..0000000
--- a/patches/linux/3.0.9/100-headers_install-fix-__packed-in-exported-kernel-head.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-commit f210735fe2f17a6225432ee3d1239bcf23a8659c
-Author: Markus Trippelsdorf <markus@trippelsdorf.de>
-Date: Fri Jun 24 15:51:00 2011 +0200
-
- headers_install: fix __packed in exported kernel headers
-
- checkpatch.pl warns about using __attribute__((packed)) in kernel
- headers: "__packed is preferred over __attribute__((packed))". If one
- follows that advice it could cause problems in the exported header
- files, because the outside world doesn't know about this shortcut.
-
- For example busybox will fail to compile:
- CC miscutils/ubi_attach_detach.o
- In file included from miscutils/ubi_attach_detach.c:27:0:
- /usr/include/mtd/ubi-user.h:330:3: error: conflicting types for ‘__packed’
- /usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here
- ...
-
- Fix the problem by substituting __packed with __attribute__((packed)) in
- the header_install.pl script.
-
- Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
- CC: Joe Perches <joe@perches.com>
- Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
- Signed-off-by: Michal Marek <mmarek@suse.cz>
-
-diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
-index efb3be1..48462be 100644
---- a/scripts/headers_install.pl
-+++ b/scripts/headers_install.pl
-@@ -35,6 +35,7 @@ foreach my $file (@files) {
- $line =~ s/([\s(])__iomem\s/$1/g;
- $line =~ s/\s__attribute_const__\s/ /g;
- $line =~ s/\s__attribute_const__$//g;
-+ $line =~ s/\b__packed\b/__attribute__((packed))/g;
- $line =~ s/^#include <linux\/compiler.h>//;
- $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
- $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
diff --git a/patches/linux/4.2.3/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/3.10.104/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
index 7b6ee5a..7b6ee5a 100644
--- a/patches/linux/4.2.3/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
+++ b/patches/linux/3.10.104/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
diff --git a/patches/linux/3.12.67/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/3.12.67/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/3.12.67/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/patches/linux/3.16.38/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/3.16.38/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/3.16.38/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/patches/linux/3.18.44/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/3.18.44/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/3.18.44/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/patches/linux/3.2.83/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/3.2.83/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/3.2.83/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/patches/linux/3.4.113/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/3.4.113/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/3.4.113/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/patches/linux/4.1.35/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/4.1.35/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/4.1.35/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/patches/linux/4.4.32/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/4.4.32/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/4.4.32/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/patches/linux/4.7.10/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/4.7.10/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/4.7.10/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/patches/linux/4.8.8/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch b/patches/linux/4.8.8/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
new file mode 100644
index 0000000..7b6ee5a
--- /dev/null
+++ b/patches/linux/4.8.8/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch
@@ -0,0 +1,16 @@
+--- linux-4.2/arch/x86/tools/relocs.c.orig 2015-10-20 22:36:03.075546600 +0100
++++ linux-4.2/arch/x86/tools/relocs.c 2015-10-20 22:36:04.934950000 +0100
+@@ -187,6 +187,13 @@
+ return name;
+ }
+
++/* Hack for Cygwin */
++#if ELF_BITS == 64
++#if !defined(R_X86_64_JUMP_SLOT) && defined(R_X86_64_JMP_SLOT)
++#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT
++#endif
++#endif
++
+ static const char *rel_type(unsigned type)
+ {
+ static const char *type_name[] = {
diff --git a/scripts/functions b/scripts/functions
index efdf304..6fc1793 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -1574,6 +1574,7 @@ CT_IterateMultilibs() {
local -a multilibs
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_target
local root_suffix
+ local dir_postfix
# Name used internally below
if [ "${prefix}" = "sysroot-check" ]; then
@@ -1655,7 +1656,12 @@ CT_IterateMultilibs() {
multi_os_dir=.
fi
- CT_mkdir_pushd "${prefix}_${multi_dir//\//_}"
+ # Brain-dead Cygwin hack: Cygwin cannot run a binary if there is a directory
+ # component in the path that ends with a dot. Unfortunately, that's the case
+ # for the default library name with GCC.
+ dir_postfix=_${multi_dir//\//_}
+ dir_postfix=${dir_postfix%_.}
+ CT_mkdir_pushd "${prefix}${dir_postfix}"
$func multi_dir="${multi_dir}" \
multi_os_dir="${multi_os_dir}" \
multi_flags="${multi_flags}" \