mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] argtables2: fix building and installing for mingw
Date: Thu, 31 May 2012 17:29:53 +0200	[thread overview]
Message-ID: <20120531152953.GJ10627@pengutronix.de> (raw)
In-Reply-To: <1338208981-8681-31-git-send-email-bartvdrmeulen@gmail.com>

On Mon, May 28, 2012 at 02:42:57PM +0200, Bart vdr. Meulen wrote:
> From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>
> 
> Update argtables2 packet so that it builds a dynamic library (dll)
> for windows.
> This is done by telling libtool that argtables will not
> have undefined symbol, which is the case for the windows dll.
> (otherwise libtool will assume unresolved symbols and
> disable dynamic libraries on mingw)
> 
> update the rule file so that the dll is installed in the target sysroot
> 
> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
>  .../0001-build-shared-lib-for-mingw.patch          |   31 ++++++++++++++++++++
>  patches/argtable2-12/series                        |    1 +
>  rules/argtable2.make                               |    4 +++
>  3 files changed, 36 insertions(+)
>  create mode 100644 patches/argtable2-12/0001-build-shared-lib-for-mingw.patch
>  create mode 100644 patches/argtable2-12/series
> 
> diff --git a/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch b/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch

Patch header!

> new file mode 100644
> index 0000000..e5fb776
> --- /dev/null
> +++ b/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch
> @@ -0,0 +1,31 @@
> +---
> + src/Makefile.am |    2 +-
> + src/Makefile.in |    2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +Index: argtable2-12/src/Makefile.am
> +===================================================================
> +--- argtable2-12.orig/src/Makefile.am
> ++++ argtable2-12/src/Makefile.am
> +@@ -17,7 +17,7 @@ libargtable2_la_SOURCES = argtable2.c ar
> + # argtable-2.10 is 1:5:1 (minor tweaks to configuration and documentation, src code is identical to argtable-2.8)
> + # argtable-2.11 is 1:6:1 (minor tweaks to makefiles, src code is identical to argtable-2.8)
> + # argtable-2.12 is 1:7:1 (added support for parsing hex,octal,binary integer formats)
> +-libargtable2_la_LDFLAGS = -version-info 1:7:1
> ++libargtable2_la_LDFLAGS = -version-info 1:7:1 -no-undefined

Are you sure this shouldn't be "-Wl,-no-undefined"?

> + 
> + include_HEADERS = argtable2.h
> + 
> +Index: argtable2-12/src/Makefile.in
> +===================================================================
> +--- argtable2-12.orig/src/Makefile.in
> ++++ argtable2-12/src/Makefile.in

don't patch Makefile.in, add a autogen.sh link instead.

> +@@ -232,7 +232,7 @@ libargtable2_la_SOURCES = argtable2.c ar
> + # argtable-2.10 is 1:5:1 (minor tweaks to configuration and documentation, src code is identical to argtable-2.8)
> + # argtable-2.11 is 1:6:1 (minor tweaks to makefiles, src code is identical to argtable-2.8)
> + # argtable-2.12 is 1:7:1 (added support for parsing hex,octal,binary integer formats)
> +-libargtable2_la_LDFLAGS = -version-info 1:7:1
> ++libargtable2_la_LDFLAGS = -version-info 1:7:1 -no-undefined
> + include_HEADERS = argtable2.h
> + all: config.h
> + 	$(MAKE) $(AM_MAKEFLAGS) all-am
> diff --git a/patches/argtable2-12/series b/patches/argtable2-12/series
> new file mode 100644
> index 0000000..b7a27e1
> --- /dev/null
> +++ b/patches/argtable2-12/series
> @@ -0,0 +1 @@
> +0001-build-shared-lib-for-mingw.patch
> diff --git a/rules/argtable2.make b/rules/argtable2.make
> index 124d37b..7e8661a 100644
> --- a/rules/argtable2.make
> +++ b/rules/argtable2.make
> @@ -60,7 +60,11 @@ $(STATEDIR)/argtable2.targetinstall:
>  	@$(call install_fixup, argtable2,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
>  	@$(call install_fixup, argtable2,DESCRIPTION,missing)
>  
> +ifdef PTXCONF_ARCH_MINGW
> +	@$(call install_copy, argtable2, 0, 0, 0644, -, /usr/bin/libargtable2-0.dll)
> +else
>  	@$(call install_lib, argtable2, 0, 0, 0644, libargtable2)
> +endif

I think it would be better to fix install_lib for mingw here.

Michael

>  
>  	@$(call install_finish, argtable2)
>  
> -- 
> 1.7.9.5
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2012-05-31 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28 12:42 Bart vdr. Meulen
2012-05-31 15:29 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120531152953.GJ10627@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox