The following commit has been merged in the master branch:
commit 325dd5f210a5b2e578814303a58b006a0516b565
Author: Guillem Jover <[email protected]>
Date:   Sun Jun 16 06:37:32 2013 +0200

    dpkg-buildflags: Add GCJFLAGS support
    
    This adds default flags for the GNU Compiler for Java, and the
    supported hardened flags. We do not name the variable JFLAGS nor
    JAVAFLAGS, to make it very clear these are not flags for javac,
    they are only for GCJ; so we use the automake variable name as
    existing precedent.
    
    Closes: #708375

diff --git a/debian/changelog b/debian/changelog
index 4b0bcc5..1295147 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -93,6 +93,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
   * Do not set -fstack-protector in the default build flags on arm64 (it's
     not yet supported). Thanks to Matthias Klose <[email protected]>.
     Closes: #711936
+  * Add GCJFLAGS support to dpkg-buildflags. Closes: #708375
 
   [ Updated manpages translations ]
   * Fix incorrect translation of "fortify" in French manpage for 
dpkg-buildflags
diff --git a/man/dpkg-buildflags.1 b/man/dpkg-buildflags.1
index 488647e..b50346a 100644
--- a/man/dpkg-buildflags.1
+++ b/man/dpkg-buildflags.1
@@ -169,6 +169,9 @@ Options for the C preprocessor. Default value: empty.
 .B CXXFLAGS
 Options for the C++ compiler. Same as \fBCFLAGS\fP.
 .TP
+.B GCJFLAGS
+Options for the GNU Java compiler (gcj). A subset of \fBCFLAGS\fP.
+.TP
 .B FFLAGS
 Options for the Fortran compiler. Same as \fBCFLAGS\fP.
 .TP
diff --git a/scripts/Dpkg/BuildFlags.pm b/scripts/Dpkg/BuildFlags.pm
index 6fe6578..c641587 100644
--- a/scripts/Dpkg/BuildFlags.pm
+++ b/scripts/Dpkg/BuildFlags.pm
@@ -78,6 +78,7 @@ sub load_vendor_defaults {
        CPPFLAGS => '',
        CFLAGS   => $default_flags,
        CXXFLAGS => $default_flags,
+       GCJFLAGS => $default_flags,
        FFLAGS   => $default_flags,
        LDFLAGS  => '',
     };
@@ -85,6 +86,7 @@ sub load_vendor_defaults {
        CPPFLAGS => 'vendor',
        CFLAGS   => 'vendor',
        CXXFLAGS => 'vendor',
+       GCJFLAGS => 'vendor',
        FFLAGS   => 'vendor',
        LDFLAGS  => 'vendor',
     };
@@ -92,6 +94,7 @@ sub load_vendor_defaults {
        CPPFLAGS => 0,
        CFLAGS   => 0,
        CXXFLAGS => 0,
+       GCJFLAGS => 0,
        FFLAGS   => 0,
        LDFLAGS  => 0,
     };
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index db19a04..bf5c8ae 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -151,6 +151,7 @@ sub add_hardening_flags {
     if ($use_feature{pie}) {
        $flags->append('CFLAGS', '-fPIE');
        $flags->append('CXXFLAGS', '-fPIE');
+       $flags->append('GCJFLAGS', '-fPIE');
        $flags->append('LDFLAGS', '-fPIE -pie');
     }
 
@@ -158,6 +159,7 @@ sub add_hardening_flags {
     if ($use_feature{stackprotector}) {
        $flags->append('CFLAGS', '-fstack-protector --param=ssp-buffer-size=4');
        $flags->append('CXXFLAGS', '-fstack-protector 
--param=ssp-buffer-size=4');
+       $flags->append('GCJFLAGS', '-fstack-protector 
--param=ssp-buffer-size=4');
     }
 
     # Fortify Source
diff --git a/scripts/Dpkg/Vendor/Ubuntu.pm b/scripts/Dpkg/Vendor/Ubuntu.pm
index 975d88a..14464c3 100644
--- a/scripts/Dpkg/Vendor/Ubuntu.pm
+++ b/scripts/Dpkg/Vendor/Ubuntu.pm
@@ -97,7 +97,7 @@ sub run_hook {
        my $flags = shift @params;
 
        if (debarch_eq(get_host_arch(), 'ppc64')) {
-           for my $flag (qw(CFLAGS CXXFLAGS FFLAGS)) {
+           for my $flag (qw(CFLAGS CXXFLAGS GCJFLAGS FFLAGS)) {
                $flags->set($flag, '-g -O3', 'vendor');
            }
        }
diff --git a/scripts/mk/buildflags.mk b/scripts/mk/buildflags.mk
index 8f0f215..1c63070 100644
--- a/scripts/mk/buildflags.mk
+++ b/scripts/mk/buildflags.mk
@@ -3,6 +3,7 @@
 # CFLAGS: flags for the C compiler
 # CPPFLAGS: flags for the C preprocessor
 # CXXFLAGS: flags for the C++ compiler
+# GCJFLAGS: flags for the GNU Java compiler
 # FFLAGS: flags for the Fortran compiler
 # LDFLAGS: flags for the linker
 #
@@ -14,7 +15,7 @@
 
 dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := 
$(shell $(2)))$(value DPKG_CACHE_$(1)))
 
-DPKG_BUILDFLAGS_LIST = CFLAGS CPPFLAGS CXXFLAGS FFLAGS LDFLAGS
+DPKG_BUILDFLAGS_LIST = CFLAGS CPPFLAGS CXXFLAGS GCJFLAGS FFLAGS LDFLAGS
 
 define dpkg_buildflags_export_envvar
 ifdef $(1)

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to