[libcryptx-perl] 02/03: add compilation-flags.patch making CFLAGS/CPPFLAGS be applied by the build process

Damyan Ivanov dmn at moszumanska.debian.org
Sun Nov 19 21:05:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to branch master
in repository libcryptx-perl.

commit 2cd29fb75c441f691338e71c539416884737ecf1
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sun Nov 19 21:05:02 2017 +0000

    add compilation-flags.patch making CFLAGS/CPPFLAGS be applied by the build process
    
    helps get the hardening flags applied
---
 debian/patches/compilation-flags.patch | 24 ++++++++++++++++++++++++
 debian/patches/series                  |  1 +
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/compilation-flags.patch b/debian/patches/compilation-flags.patch
new file mode 100644
index 0000000..54d4bf0
--- /dev/null
+++ b/debian/patches/compilation-flags.patch
@@ -0,0 +1,24 @@
+Description: accept CFLAGS and CPPFLAGS from the environment
+ This is particularly useful for Debian, where the build system puts
+ various hardening flags in CFLAGS and CPPFLAGS
+Author: Damyan Ivanov <dmn at debian.org>
+Forwarded: https://github.com/DCIT/perl-CryptX/pull/39
+Bug: https://github.com/DCIT/perl-CryptX/pull/39
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -12,6 +12,7 @@ my @myobjs = map { s|.c$|$Config{obj_ext
+ );
+ my $myextlib = "src/liballinone$Config{lib_ext}";
+ my $mycflags = "$Config{ccflags} $Config{cccdlflags} $Config{optimize}";
++$mycflags .= " $ENV{CFLAGS}" if $ENV{CFLAGS};
+ 
+ #FIX: gcc with -flto is a trouble maker see https://github.com/DCIT/perl-CryptX/issues/32
+ $mycflags =~ s/-flto\b//g;
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -167,4 +167,4 @@ clean:
+ .SUFFIXES: .o .c
+ 
+ .c$(OBJ_EXT):
+-	$(CC) -Iltm -Iltc/headers -DLTC_SOURCE -DLTC_NO_TEST -DLTC_NO_PROTOTYPES -DLTM_DESC $(CFLAGS) -c $< -o $@
++	$(CC) -Iltm -Iltc/headers -DLTC_SOURCE -DLTC_NO_TEST -DLTC_NO_PROTOTYPES -DLTM_DESC $(CFLAGS) $(CPPFLAGS) -c $< -o $@
diff --git a/debian/patches/series b/debian/patches/series
index 8a2be0c..f0d01fe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 001_fix-typos.patch
+compilation-flags.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcryptx-perl.git



More information about the Pkg-perl-cvs-commits mailing list