From patchwork Thu Dec 16 22:43:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Menzel X-Patchwork-Id: 12853 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.69) (envelope-from ) id 1PTMXa-00050N-V5 for vdr@linuxtv.org; Thu, 16 Dec 2010 23:43:15 +0100 X-tubIT-Incoming-IP: 188.40.100.199 Received: from mail.gw90.de ([188.40.100.199]) by mail.tu-berlin.de (exim-4.72/mailfrontend-b) with esmtps [TLSv1:AES256-SHA:256] for id 1PTMXa-00027n-7e; Thu, 16 Dec 2010 23:43:14 +0100 Received: from f053036218.adsl.alicedsl.de ([78.53.36.218] helo=[192.168.178.21]) by mail.gw90.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PTMXT-0001bq-JZ for vdr@linuxtv.org; Thu, 16 Dec 2010 22:43:08 +0000 From: Paul Menzel To: vdr@linuxtv.org In-Reply-To: <975219192.20101213234908@websitec.de> References: <4C961777.504@tvdr.de> <18510219806.20100925131528@websitec.de> <1292175098.13905.58.camel@mattotaupa> <305763991.20101213002951@websitec.de> <1292236149.4146.33.camel@mattotaupa> <1292237783.4146.35.camel@mattotaupa> <1292251360.4146.40.camel@mattotaupa> <975219192.20101213234908@websitec.de> Date: Thu, 16 Dec 2010 23:43:06 +0100 Message-ID: <1292539386.3604.17.camel@mattotaupa> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-PMX-Version: 5.5.4.371499, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.12.16.223015 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODY_SIZE_10000_PLUS 0, INVALID_MSGID_NO_FQDN 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_VERSION 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0' X-LSpam-Score: -3.3 (---) X-LSpam-Report: No, score=-3.3 required=5.0 tests=AWL=0.318, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1 autolearn=ham Subject: Re: [vdr] [PATCH v3] Makefile: pass `LDFLAGS` to compiler X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2010 22:43:15 -0000 Status: O X-Status: X-Keywords: X-UID: 24038 Date: Sun, 12 Dec 2010 18:19:42 +0100 Some distributions pass special flags to the linker [1][2]. Respect those by using `LDFLAGS`. Instead of [1] this patch was made using the following command based on `vdr-plugin.eclass` [3]. find PLUGINS -name Makefile | xargs sed -i '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' Additionally the main Makefile and the script `newplugin` are changed too. The changes have been present in OpenEmbedded and Gentoo for a while already and can be assumend tested. The implicit rules are not changed. This could been done easily using the following command. $ find PLUGINS -name Makefile | xargs sed -i 's/$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $ Signed-off-by: Joerg Bornkessel --- v2 ? v3: Change script `newplugin`. Patch submitted by Joerg [4]. [4] http://www.linuxtv.org/pipermail/vdr/2010-December/024068.html --- Makefile | 2 +- PLUGINS/src/dvbsddevice/Makefile | 2 +- PLUGINS/src/hello/Makefile | 2 +- PLUGINS/src/osddemo/Makefile | 2 +- PLUGINS/src/pictures/Makefile | 2 +- PLUGINS/src/servicedemo/Makefile | 4 ++-- PLUGINS/src/skincurses/Makefile | 2 +- PLUGINS/src/status/Makefile | 2 +- PLUGINS/src/svdrpdemo/Makefile | 2 +- newplugin | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) From 774e9db004fcef15c34871b0cab60dd04078e6d4 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sun, 12 Dec 2010 18:19:42 +0100 Subject: [PATCH] Makefile: pass `LDFLAGS` to compiler Some distributions pass special flags to the linker [1][2]. Respect those by using `LDFLAGS`. Instead of [1] this patch was made using the following command based on `vdr-plugin.eclass` [3]. find PLUGINS -name Makefile | xargs sed -i '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' Additionally the main Makefile and the script `newplugin` are changed too. The changes have been present in OpenEmbedded and Gentoo for a while already and can be assumend tested. The implicit rules are not changed. This could been done easily using the following command. $ find PLUGINS -name Makefile | xargs sed -i 's/$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $ --- Makefile | 2 +- PLUGINS/src/dvbsddevice/Makefile | 2 +- PLUGINS/src/hello/Makefile | 2 +- PLUGINS/src/osddemo/Makefile | 2 +- PLUGINS/src/pictures/Makefile | 2 +- PLUGINS/src/servicedemo/Makefile | 4 ++-- PLUGINS/src/skincurses/Makefile | 2 +- PLUGINS/src/status/Makefile | 2 +- PLUGINS/src/svdrpdemo/Makefile | 2 +- newplugin | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 26f54ea..48e3309 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ $(DEPFILE): Makefile # The main program: vdr: $(OBJS) $(SILIB) - $(CXX) $(CXXFLAGS) -rdynamic $(OBJS) $(LIBS) $(LIBDIRS) $(SILIB) -o vdr + $(CXX) $(CXXFLAGS) -rdynamic $(LDFLAGS) $(OBJS) $(LIBS) $(LIBDIRS) $(SILIB) -o vdr # The libsi library: diff --git a/PLUGINS/src/dvbsddevice/Makefile b/PLUGINS/src/dvbsddevice/Makefile index 32d0f50..afc801b 100644 --- a/PLUGINS/src/dvbsddevice/Makefile +++ b/PLUGINS/src/dvbsddevice/Makefile @@ -99,7 +99,7 @@ i18n: $(I18Nmsgs) $(I18Npot) ### Targets: libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile index a5703f6..9e51cf7 100644 --- a/PLUGINS/src/hello/Makefile +++ b/PLUGINS/src/hello/Makefile @@ -99,7 +99,7 @@ i18n: $(I18Nmsgs) ### Targets: libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean diff --git a/PLUGINS/src/osddemo/Makefile b/PLUGINS/src/osddemo/Makefile index d9ed4c5..eb98160 100644 --- a/PLUGINS/src/osddemo/Makefile +++ b/PLUGINS/src/osddemo/Makefile @@ -72,7 +72,7 @@ $(DEPFILE): Makefile ### Targets: libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean diff --git a/PLUGINS/src/pictures/Makefile b/PLUGINS/src/pictures/Makefile index 19c6fc6..a573363 100644 --- a/PLUGINS/src/pictures/Makefile +++ b/PLUGINS/src/pictures/Makefile @@ -99,7 +99,7 @@ i18n: $(I18Nmsgs) $(I18Npot) ### Targets: libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean diff --git a/PLUGINS/src/servicedemo/Makefile b/PLUGINS/src/servicedemo/Makefile index 18bfd26..8cba989 100644 --- a/PLUGINS/src/servicedemo/Makefile +++ b/PLUGINS/src/servicedemo/Makefile @@ -74,11 +74,11 @@ $(DEPFILE): Makefile ### Targets: libvdr-$(PLUGIN1).so: $(PLUGIN1).o - $(CXX) $(CXXFLAGS) -shared $(PLUGIN1).o -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN1).o -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) libvdr-$(PLUGIN2).so: $(PLUGIN2).o - $(CXX) $(CXXFLAGS) -shared $(PLUGIN2).o -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN2).o -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean diff --git a/PLUGINS/src/skincurses/Makefile b/PLUGINS/src/skincurses/Makefile index 080c3e6..e1e3ae6 100644 --- a/PLUGINS/src/skincurses/Makefile +++ b/PLUGINS/src/skincurses/Makefile @@ -99,7 +99,7 @@ i18n: $(I18Nmsgs) $(I18Npot) ### Targets: libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -lncursesw -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -lncursesw -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean diff --git a/PLUGINS/src/status/Makefile b/PLUGINS/src/status/Makefile index 556a09e..fa59016 100644 --- a/PLUGINS/src/status/Makefile +++ b/PLUGINS/src/status/Makefile @@ -72,7 +72,7 @@ $(DEPFILE): Makefile ### Targets: libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean diff --git a/PLUGINS/src/svdrpdemo/Makefile b/PLUGINS/src/svdrpdemo/Makefile index 4a803c6..1101634 100644 --- a/PLUGINS/src/svdrpdemo/Makefile +++ b/PLUGINS/src/svdrpdemo/Makefile @@ -72,7 +72,7 @@ $(DEPFILE): Makefile ### Targets: libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean diff --git a/newplugin b/newplugin index ffc43d3..0c498f0 100755 --- a/newplugin +++ b/newplugin @@ -158,7 +158,7 @@ i18n: \$(I18Nmsgs) \$(I18Npot) ### Targets: libvdr-\$(PLUGIN).so: \$(OBJS) - \$(CXX) \$(CXXFLAGS) -shared \$(OBJS) -o \$\@ + \$(CXX) \$(CXXFLAGS) \$(LDFLAGS) -shared \$(OBJS) -o \$\@ \@cp --remove-destination \$\@ \$(LIBDIR)/\$\@.\$(APIVERSION) dist: clean -- 1.7.2.3