From 62d23ddec19b9eff2de06f9a632bd22a0e823553 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Mon, 21 Sep 2015 19:39:07 +1000 Subject: pire: fix shared build, build only libs and test program --- src/pire-1-fixes.patch | 62 +++++++++++++++++++++++++++++++++ src/pire-1-remove-custom-isatty.patch | 41 ---------------------- src/pire-2-disable-samples-inline.patch | 39 --------------------- src/pire.mk | 15 +++++--- 4 files changed, 72 insertions(+), 85 deletions(-) create mode 100644 src/pire-1-fixes.patch delete mode 100644 src/pire-1-remove-custom-isatty.patch delete mode 100644 src/pire-2-disable-samples-inline.patch diff --git a/src/pire-1-fixes.patch b/src/pire-1-fixes.patch new file mode 100644 index 0000000..854218e --- /dev/null +++ b/src/pire-1-fixes.patch @@ -0,0 +1,62 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From 563abb90dd28a922b5da52c8adb9a296537bbf86 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Sat, 25 Jul 2015 16:39:52 +0300 +Subject: [PATCH 1/2] remove custom isatty + +Fix the following problem: + +In file included from mxe/usr/i686-w64-mingw32.static/include/unistd.h:10:0, + from inline.cpp:588: +mxe/usr/i686-w64-mingw32.static/include/io.h:319:37: error: conflicting declaration of 'int isatty(int)' with 'C' linkage + int __cdecl isatty(int _FileHandle) __MINGW_ATTRIB_DEPRECATED_MSVC2005; + ^ +inline.lpp:40:12: note: previous declaration with 'C++' linkage + static int isatty(int) { return 0; } + ^ +make[5]: *** [inline.o] Error 1 + +diff --git a/pire/inline.lpp b/pire/inline.lpp +index e5f6b55..25ef388 100644 +--- a/pire/inline.lpp ++++ b/pire/inline.lpp +@@ -36,10 +36,6 @@ ystring filename = ""; + int line = 1; + yvector args; + +-#ifdef _WIN32 +-static int isatty(int) { return 0; } +-#endif +- + class Die { + public: + Die() { +-- +2.3.2 (Apple Git-55) + + +From de14f09bb7d7a37220aefb877c378ec445837486 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Mon, 21 Sep 2015 18:41:12 +1000 +Subject: [PATCH 2/2] check for target AR + + +diff --git a/configure.ac b/configure.ac +index e185cb9..86c5c1e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -8,6 +8,7 @@ AC_CONFIG_MACRO_DIR([m4]) + AC_LANG_CPLUSPLUS + + # Require neccessary binaries to build ourselves ++AM_PROG_AR + AC_PROG_CXX + AC_PROG_CC + AC_PROG_LEX +-- +2.3.2 (Apple Git-55) + diff --git a/src/pire-1-remove-custom-isatty.patch b/src/pire-1-remove-custom-isatty.patch deleted file mode 100644 index 1006034..0000000 --- a/src/pire-1-remove-custom-isatty.patch +++ /dev/null @@ -1,41 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 615d59e9c9afb76ccb8ece3a773bea13304ee1eb Mon Sep 17 00:00:00 2001 -From: Boris Nagaev -Date: Sat, 25 Jul 2015 16:39:52 +0300 -Subject: [PATCH] remove custom isatty - -Fix the following problem: - -In file included from mxe/usr/i686-w64-mingw32.static/include/unistd.h:10:0, - from inline.cpp:588: -mxe/usr/i686-w64-mingw32.static/include/io.h:319:37: error: conflicting declaration of 'int isatty(int)' with 'C' linkage - int __cdecl isatty(int _FileHandle) __MINGW_ATTRIB_DEPRECATED_MSVC2005; - ^ -inline.lpp:40:12: note: previous declaration with 'C++' linkage - static int isatty(int) { return 0; } - ^ -make[5]: *** [inline.o] Error 1 ---- - pire/inline.lpp | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/pire/inline.lpp b/pire/inline.lpp -index e5f6b55..25ef388 100644 ---- a/pire/inline.lpp -+++ b/pire/inline.lpp -@@ -36,10 +36,6 @@ ystring filename = ""; - int line = 1; - yvector args; - --#ifdef _WIN32 --static int isatty(int) { return 0; } --#endif -- - class Die { - public: - Die() { --- -1.9.1 - diff --git a/src/pire-2-disable-samples-inline.patch b/src/pire-2-disable-samples-inline.patch deleted file mode 100644 index 992e563..0000000 --- a/src/pire-2-disable-samples-inline.patch +++ /dev/null @@ -1,39 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 31ed00623baaa2f62ed3b0749f9acecc94ece85d Mon Sep 17 00:00:00 2001 -From: Boris Nagaev -Date: Sat, 25 Jul 2015 17:15:43 +0300 -Subject: [PATCH] disable samples/inline - -This sample requires running pire_inline, which is impossible -in case of cross-compilation. ---- - configure.ac | 1 - - samples/Makefile.am | 1 - - 2 files changed, 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e185cb9..eafe6bb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -101,7 +101,6 @@ AC_CONFIG_FILES([ - tools/Makefile - tools/bench/Makefile - samples/Makefile -- samples/inline/Makefile - samples/blacklist/Makefile - samples/pigrep/Makefile - ]) -diff --git a/samples/Makefile.am b/samples/Makefile.am -index 32adaf3..1acc17e 100644 ---- a/samples/Makefile.am -+++ b/samples/Makefile.am -@@ -1,4 +1,3 @@ - SUBDIRS = \ -- inline \ - blacklist \ - pigrep --- -1.9.1 - diff --git a/src/pire.mk b/src/pire.mk index 30d7f7f..ec7e7b9 100644 --- a/src/pire.mk +++ b/src/pire.mk @@ -11,11 +11,16 @@ $(PKG)_URL := https://github.com/yandex/pire/archive/release-$($(PKG)_VERSI $(PKG)_DEPS := gcc define $(PKG)_BUILD - cd '$(1)' && autoreconf -fi -I'$(PREFIX)/$(TARGET)/share/aclocal' - cd '$(1)' && ac_cv_func_malloc_0_nonnull=yes ./configure \ + cd '$(1)' && autoreconf -fi + cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ --enable-extra \ - PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install + ac_cv_func_malloc_0_nonnull=yes + $(MAKE) -C '$(1)/pire' -j '$(JOBS)' bin_PROGRAMS= LDFLAGS='-no-undefined' + $(MAKE) -C '$(1)/pire' -j 1 install bin_PROGRAMS= + + '$(TARGET)-g++' \ + -W -Wall -Werror \ + '$(1)/samples/pigrep/pigrep.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + -lpire endef -- cgit v0.12