Package: dpkg
Version: 1.15.8.10
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch natty
Hi,
We're considering bringing up a ppc64 port of the Ubuntu server, and it
appears to be best to build it with -O3 rather than -O2. (I realise
that this would be unusual in Debian and that there are more obstacles
to this than just dpkg-buildflags, and I'd like to do this differently
eventually, but this is where we are at the moment.) Could you please
apply this patch to Dpkg::Vendor::Ubuntu to change our default compiler
flags for that architecture?
* Set Ubuntu ppc64 optimisation to -O3.
diff --git a/scripts/Dpkg/Vendor/Ubuntu.pm b/scripts/Dpkg/Vendor/Ubuntu.pm
index d9ff1b8..a07aa53 100644
--- a/scripts/Dpkg/Vendor/Ubuntu.pm
+++ b/scripts/Dpkg/Vendor/Ubuntu.pm
@@ -28,6 +28,7 @@ use Dpkg::ErrorHandling;
use Dpkg::Gettext;
use Dpkg::Control::Types;
use Dpkg::BuildOptions;
+use Dpkg::Arch qw(debarch_eq get_host_arch);
use base 'Dpkg::Vendor::Debian';
@@ -93,6 +94,11 @@ sub run_hook {
} elsif ($hook eq "update-buildflags") {
my $flags = shift @params;
+ if (debarch_eq(get_host_arch(), 'ppc64')) {
+ for my $flag (qw(CFLAGS CXXFLAGS FFLAGS)) {
+ $flags->set($flag, '-g -O3', 'vendor');
+ }
+ }
# Per https://wiki.ubuntu.com/DistCompilerFlags
$flags->set('LDFLAGS', '-Wl,-Bsymbolic-functions', 'vendor');
Thanks,
--
Colin Watson [[email protected]]
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]