Package list libcryptx-perl / 2cd29fb
add compilation-flags.patch making CFLAGS/CPPFLAGS be applied by the build process helps get the hardening flags applied Damyan Ivanov 3 years ago
2 changed file(s) with 25 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Description: accept CFLAGS and CPPFLAGS from the environment
1 This is particularly useful for Debian, where the build system puts
2 various hardening flags in CFLAGS and CPPFLAGS
3 Author: Damyan Ivanov <dmn@debian.org>
4 Forwarded: https://github.com/DCIT/perl-CryptX/pull/39
5 Bug: https://github.com/DCIT/perl-CryptX/pull/39
6 --- a/Makefile.PL
7 +++ b/Makefile.PL
8 @@ -12,6 +12,7 @@ my @myobjs = map { s|.c$|$Config{obj_ext
9 );
10 my $myextlib = "src/liballinone$Config{lib_ext}";
11 my $mycflags = "$Config{ccflags} $Config{cccdlflags} $Config{optimize}";
12 +$mycflags .= " $ENV{CFLAGS}" if $ENV{CFLAGS};
13
14 #FIX: gcc with -flto is a trouble maker see https://github.com/DCIT/perl-CryptX/issues/32
15 $mycflags =~ s/-flto\b//g;
16 --- a/src/Makefile
17 +++ b/src/Makefile
18 @@ -167,4 +167,4 @@ clean:
19 .SUFFIXES: .o .c
20
21 .c$(OBJ_EXT):
22 - $(CC) -Iltm -Iltc/headers -DLTC_SOURCE -DLTC_NO_TEST -DLTC_NO_PROTOTYPES -DLTM_DESC $(CFLAGS) -c $< -o $@
23 + $(CC) -Iltm -Iltc/headers -DLTC_SOURCE -DLTC_NO_TEST -DLTC_NO_PROTOTYPES -DLTM_DESC $(CFLAGS) $(CPPFLAGS) -c $< -o $@
00 001_fix-typos.patch
1 compilation-flags.patch