diff options
33 files changed, 461 insertions, 172 deletions
diff --git a/patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch new file mode 100644 index 0000000..3cf66b2 --- /dev/null +++ b/patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch @@ -0,0 +1,104 @@ +diff -urpN '--exclude=autom4te.cache' gcc-4.8.5.orig/gcc/configure gcc-4.8.5/gcc/configure +--- gcc-4.8.5.orig/gcc/configure 2014-12-08 03:29:43.000000000 -0800 ++++ gcc-4.8.5/gcc/configure 2017-02-11 16:57:27.424807994 -0800 +@@ -27364,6 +27364,9 @@ fi + + + pluginlibs= ++PICFLAG="-fPIC" ++UNDEFINEDPREAMBLE="extern int X;" ++UNDEFINEDCODE="return X == 0;" + + case "${host}" in + *-*-darwin*) +@@ -27375,6 +27378,11 @@ case "${host}" in + export_sym_check= + fi + ;; ++ *-*-mingw*|*-*-cygwin*|*-*-msys*) ++ PICFLAG="" ++ UNDEFINEDPREAMBLE="" ++ UNDEFINEDCODE="" ++ ;; + *) + if test x$build = x$host; then + export_sym_check="objdump${exeext} -T" +@@ -27487,23 +27495,23 @@ fi + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` +- CFLAGS="$CFLAGS -fPIC" ++ CFLAGS="$CFLAGS ${PICFLAG}" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) +- CFLAGS="$CFLAGS -fPIC" +- LDFLAGS="$LDFLAGS -fPIC -shared" ++ CFLAGS="$CFLAGS ${PICFLAG}" ++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" + ;; + esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 +-$as_echo_n "checking for -fPIC -shared... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5 ++$as_echo_n "checking for ${PICFLAG} -shared... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-extern int X; ++${UNDEFINEDPREAMBLE} + int + main () + { +-return X == 0; ++${UNDEFINEDCODE} + ; + return 0; + } +diff -urpN '--exclude=autom4te.cache' gcc-4.8.5.orig/gcc/configure.ac gcc-4.8.5/gcc/configure.ac +--- gcc-4.8.5.orig/gcc/configure.ac 2014-12-08 03:29:43.000000000 -0800 ++++ gcc-4.8.5/gcc/configure.ac 2017-02-11 16:57:27.424807994 -0800 +@@ -5243,6 +5243,9 @@ enable_plugin=$enableval, + enable_plugin=yes; default_plugin=yes) + + pluginlibs= ++PICFLAG="-fPIC" ++UNDEFINEDPREAMBLE="extern int X;" ++UNDEFINEDCODE="return X == 0;" + + case "${host}" in + *-*-darwin*) +@@ -5254,6 +5257,11 @@ case "${host}" in + export_sym_check= + fi + ;; ++ *-*-mingw*|*-*-cygwin*|*-*-msys*) ++ PICFLAG="" ++ UNDEFINEDPREAMBLE="" ++ UNDEFINEDCODE="" ++ ;; + *) + if test x$build = x$host; then + export_sym_check="objdump${exeext} -T" +@@ -5305,17 +5313,17 @@ if test x"$enable_plugin" = x"yes"; then + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` +- CFLAGS="$CFLAGS -fPIC" ++ CFLAGS="$CFLAGS ${PICFLAG}" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) +- CFLAGS="$CFLAGS -fPIC" +- LDFLAGS="$LDFLAGS -fPIC -shared" ++ CFLAGS="$CFLAGS ${PICFLAG}" ++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" + ;; + esac +- AC_MSG_CHECKING([for -fPIC -shared]) ++ AC_MSG_CHECKING([for ${PICFLAG} -shared]) + AC_TRY_LINK( +- [extern int X;],[return X == 0;], ++ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}], + [AC_MSG_RESULT([yes]); have_pic_shared=yes], + [AC_MSG_RESULT([no]); have_pic_shared=no]) + if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then diff --git a/patches/gcc/4.8.5/950-cygwin64.patch b/patches/gcc/4.8.5/950-cygwin64.patch new file mode 100644 index 0000000..67182ee --- /dev/null +++ b/patches/gcc/4.8.5/950-cygwin64.patch @@ -0,0 +1,11 @@ +--- gcc-4.8.5/gcc/config.host.orig 2017-02-10 20:45:10.425515700 -0800 ++++ gcc-4.8.5/gcc/config.host 2017-02-10 20:47:33.935525500 -0800 +@@ -214,7 +214,7 @@ + ;; + esac + ;; +- i[34567]86-*-cygwin*) ++ i[34567]86-*-cygwin* | x86_64-*-cygwin*) + host_xm_file=i386/xm-cygwin.h + out_host_hook_obj=host-cygwin.o + host_xmake_file="${host_xmake_file} i386/x-cygwin" diff --git a/patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch new file mode 100644 index 0000000..c3bab15 --- /dev/null +++ b/patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch @@ -0,0 +1,104 @@ +diff -urpN '--exclude=autom4te.cache' gcc-4.9.4.orig/gcc/configure gcc-4.9.4/gcc/configure +--- gcc-4.9.4.orig/gcc/configure 2016-05-22 01:53:32.000000000 -0700 ++++ gcc-4.9.4/gcc/configure 2017-02-11 16:54:52.879474293 -0800 +@@ -28058,6 +28058,9 @@ fi + + + pluginlibs= ++PICFLAG="-fPIC" ++UNDEFINEDPREAMBLE="extern int X;" ++UNDEFINEDCODE="return X == 0;" + + case "${host}" in + *-*-darwin*) +@@ -28069,6 +28072,11 @@ case "${host}" in + export_sym_check= + fi + ;; ++ *-*-mingw*|*-*-cygwin*|*-*-msys*) ++ PICFLAG="" ++ UNDEFINEDPREAMBLE="" ++ UNDEFINEDCODE="" ++ ;; + *) + if test x$build = x$host; then + export_sym_check="objdump${exeext} -T" +@@ -28181,23 +28189,23 @@ fi + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` +- CFLAGS="$CFLAGS -fPIC" ++ CFLAGS="$CFLAGS ${PICFLAG}" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) +- CFLAGS="$CFLAGS -fPIC" +- LDFLAGS="$LDFLAGS -fPIC -shared" ++ CFLAGS="$CFLAGS ${PICFLAG}" ++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" + ;; + esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 +-$as_echo_n "checking for -fPIC -shared... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5 ++$as_echo_n "checking for ${PICFLAG} -shared... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-extern int X; ++${UNDEFINEDPREAMBLE} + int + main () + { +-return X == 0; ++${UNDEFINEDCODE} + ; + return 0; + } +diff -urpN '--exclude=autom4te.cache' gcc-4.9.4.orig/gcc/configure.ac gcc-4.9.4/gcc/configure.ac +--- gcc-4.9.4.orig/gcc/configure.ac 2016-05-22 01:53:32.000000000 -0700 ++++ gcc-4.9.4/gcc/configure.ac 2017-02-11 16:49:59.820965424 -0800 +@@ -5583,6 +5583,9 @@ enable_plugin=$enableval, + enable_plugin=yes; default_plugin=yes) + + pluginlibs= ++PICFLAG="-fPIC" ++UNDEFINEDPREAMBLE="extern int X;" ++UNDEFINEDCODE="return X == 0;" + + case "${host}" in + *-*-darwin*) +@@ -5594,6 +5597,11 @@ case "${host}" in + export_sym_check= + fi + ;; ++ *-*-mingw*|*-*-cygwin*|*-*-msys*) ++ PICFLAG="" ++ UNDEFINEDPREAMBLE="" ++ UNDEFINEDCODE="" ++ ;; + *) + if test x$build = x$host; then + export_sym_check="objdump${exeext} -T" +@@ -5645,17 +5653,17 @@ if test x"$enable_plugin" = x"yes"; then + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` +- CFLAGS="$CFLAGS -fPIC" ++ CFLAGS="$CFLAGS ${PICFLAG}" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) +- CFLAGS="$CFLAGS -fPIC" +- LDFLAGS="$LDFLAGS -fPIC -shared" ++ CFLAGS="$CFLAGS ${PICFLAG}" ++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" + ;; + esac +- AC_MSG_CHECKING([for -fPIC -shared]) ++ AC_MSG_CHECKING([for ${PICFLAG} -shared]) + AC_TRY_LINK( +- [extern int X;],[return X == 0;], ++ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}], + [AC_MSG_RESULT([yes]); have_pic_shared=yes], + [AC_MSG_RESULT([no]); have_pic_shared=no]) + if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then diff --git a/patches/glibc/2.12.1/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.12.1/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.12.1/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.12.2/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.12.2/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.12.2/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.13/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.13/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.13/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.14.1/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.14.1/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.14.1/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.14/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.14/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.14/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.15/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.15/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.15/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.16.0/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.16.0/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.16.0/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.17/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.17/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.17/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.18/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.18/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.18/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.19/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.19/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.19/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.20/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.20/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.20/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/glibc/2.21/110-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.21/110-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.21/110-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/patches/linux/3.10.104/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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/3.10.104/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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.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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/3.12.67/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/3.16.38/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/3.18.44/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/3.2.83/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/3.4.113/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/4.1.35/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/4.4.32/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/4.7.10/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 deleted file mode 100644 index 7b6ee5a..0000000 --- a/patches/linux/4.8.8/100-Define-R_X86_64_JUMP_SLOT-for-Cygwin.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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/zlib/1.2.11/100-make-check-fail.patch b/patches/zlib/1.2.11/100-make-check-fail.patch new file mode 100644 index 0000000..3852206 --- /dev/null +++ b/patches/zlib/1.2.11/100-make-check-fail.patch @@ -0,0 +1,33 @@ +'make check' should return with non-zero status + +... if the test fails. + +--- zlib-1.2.11/Makefile.in.orig 2017-02-11 12:00:37.768094420 -0800 ++++ zlib-1.2.11/Makefile.in 2017-02-11 12:01:02.088399001 -0800 +@@ -91,7 +91,7 @@ + echo ' *** zlib test OK ***'; \ + else \ + echo ' *** zlib test FAILED ***'; false; \ +- fi; \ ++ fi + rm -f $$TMPST + + testshared: shared +@@ -104,7 +104,7 @@ + echo ' *** zlib shared test OK ***'; \ + else \ + echo ' *** zlib shared test FAILED ***'; false; \ +- fi; \ ++ fi + rm -f $$TMPSH + + test64: all64 +@@ -113,7 +113,7 @@ + echo ' *** zlib 64-bit test OK ***'; \ + else \ + echo ' *** zlib 64-bit test FAILED ***'; false; \ +- fi; \ ++ fi + rm -f $$TMP64 + + infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h diff --git a/scripts/build/companion_libs/050-zlib.sh b/scripts/build/companion_libs/050-zlib.sh index 45518e9..6e17819 100644 --- a/scripts/build/companion_libs/050-zlib.sh +++ b/scripts/build/companion_libs/050-zlib.sh @@ -97,8 +97,13 @@ do_zlib_backend() { CT_DoExecLog ALL make ${JOBSFLAGS} if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then - CT_DoLog EXTRA "Checking zlib" - CT_DoExecLog ALL make ${JOBSFLAGS} -s check + if [ "${host}" = "${CT_BUILD}" ]; then + CT_DoLog EXTRA "Checking zlib" + CT_DoExecLog ALL make ${JOBSFLAGS} -s check + else + # Cannot run host binaries on build in a canadian cross + CT_DoLog EXTRA "Skipping check for zlib on the host" + fi fi CT_DoLog EXTRA "Installing zlib" diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh index 6b526c8..c81874a 100644 --- a/scripts/build/companion_libs/100-gmp.sh +++ b/scripts/build/companion_libs/100-gmp.sh @@ -106,8 +106,13 @@ do_gmp_backend() { CT_DoExecLog ALL make ${JOBSFLAGS} if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then - CT_DoLog EXTRA "Checking GMP" - CT_DoExecLog ALL make ${JOBSFLAGS} -s check + if [ "${host}" = "${CT_BUILD}" ]; then + CT_DoLog EXTRA "Checking GMP" + CT_DoExecLog ALL make ${JOBSFLAGS} -s check + else + # Cannot run host binaries on build in a canadian cross + CT_DoLog EXTRA "Skipping check for GMP on the host" + fi fi CT_DoLog EXTRA "Installing GMP" diff --git a/scripts/build/companion_libs/110-mpfr.sh b/scripts/build/companion_libs/110-mpfr.sh index 4b9bc64..a7b7f72 100644 --- a/scripts/build/companion_libs/110-mpfr.sh +++ b/scripts/build/companion_libs/110-mpfr.sh @@ -149,8 +149,13 @@ do_mpfr_backend() { CT_DoExecLog ALL make ${JOBSFLAGS} if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then - CT_DoLog EXTRA "Checking MPFR" - CT_DoExecLog ALL make ${JOBSFLAGS} -s check + if [ "${host}" = "${CT_BUILD}" ]; then + CT_DoLog EXTRA "Checking MPFR" + CT_DoExecLog ALL make ${JOBSFLAGS} -s check + else + # Cannot run host binaries on build in a canadian cross + CT_DoLog EXTRA "Skipping check for MPFR on the host" + fi fi CT_DoLog EXTRA "Installing MPFR" diff --git a/scripts/build/companion_libs/121-isl.sh b/scripts/build/companion_libs/121-isl.sh index 8783f2d..ef93bbd 100644 --- a/scripts/build/companion_libs/121-isl.sh +++ b/scripts/build/companion_libs/121-isl.sh @@ -115,8 +115,13 @@ do_isl_backend() { CT_DoExecLog ALL make ${JOBSFLAGS} if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then - CT_DoLog EXTRA "Checking ISL" - CT_DoExecLog ALL make ${JOBSFLAGS} -s check + if [ "${host}" = "${CT_BUILD}" ]; then + CT_DoLog EXTRA "Checking ISL" + CT_DoExecLog ALL make ${JOBSFLAGS} -s check + else + # Cannot run host binaries on build in a canadian cross + CT_DoLog EXTRA "Skipping check for ISL on the host" + fi fi CT_DoLog EXTRA "Installing ISL" diff --git a/scripts/build/companion_libs/130-cloog.sh b/scripts/build/companion_libs/130-cloog.sh index b6ea1e5..b21b028 100644 --- a/scripts/build/companion_libs/130-cloog.sh +++ b/scripts/build/companion_libs/130-cloog.sh @@ -112,8 +112,13 @@ do_cloog_backend() { CT_DoExecLog ALL make ${JOBSFLAGS} if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then - CT_DoLog EXTRA "Checking CLooG" - CT_DoExecLog ALL make ${JOBSFLAGS} -s check + if [ "${host}" = "${CT_BUILD}" ]; then + CT_DoLog EXTRA "Checking CLooG" + CT_DoExecLog ALL make ${JOBSFLAGS} -s check + else + # Cannot run host binaries on build in a canadian cross + CT_DoLog EXTRA "Skipping check for CLooG on the host" + fi fi CT_DoLog EXTRA "Installing CLooG" diff --git a/scripts/build/companion_libs/140-mpc.sh b/scripts/build/companion_libs/140-mpc.sh index acb5fd3..e6efb4f 100644 --- a/scripts/build/companion_libs/140-mpc.sh +++ b/scripts/build/companion_libs/140-mpc.sh @@ -100,8 +100,13 @@ do_mpc_backend() { CT_DoExecLog ALL make ${JOBSFLAGS} if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then - CT_DoLog EXTRA "Checking MPC" - CT_DoExecLog ALL make ${JOBSFLAGS} -s check + if [ "${host}" = "${CT_BUILD}" ]; then + CT_DoLog EXTRA "Checking MPC" + CT_DoExecLog ALL make ${JOBSFLAGS} -s check + else + # Cannot run host binaries on build in a canadian cross + CT_DoLog EXTRA "Skipping check for MPC on the host" + fi fi CT_DoLog EXTRA "Installing MPC" diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh index 064631b..9cfc433 100644 --- a/scripts/build/kernel/linux.sh +++ b/scripts/build/kernel/linux.sh @@ -71,6 +71,17 @@ do_kernel_extract() { return 0 fi CT_Patch "linux" "${CT_KERNEL_VERSION}" + + # Disable building relocs application - it needs <linux/types.h> + # on the host, which may not be present on Cygwin or MacOS; it + # needs <elf.h>, which again is not present on MacOS; and most + # important, we don't need it to install the headers. + # This is not done as a patch, since it varies from Linux version + # to version - patching each particular Linux version would be + # too cumbersome. + CT_Pushd "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" + sed -i -r 's/(\$\(MAKE\) .* relocs)$/:/' arch/*/Makefile + CT_Popd } # Install kernel headers using headers_install from kernel sources. |