File: hardening-flags

package info (click to toggle)
libwx-scintilla-perl 0.39-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 4,056 kB
  • sloc: cpp: 64,843; perl: 5,279; makefile: 9
file content (46 lines) | stat: -rw-r--r-- 1,215 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Description: pass through hardening flags to the build system
Origin: vendor
Forwarded: not-yet
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2013-06-18

--- a/inc/Module/Build/Scintilla.pm
+++ b/inc/Module/Build/Scintilla.pm
@@ -89,7 +89,9 @@ sub stc_linker {
 
 sub stc_ldflags {
 	my $self = shift;
-	return Alien::wxWidgets->link_flags;
+	my $flags = Alien::wxWidgets->link_flags;
+	$flags .= ' ' . $ENV{LDFLAGS};
+	return $flags;
 }
 
 sub stc_defines {
@@ -119,6 +121,7 @@ sub stc_ccflags {
 	my $flags   = qx($command);
 	chomp($flags);
 	$flags .= ' ' . Alien::wxWidgets->c_flags;
+	$flags .= ' ' . $ENV{CFLAGS} . ' ' . $ENV{CPPFLAGS};
 	return $flags;
 }
 
--- a/inc/Module/Build/Scintilla/GTK.pm
+++ b/inc/Module/Build/Scintilla/GTK.pm
@@ -124,6 +124,8 @@ sub stc_build_xs {
 		Alien::wxWidgets->defines,
 		$Config{ccflags},
 		$Config{optimize},
+		$ENV{CFLAGS},
+		$ENV{CPPFLAGS},
 		'-DWXPL_EXT -DVERSION=\"' . $dist_version . '\" -DXS_VERSION=\"' . $dist_version . '\"',
 		'Scintilla.c',
 	);
@@ -138,6 +140,7 @@ sub stc_link_xs {
 		Alien::wxWidgets->linker,
 		Alien::wxWidgets->link_flags,
 		$Config{lddlflags},
+		$ENV{LDFLAGS},
 		'-fPIC -L.',
 		'-s -o ' . $dll,
 		'Scintilla.o',