[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to sneak in CFLAGS and LDFLAGS into findimagedupes build

On Sun, 18 Apr 2021 17:43:19 +0200, Étienne Mollier wrote:

> I don't consider myself a Perl expert, but I had a look at this
> issue, and had the general impression that FLAGS needed to be
> manually pushed through ExtUtil::MakeMaker(3pm), and then down
> to Inline::C(3pm).  I came up with propagate-flags.patch, which
> I pushed on Salsa[1], if you wish to have a look.

Ha, there are _two_ places, nice find.
(I had a brief look yesterday and came only up with the changes in
Makefile.PL which were not enough.)
> But maybe there are better options than my implementation, I'm
> not exactly happy of the -shared I had to manually append to
> LDDLFLAGS in the C.pm, and the various FLAGS behavior in Inline
> is not especially clear without having the manual at hand.

From some of the patches we have in the perl team:

--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,6 +1,7 @@
 use strict;
 use warnings;
 use Inline::MakeMaker;
+use Config;
 sub MY::libscan {
 	return if ($_[1] eq 'USB.pm' or $_[1] eq 'dump_usb.pl');
@@ -88,6 +89,8 @@
     test               => {
         TESTS => 't/*.t xt/*.t',
+    CCFLAGS => "$Config{ccflags} $ENV{CFLAGS} $ENV{CPPFLAGS}",
+    LDFLAGS => "$Config{lddlflags} $ENV{LDFLAGS}",
$Config{lddlflags} is '-shared -L/usr/local/lib
-fstack-protector-strong', so this should fix the "-shared" part.


 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Element of Crime: Moonlight

Attachment: signature.asc
Description: Digital Signature

Reply to: