On Wed, 2016-08-31 at 16:34 +0200, xavier grave wrote:
> Hi Mattia,
> 
> Sadly, I haven't time for maintaining work anymore.
> I have filed a RFA (#834605) against wnpp.
> 
> Thanks for your concern, cordially, xavier
> 
> Le 29/08/2016 à 16:30, Mattia Rizzolo a écrit :
> > 
> > source: polyorb
> > version: 2.11~20140418-3
> > severity: serious
> > 
> > Dear maintainer,
> > 
> > polyorb is the last package using gnat-4.9 for building, which means
> > it's the last package holding gnat-4.9 clean removal.
> > 
> > I don't see any activity going on this package, and it already has 2
> > unaswered RC bugs (#790664 from half 2015).
> > 
> > I wonder if these are signs that calls the removal of the packge.
> > 
> > If I don't receive any reply from you in 2 weeks I'll reassign this bug
> > to ftpmaster to proceed with the removal.

Hi,

With the attached patches polyorb builds fine with gcc-6/gnat-6. With these
patches all serious bugs are fixed.

  * Enable build with gnat-6: Closes #790664, #831255, #835966
    New debian patches: debian_control.patch, debian_rules.patch,
    debian_patches_series.patch
    New source patches: src_csupport.c.patch,
    examples_corba_echo_echo-impl.adb.patch
    Modified patches: hardening.patch

BTW: This version is old, but upstream there seems to be a later version
available: 2.12.1 from 2015 and the latest commit is from February 2016,
mentioning version 17.0.

Thanks!
--- a/examples/corba/echo/echo-impl.adb.orig	2014-03-20 21:52:43.000000000 +0100
+++ b/examples/corba/echo/echo-impl.adb		2016-09-02 12:11:41.916884091 +0200
@@ -55,7 +55,7 @@
          S (L - 2 .. L) := (others => '.');
       end if;
       Ada.Text_IO.Put_Line
-        ("Echoing string: « " & S (S'First .. L) & " »");
+        ("Echoing string: << " & S (S'First .. L) & " >>");
       return Mesg;
    end EchoString;
 
--- b/debian/patches/series.orig	2014-09-26 15:00:26.000000000 +0200
+++ a/debian/patches/series		2016-09-01 16:44:19.089690966 +0200
@@ -43,3 +43,5 @@
 xe_back-polyorb.adb.patch
 support-tilde-in-pathname.patch
 make-clean.patch
+src_csupport.c.patch
+examples_corba_echo_echo-impl.adb.patch
Index: polyorb-2.11~20140418/src/csupport.c
===================================================================
--- polyorb-2.11~20140418.orig/src/csupport.c
+++ polyorb-2.11~20140418/src/csupport.c
@@ -27,6 +27,7 @@
 /* C support functions for PolyORB */
 
 #include "config.h"
+#include <unistd.h>
 
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
Index: polyorb-2.11~20140418/Makefile.in
===================================================================
--- polyorb-2.11~20140418.orig/Makefile.in
+++ polyorb-2.11~20140418/Makefile.in
@@ -1,5 +1,7 @@
 # Main PolyORB Makefile
 
+include /usr/share/dpkg/default.mk
+
 .PHONY: default
 default: all
 
@@ -70,7 +72,7 @@ GPRBUILD_FOR_TARGET	:= @GPRBUILD_FOR_TAR
 # the command line if needed. Also, need to specify PARALLEL_GNATMAKE_FLAGS
 # before GNATMAKE_FLAGS, otherwise this variable is simply ignored.
 CFLAGS                  = @CFLAGS@
-ADAFLAGS                = @ADAFLAGS@
+ADAFLAGS                += @ADAFLAGS@
 CPPFLAGS                = @CPPFLAGS@
 PARALLEL_GNATMAKE_FLAGS = -j0
 EXTRA_GNATMAKE_FLAGS    = @EXTRA_GNATMAKE_FLAGS@
@@ -93,7 +95,7 @@ COMP_TOOLS_GNATMAKE_FLAGS := @STYLE_SWIT
 LIBRARY_TYPE_OPTION       := -XLIBRARY_TYPE=static
 CFLAGS_FOR_TARGET         := @CFLAGS_FOR_TARGET@
 ADAFLAGS_FOR_TARGET       := @ADAFLAGS_FOR_TARGET@
-GNATMAKE_FLAGS_FOR_TARGET := $(LIBRARY_TYPE_OPTION) -cargs ${ADAFLAGS_FOR_TARGET}
+GNATMAKE_FLAGS_FOR_TARGET := $(LIBRARY_TYPE_OPTION) -cargs ${ADAFLAGS_FOR_TARGET} -largs $(LDFLAGS)
 
 # Feature substitutions
 
@@ -228,11 +230,11 @@ build-iac \
 : build-%:
 	mkdir -p compilers/${compiler_dir} && \
 	  cd compilers/${compiler_dir} && \
-	  ${GNATMAKE} -m \
+	  ${GNATMAKE} $(ADAFLAGS) -m \
 	   $*.adb \
 	   ${COMP_TOOLS_GNATMAKE_FLAGS} \
 	   -I${top_srcdir}/compilers/${compiler_dir} \
-	   ${PRJ_GNATMAKE_FLAGS} -bargs -E
+	   ${PRJ_GNATMAKE_FLAGS} -bargs -E -largs $(LDFLAGS)
 # Binder switch -E causes traceback information to be included in
 # Exception_Occurrences.
 
@@ -240,7 +242,7 @@ build-po_gnatdist:
 	mkdir -p compilers/${compiler_dir} && \
 	  cd compilers/${compiler_dir} && \
 	  ADA_PROJECT_PATH="${top_builddir}/projects${PATH_SEP}${top_srcdir}/projects${PATH_SEP}$$ADA_PROJECT_PATH" \
-	  ${GNATMAKE} -p -m -P compilers_gnatdist
+	  ${GNATMAKE} -p $(ADAFLAGS) -m -P compilers_gnatdist -largs $(LDFLAGS)
 
 # The following variables are used for invoking idlac. There is a static
 # pattern rule for each; see "Rules for running idlac", below. Each file
Index: polyorb-2.11~20140418/projects/polyorb_common.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_common.gpr
+++ polyorb-2.11~20140418/projects/polyorb_common.gpr
@@ -35,6 +35,14 @@ project PolyORB_Common is
 
    type Library_Type_Type is ("relocatable", "static");
    Library_Type : Library_Type_Type := external ("LIBRARY_TYPE", "static");
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    Libversion := external ("Libversion", "3");
 
Index: polyorb-2.11~20140418/projects/polyorb_src_aws.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_aws.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_aws.gpr
@@ -41,6 +41,14 @@ library project PolyORB_src_aws is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_aws";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_dns.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_dns.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_dns.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_dns is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_dns";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_dns_mdns.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_dns_mdns.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_dns_mdns.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_dns_mdns is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_dns_mdns";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_dns_udns.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_dns_udns.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_dns_udns.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_dns_udns is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_dns_udns";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_setup.gpr.in
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_setup.gpr.in
+++ polyorb-2.11~20140418/projects/polyorb_src_setup.gpr.in
@@ -51,6 +51,14 @@ project PolyORB_src_setup is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_setup";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_ssl.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_ssl.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_ssl.gpr
@@ -44,6 +44,14 @@ library project PolyORB_src_ssl is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_ssl";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_setup_security.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_setup_security.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_setup_security.gpr
@@ -46,6 +46,14 @@ project PolyORB_src_setup_security is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_setup_security";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_soap.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_soap.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_soap.gpr
@@ -42,6 +42,14 @@ library project PolyORB_src_soap is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_soap";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_srp.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_srp.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_srp.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_srp is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_srp";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_security_gssup.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_security_gssup.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_security_gssup.gpr
@@ -42,6 +42,14 @@ library project PolyORB_src_security_gss
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_security_gssup";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_security_tls.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_security_tls.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_security_tls.gpr
@@ -43,6 +43,14 @@ library project PolyORB_src_security_tls
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_security_tls";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_security_x509.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_security_x509.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_security_x509.gpr
@@ -44,6 +44,14 @@ library project PolyORB_src_security_x50
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_security_x509";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_giop_iiop_security_tls.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_giop_iiop_security_tls.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_giop_iiop_security_tls.gpr
@@ -42,6 +42,14 @@ library project PolyORB_src_giop_iiop_se
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_giop_iiop_security_tls";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_giop_iiop_ssliop.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_giop_iiop_ssliop.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_giop_iiop_ssliop.gpr
@@ -42,6 +42,14 @@ library project PolyORB_src_giop_iiop_ss
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_giop_iiop_ssliop";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_giop_miop.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_giop_miop.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_giop_miop.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_giop_miop is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_giop_miop";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_moma.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_moma.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_moma.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_moma is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_moma";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_security.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_security.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_security.gpr
@@ -44,6 +44,14 @@ library project PolyORB_src_security is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_security";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_dsa.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_dsa.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_dsa.gpr
@@ -39,6 +39,14 @@ project PolyORB_src_dsa is
    for Library_Dir use PolyORB_Common.Build_Dir & "lib";
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_dsa";
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+      --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    for Library_Kind use PolyORB_Common.Library_Type;
    --  For the DSA application personality, always build a static library
Index: polyorb-2.11~20140418/projects/polyorb_src_giop.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_giop.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_giop.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_giop is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_giop";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_giop_diop.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_giop_diop.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_giop_diop.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_giop_diop is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_giop_diop";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_giop_iiop.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_giop_iiop.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_giop_iiop.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_giop_iiop is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_giop_iiop";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_giop_iiop_security.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_giop_iiop_security.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_giop_iiop_security.gpr
@@ -42,6 +42,14 @@ library project PolyORB_src_giop_iiop_se
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_giop_iiop_security";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_corba_iop.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_corba_iop.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_corba_iop.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_corba_iop is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_corba_iop";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_corba_messaging.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_corba_messaging.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_corba_messaging.gpr
@@ -43,6 +43,14 @@ library project PolyORB_src_corba_messag
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_corba_messaging";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_corba_portableinterceptor.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_corba_portableinterceptor.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_corba_portableinterceptor.gpr
@@ -44,6 +44,14 @@ library project PolyORB_src_corba_portab
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_corba_portableinterceptor";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_corba_security.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_corba_security.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_corba_security.gpr
@@ -42,6 +42,14 @@ library project PolyORB_src_corba_securi
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_corba_security";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_corba_security_gssup.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_corba_security_gssup.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_corba_security_gssup.gpr
@@ -45,6 +45,14 @@ library project PolyORB_src_corba_securi
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_corba_security_gssup";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_idls_cos_notification.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_idls_cos_notification.gpr
+++ polyorb-2.11~20140418/projects/polyorb_idls_cos_notification.gpr
@@ -40,6 +40,14 @@ library project PolyORB_idls_cos_notific
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/idls_cos_notification";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_idls_cos_time.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_idls_cos_time.gpr
+++ polyorb-2.11~20140418/projects/polyorb_idls_cos_time.gpr
@@ -40,6 +40,14 @@ library project PolyORB_idls_cos_time is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/idls_cos_time";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src.gpr
@@ -43,6 +43,14 @@ library project PolyORB_src is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_corba.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_corba.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_corba.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_corba is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_corba";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_src_corba_dynamicany.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_src_corba_dynamicany.gpr
+++ polyorb-2.11~20140418/projects/polyorb_src_corba_dynamicany.gpr
@@ -40,6 +40,14 @@ library project PolyORB_src_corba_dynami
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/src_corba_dynamicany";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_cos_ir.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_cos_ir.gpr
+++ polyorb-2.11~20140418/projects/polyorb_cos_ir.gpr
@@ -40,6 +40,14 @@ library project PolyORB_cos_ir is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/cos_ir";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_cos_naming.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_cos_naming.gpr
+++ polyorb-2.11~20140418/projects/polyorb_cos_naming.gpr
@@ -40,6 +40,14 @@ library project PolyORB_cos_naming is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/cos_naming";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_cos_notification.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_cos_notification.gpr
+++ polyorb-2.11~20140418/projects/polyorb_cos_notification.gpr
@@ -40,6 +40,14 @@ library project PolyORB_cos_notification
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/cos_notification";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_cos_time.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_cos_time.gpr
+++ polyorb-2.11~20140418/projects/polyorb_cos_time.gpr
@@ -40,6 +40,14 @@ library project PolyORB_cos_time is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/cos_time";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_idls_cos_event.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_idls_cos_event.gpr
+++ polyorb-2.11~20140418/projects/polyorb_idls_cos_event.gpr
@@ -40,6 +40,14 @@ library project PolyORB_idls_cos_event i
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/idls_cos_event";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_idls_cos_naming.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_idls_cos_naming.gpr
+++ polyorb-2.11~20140418/projects/polyorb_idls_cos_naming.gpr
@@ -40,6 +40,14 @@ library project PolyORB_idls_cos_naming
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/idls_cos_naming";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
Index: polyorb-2.11~20140418/projects/polyorb_cos_event.gpr
===================================================================
--- polyorb-2.11~20140418.orig/projects/polyorb_cos_event.gpr
+++ polyorb-2.11~20140418/projects/polyorb_cos_event.gpr
@@ -40,6 +40,14 @@ library project PolyORB_cos_event is
    for Library_ALI_Dir use PolyORB_Common.Build_Dir & "ali/cos_event";
    for Library_Kind use PolyORB_Common.Library_Type;
    for Library_Version use "lib" & Libname & ".so." & PolyORB_Common.Libversion;
+   --  adding hardening options
+   Ldlibs := External_As_List ("LDLIBS", " ");
+   case PolyORB_Common.Library_Type is
+      when "relocatable" =>
+         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
+      when "static" =>
+         null;
+   end case;
 
    package Compiler is
 
--- a/debian/rules.orig	2014-09-26 15:00:26.000000000 +0200
+++ b/debian/rules	2016-09-01 15:54:44.005725238 +0200
@@ -1,7 +1,6 @@
 #!/usr/bin/make -f
 
 include /usr/share/dpkg/default.mk
-include /usr/share/ada/debian_packaging.mk
 
 #                         2 .   8   ~20110207 -1
 #regexp := ^Version: ([^.]+)\.([^.]+)~([^-]*)-(.*)
@@ -63,7 +62,7 @@
 
 override_dh_auto_configure:
 	support/reconfig
-	ADA=gcc-4.9 ./configure --prefix=`pwd`/debian/tmp \
+	ADA=gcc-6 ./configure --prefix=`pwd`/debian/tmp \
 		--enable-debug \
 		--with-appli-perso="corba moma dsa" \
 		--with-proto-perso="giop" \
@@ -91,8 +90,8 @@
 override_dh_auto_build-arch: | $(DIRS)
 #	$(CC) -c -o static/src/csupport.o -Isrc $(CFLAGS) src/csupport.c
 #	$(CC) -c -o relocatable/src/csupport.o -Isrc $(CFLAGS) -fPIC src/csupport.c
-	gcc-4.9 -c -o static/src/csupport.o -Isrc $(CFLAGS) src/csupport.c
-	gcc-4.9 -c -o relocatable/src/csupport.o -Isrc $(CFLAGS) -fPIC src/csupport.c
+	gcc-6 -c -o static/src/csupport.o -Isrc $(CFLAGS) src/csupport.c
+	gcc-6 -c -o relocatable/src/csupport.o -Isrc $(CFLAGS) -fPIC src/csupport.c
 	cp src/config.adc static/src
 	cp src/config.adc relocatable/src
 	cp src/src.exclude static/src
--- a/debian/control.orig	2014-09-26 15:00:26.000000000 +0200
+++ b/debian/control	2016-09-01 15:20:49.113748680 +0200
@@ -5,7 +5,7 @@
 Uploaders: Ludovic Brenta <lbre...@debian.org>
 Build-Depends: debhelper (>= 8.9.7), dpkg-dev (>= 1.16.1),
  dh-ada-library, python-gnatpython,
- automake, autotools-dev, libtool, gnat-4.9, python
+ automake, autotools-dev, libtool, gnat-6, python
 Build-Depends-Indep: ghostscript, texlive-formats-extra,
  texlive-generic-recommended, transfig, texinfo
 Standards-Version: 3.9.5
@@ -29,7 +29,7 @@
 Package: libpolyorb3-dev
 Section: libdevel
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, libpolyorb4 (= ${binary:Version}), g++, gnat-4.9
+Depends: ${misc:Depends}, ${shlibs:Depends}, libpolyorb4 (= ${binary:Version}), g++, gnat-6
 Breaks: libpolyorb2-dev
 Replaces: libpolyorb2-dev
 Recommends: polyorb-servers (= ${binary:Version})

Reply via email to