Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
af650f7d42

+ 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
     the right compilation flags to the build process. dpkg-builpackage still
     exports them to not break packages currently relying on them but packages
     exports them to not break packages currently relying on them but packages
     should now start using dpkg-buildflags instead. Closes: #560070
     should now start using dpkg-buildflags instead. Closes: #560070
+  * For Ubuntu set default value of LDFLAGS to -Wl,-Bsymbolic-functions.
 
 
   [ Updated dpkg translations ]
   [ Updated dpkg translations ]
   * German (Sven Joachim).
   * German (Sven Joachim).

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

@@ -115,6 +115,8 @@ sub run_hook {
         my $fields = shift @params;
         my $fields = shift @params;
     } elsif ($hook eq "extend-patch-header") {
     } elsif ($hook eq "extend-patch-header") {
 	my ($textref, $ch_info) = @params;
 	my ($textref, $ch_info) = @params;
+    } elsif ($hook eq "update-buildflags") {
+	my ($flags, $origin) = @params;
     }
     }
 
 
     # Default return value for unknown/unimplemented hooks
     # 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);
             $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 {
     } else {
         return $self->SUPER::run_hook($hook, @params);
         return $self->SUPER::run_hook($hook, @params);
     }
     }