瀏覽代碼

Dpkg::BuildFlags: for Ubuntu set LDFLAGS to -Wl,-Bsymbolic-functions

This is according to https://wiki.ubuntu.com/DistCompilerFlags and
the current patch that they are carrying anyway.
Raphaël Hertzog 16 年之前
父節點
當前提交
af650f7d42
共有 3 個文件被更改,包括 9 次插入0 次删除
  1. 1 0
      debian/changelog
  2. 2 0
      scripts/Dpkg/Vendor/Default.pm
  3. 6 0
      scripts/Dpkg/Vendor/Ubuntu.pm

+ 1 - 0
debian/changelog

@@ -25,6 +25,7 @@ dpkg (1.15.6.2) UNRELEASED; urgency=low
     the right compilation flags to the build process. dpkg-builpackage still
     exports them to not break packages currently relying on them but packages
     should now start using dpkg-buildflags instead. Closes: #560070
+  * For Ubuntu set default value of LDFLAGS to -Wl,-Bsymbolic-functions.
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

+ 2 - 0
scripts/Dpkg/Vendor/Default.pm

@@ -115,6 +115,8 @@ sub run_hook {
         my $fields = shift @params;
     } elsif ($hook eq "extend-patch-header") {
 	my ($textref, $ch_info) = @params;
+    } elsif ($hook eq "update-buildflags") {
+	my ($flags, $origin) = @params;
     }
 
     # Default return value for unknown/unimplemented hooks

+ 6 - 0
scripts/Dpkg/Vendor/Ubuntu.pm

@@ -90,6 +90,12 @@ sub run_hook {
             $fields->{"Launchpad-Bugs-Fixed"} = join(" ", @$bugs);
         }
 
+    } elsif ($hook eq "update-buildflags") {
+	my $flags = shift @params;
+	my $origin = shift @params;
+	# Per https://wiki.ubuntu.com/DistCompilerFlags
+	$flags->{'LDFLAGS'} = '-Wl,-Bsymbolic-functions';
+
     } else {
         return $self->SUPER::run_hook($hook, @params);
     }