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

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



gregor herrmann, on 2021-04-18 18:26:48 +0200:
> On Sun, 18 Apr 2021 17:43:19 +0200, Étienne Mollier wrote:
> > 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.

Hi Gregor,

Thanks, I'll also take the merge of CPPFLAGS into CFLAGS, since
Salsa CI and blhc reminded me about the missing flag.  The minor
is issue is fixed in my last push.  Flags should be properly
caught now.

As a side note, apparently Inline is only able to use the C
preprocessor when combined to Inline::Filters tuned to
"Preprocessor", which does not seem available in Debian; maybe
some more prospective work[1].

[1]: https://metacpan.org/pod/Inline::Filters

Have a nice day,  :)
-- 
Étienne Mollier <etienne.mollier@mailoo.org>
Fingerprint:  8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/pts/2, please excuse my verbosity.

Attachment: signature.asc
Description: PGP signature


Reply to: