summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTupone Alfredo <tupone@gentoo.org>2017-03-28 09:40:26 +0200
committerTupone Alfredo <tupone@gentoo.org>2017-03-28 09:41:37 +0200
commit5aba73dd0d66c48ba20fc55151156ca1492c4549 (patch)
tree3e88762a26a544a43bbf9c92b3cd665ded0ceda9 /dev-ada
parentx11-plugins/asmem: ppc ppc64 stable (bug 613916). (diff)
downloadgentoo-5aba73dd0d66c48ba20fc55151156ca1492c4549.tar.gz
gentoo-5aba73dd0d66c48ba20fc55151156ca1492c4549.tar.bz2
gentoo-5aba73dd0d66c48ba20fc55151156ca1492c4549.zip
dev-ada/gprbuild: Fix executable stack
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch162
-rw-r--r--dev-ada/gprbuild/gprbuild-2016.ebuild8
2 files changed, 167 insertions, 3 deletions
diff --git a/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch b/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch
new file mode 100644
index 000000000000..952c2c0a69d4
--- /dev/null
+++ b/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch
@@ -0,0 +1,162 @@
+diff -Naur gprbuild-gpl-2016-src.old/src/gprbuild-main.adb gprbuild-gpl-2016-src/src/gprbuild-main.adb
+--- gprbuild-gpl-2016-src.old/src/gprbuild-main.adb 2017-03-28 09:12:24.205058242 +0200
++++ gprbuild-gpl-2016-src/src/gprbuild-main.adb 2017-03-28 09:21:20.495344963 +0200
+@@ -52,7 +52,8 @@
+ with GPR.Tempdir; use GPR.Tempdir;
+ with GPR.Tree; use GPR.Tree;
+ with GPR.Util; use GPR.Util;
++with Gprbuild.Sigint_Intercepted;
+
+ procedure Gprbuild.Main is
+
+ use Stamps;
+@@ -124,11 +124,6 @@
+ pragma Import (C, Install_Int_Handler, "__gnat_install_int_handler");
+ -- Called by Gnatmake to install the SIGINT handler below
+
+- procedure Sigint_Intercepted;
+- pragma Convention (C, Sigint_Intercepted);
+- -- Called when the program is interrupted by Ctrl-C to delete the
+- -- temporary mapping files and configuration pragmas files.
+-
+ No_Object_Check_Switch : constant String := "--no-object-check";
+ Direct_Import_Only_Switch : constant String := "--direct-import-only";
+ Indirect_Imports_Switch : constant String := "--indirect-imports";
+@@ -1616,22 +1611,6 @@
+ end if;
+ end Scan_Arg;
+
+- ------------------------
+- -- Sigint_Intercepted --
+- ------------------------
+-
+- procedure Sigint_Intercepted is
+- begin
+- Put_Line ("*** Interrupted ***");
+- Delete_All_Temp_Files (Project_Tree.Shared);
+-
+- if Distributed_Mode then
+- Compilation.Slave.Unregister_Remote_Slaves (From_Signal => True);
+- end if;
+-
+- OS_Exit (1);
+- end Sigint_Intercepted;
+-
+ ----------------
+ -- Initialize --
+ ----------------
+@@ -2293,7 +2272,7 @@
+
+ -- And install Ctrl-C handler
+
+- Install_Int_Handler (Sigint_Intercepted'Unrestricted_Access);
++ Install_Int_Handler (Gprbuild.Sigint_Intercepted'Unrestricted_Access);
+
+ -- Check command line arguments. These will be overridden when looking
+ -- for the configuration file
+diff -Naur gprbuild-gpl-2016-src.old/src/gprbuild-sigint_intercepted.adb gprbuild-gpl-2016-src/src/gprbuild-sigint_intercepted.adb
+--- gprbuild-gpl-2016-src.old/src/gprbuild-sigint_intercepted.adb 1970-01-01 01:00:00.000000000 +0100
++++ gprbuild-gpl-2016-src/src/gprbuild-sigint_intercepted.adb 2017-03-28 09:20:00.661792854 +0200
+@@ -0,0 +1,20 @@
++------------------------
++-- Sigint_Intercepted --
++------------------------
++
++with Ada.Text_IO; use Ada.Text_IO;
++with Gpr_Util; use Gpr_Util;
++with Gprbuild.Compile;
++with Gprbuild.Compilation.Slave;
++
++procedure Gprbuild.Sigint_Intercepted is
++begin
++ Put_Line ("*** Interrupted ***");
++ Delete_All_Temp_Files (Project_Tree.Shared);
++
++ if Distributed_Mode then
++ Compilation.Slave.Unregister_Remote_Slaves (From_Signal => True);
++ end if;
++
++ OS_Exit (1);
++end Gprbuild.Sigint_Intercepted;
+diff -Naur gprbuild-gpl-2016-src.old/src/gprbuild-sigint_intercepted.ads gprbuild-gpl-2016-src/src/gprbuild-sigint_intercepted.ads
+--- gprbuild-gpl-2016-src.old/src/gprbuild-sigint_intercepted.ads 1970-01-01 01:00:00.000000000 +0100
++++ gprbuild-gpl-2016-src/src/gprbuild-sigint_intercepted.ads 2017-03-28 09:15:35.275616543 +0200
+@@ -0,0 +1,4 @@
++procedure Gprbuild.Sigint_Intercepted;
++pragma Convention (C, Sigint_Intercepted);
++-- Called when the program is interrupted by Ctrl-C to delete the
++-- temporary mapping files and configuration pragmas files.
+diff -Naur gprbuild-gpl-2016-src.old/src/gprinstall-main.adb gprbuild-gpl-2016-src/src/gprinstall-main.adb
+--- gprbuild-gpl-2016-src.old/src/gprinstall-main.adb 2017-03-28 09:12:24.205058242 +0200
++++ gprbuild-gpl-2016-src/src/gprinstall-main.adb 2017-03-28 09:25:36.515709886 +0200
+@@ -42,6 +42,7 @@
+ with Gprinstall.DB;
+ with Gprinstall.Install;
+ with Gprinstall.Uninstall;
++with Gprinstall.Sigint_Intercepted;
+
+ procedure Gprinstall.Main is
+
+@@ -94,11 +94,6 @@
+ pragma Import (C, Install_Int_Handler, "__gnat_install_int_handler");
+ -- Called by Gnatmake to install the SIGINT handler below
+
+- procedure Sigint_Intercepted;
+- pragma Convention (C, Sigint_Intercepted);
+- -- Called when the program is interrupted by Ctrl-C to delete the
+- -- temporary mapping files and configuration pragmas files.
+-
+ ---------------
+ -- Copyright --
+ ---------------
+@@ -514,17 +509,6 @@
+ end if;
+ end Scan_Arg;
+
+- ------------------------
+- -- Sigint_Intercepted --
+- ------------------------
+-
+- procedure Sigint_Intercepted is
+- begin
+- Put_Line ("*** Interrupted ***");
+- Delete_All_Temp_Files (Project_Tree.Shared);
+- OS_Exit (1);
+- end Sigint_Intercepted;
+-
+ ----------------
+ -- Initialize --
+ ----------------
+@@ -862,7 +846,7 @@
+
+ -- And install Ctrl-C handler
+
+- Install_Int_Handler (Sigint_Intercepted'Unrestricted_Access);
++ Install_Int_Handler (Gprinstall.Sigint_Intercepted'Unrestricted_Access);
+
+ -- Check command line arguments. These will be overridden when looking
+ -- for the configuration file
+diff -Naur gprbuild-gpl-2016-src.old/src/gprinstall-sigint_intercepted.adb gprbuild-gpl-2016-src/src/gprinstall-sigint_intercepted.adb
+--- gprbuild-gpl-2016-src.old/src/gprinstall-sigint_intercepted.adb 1970-01-01 01:00:00.000000000 +0100
++++ gprbuild-gpl-2016-src/src/gprinstall-sigint_intercepted.adb 2017-03-28 09:24:50.307545617 +0200
+@@ -0,0 +1,12 @@
++------------------------
++-- Sigint_Intercepted --
++------------------------
++
++with Ada.Text_IO; use Ada.Text_IO;
++
++procedure Gprinstall.Sigint_Intercepted is
++begin
++ Put_Line ("*** Interrupted ***");
++ Delete_All_Temp_Files (Project_Tree.Shared);
++ OS_Exit (1);
++end Gprinstall.Sigint_Intercepted;
+diff -Naur gprbuild-gpl-2016-src.old/src/gprinstall-sigint_intercepted.ads gprbuild-gpl-2016-src/src/gprinstall-sigint_intercepted.ads
+--- gprbuild-gpl-2016-src.old/src/gprinstall-sigint_intercepted.ads 1970-01-01 01:00:00.000000000 +0100
++++ gprbuild-gpl-2016-src/src/gprinstall-sigint_intercepted.ads 2017-03-28 09:22:18.462294461 +0200
+@@ -0,0 +1,4 @@
++procedure Gprinstall.Sigint_Intercepted;
++pragma Convention (C, Sigint_Intercepted);
++-- Called when the program is interrupted by Ctrl-C to delete the
++-- temporary mapping files and configuration pragmas files.
diff --git a/dev-ada/gprbuild/gprbuild-2016.ebuild b/dev-ada/gprbuild/gprbuild-2016.ebuild
index 57eee67bea64..03d3c2baa53e 100644
--- a/dev-ada/gprbuild/gprbuild-2016.ebuild
+++ b/dev-ada/gprbuild/gprbuild-2016.ebuild
@@ -25,6 +25,8 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}"/${MYP}-src
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
pkg_setup() {
GCC=${ADA:-$(tc-getCC)}
local base=$(basename ${GCC})
@@ -53,14 +55,14 @@ src_compile() {
incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
-I${xmlada_src}/schema -I${xmlada_src}/unicode \
-I${xmlada_src}/input_sources"
- ${GCC} -c ${CFLAGS} src/gpr_imports.c -o gpr_imports.o
+ ${GCC} -c ${CFLAGS} src/gpr_imports.c -o gpr_imports.o || die
for bin in ${bin_progs}; do
${GNATMAKE} -j$(makeopts_jobs) ${incflags} $ADAFLAGS ${bin}-main \
- -o ${bin} -largs gpr_imports.o
+ -o ${bin} -largs gpr_imports.o || die
done
for lib in $lib_progs; do
${GNATMAKE} -j$(makeopts_jobs) ${incflags} ${lib} $ADAFLAGS \
- -largs gpr_imports.o
+ -largs gpr_imports.o || die
done
}