Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries
Date: Tue, 18 Nov 2014 23:17:02 +0100	[thread overview]
Message-ID: <20141118231702.6e0ebdf0@free-electrons.com> (raw)
In-Reply-To: <1a9971bcf4a300fcb43f9b8b3392d3c3790c1ebf.1416212296.git.baruch@tkos.co.il>

Dear Baruch Siach,

On Mon, 17 Nov 2014 10:18:15 +0200, Baruch Siach wrote:

> +ifeq ($(BR2_PREFER_STATIC_LIB),y)
> +LIVE555_CONFIG_TARGET = linux
> +LIVE555_LIBRARY_LINK = $(TARGET_AR) cr
> +else
> +LIVE555_CONFIG_TARGET = linux-with-shared-libraries
> +LIVE555_LIBRARY_LINK = $(TARGET_CC) -o
> +endif
> +
>  ifndef ($(BR2_ENABLE_LOCALE),y)
>  LIVE555_CFLAGS += -DLOCALE_NOT_USED
>  endif
>  
>  define LIVE555_CONFIGURE_CMDS
> -	echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.linux
> -	echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.linux
> -	echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.linux
> -	echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.linux
> -	echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.linux
> -	echo 'PREFIX = /usr' >> $(@D)/config.linux
> -	(cd $(@D); ./genMakefiles linux)
> +	echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> +	echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> +	echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> +
> +	echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> +	echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> +	echo 'PREFIX = /usr' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> +	# Must have a whitespace at the end of LIBRARY_LINK, otherwise static link
> +	# fails
> +	echo 'LIBRARY_LINK = $(LIVE555_LIBRARY_LINK) ' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> +	(cd $(@D); ./genMakefiles $(LIVE555_CONFIG_TARGET))

I don't understand why you need a separate config.linux and
config.linux-with-shared-libraries. Since in Buildroot we will either
be building with BR2_PREFER_STATIC_LIB=y, or BR2_PREFER_STATIC_LIB
disabled, why not simply call the file config.linux, as it was called
before this patch?

Of course, the LIVE555_LIBRARY_LINK think is needed, but I don't see
why the other changes are needed.

Can you expand on this?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-11-18 22:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17  8:18 [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Baruch Siach
2014-11-17  8:18 ` [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries Baruch Siach
2014-11-18 22:17   ` Thomas Petazzoni [this message]
2014-11-19  5:54     ` Baruch Siach
2014-11-19  9:03       ` Thomas Petazzoni
2014-11-17  8:18 ` [Buildroot] [PATCH 3/3] vlc: allow dynamically linking live555 Baruch Siach
2014-11-18 22:15 ` [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Thomas Petazzoni

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=20141118231702.6e0ebdf0@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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