summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2017-03-13 17:54:29 +0100
committerMichael Haubenwallner <haubi@gentoo.org>2017-03-13 18:11:05 +0100
commite46b5ca5b49028528245dec068bee7e9b8a22878 (patch)
tree1954e4c906ea5388caf40d7684763b39e5fe4483
parentdev-python/pypax: Add python3_5 support (diff)
downloadgentoo-e46b5ca5b49028528245dec068bee7e9b8a22878.tar.gz
gentoo-e46b5ca5b49028528245dec068bee7e9b8a22878.tar.bz2
gentoo-e46b5ca5b49028528245dec068bee7e9b8a22878.zip
ELT-patches/aixrtl: fix exclude_expsyms for C++ exceptions
On AIX, GNU g++ generates _GLOBAL__* symbols as, amongst others, landing pads for C++ exceptions. These symbols must not be exported from shared libraries, or exception handling may break for applications with runtime linking enabled.
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-expsym-c4
-rw-r--r--eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx4
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-expsym-c4
-rw-r--r--eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx4
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.0-expsym-c4
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx4
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.4-expsym-c21
-rw-r--r--eclass/ELT-patches/aixrtl/2.4.4-expsym-cxx21
8 files changed, 60 insertions, 6 deletions
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-expsym-c b/eclass/ELT-patches/aixrtl/1.5.0-expsym-c
index 2b54887d8fcd..13419b205da1 100644
--- a/eclass/ELT-patches/aixrtl/1.5.0-expsym-c
+++ b/eclass/ELT-patches/aixrtl/1.5.0-expsym-c
@@ -1,14 +1,16 @@
--- configure
+++ configure
-@@ -7113,9 +7113,9 @@
+@@ -7113,9 +7113,11 @@
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
fi
aix_use_runtimelinking=no
diff --git a/eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx b/eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx
index 9b6bdc2f9526..561bc54d76c9 100644
--- a/eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx
+++ b/eclass/ELT-patches/aixrtl/1.5.0-expsym-cxx
@@ -1,14 +1,16 @@
--- configure
+++ configure
-@@ -11217,9 +11217,9 @@
+@@ -11217,9 +11217,11 @@
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
fi
;;
pw32*)
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-expsym-c b/eclass/ELT-patches/aixrtl/2.2.0-expsym-c
index 196a5a36e60c..c74cee20c128 100644
--- a/eclass/ELT-patches/aixrtl/2.2.0-expsym-c
+++ b/eclass/ELT-patches/aixrtl/2.2.0-expsym-c
@@ -1,14 +1,16 @@
--- configure
+++ configure
-@@ -8475,9 +8475,9 @@
+@@ -8475,9 +8475,11 @@
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
fi
aix_use_runtimelinking=no
diff --git a/eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx b/eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx
index ee4d163989dd..1b7e9b8ee0a2 100644
--- a/eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx
+++ b/eclass/ELT-patches/aixrtl/2.2.0-expsym-cxx
@@ -1,14 +1,16 @@
--- configure
+++ configure
-@@ -15506,9 +15506,9 @@
+@@ -15506,9 +15506,11 @@
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
fi
;;
pw32*)
diff --git a/eclass/ELT-patches/aixrtl/2.4.0-expsym-c b/eclass/ELT-patches/aixrtl/2.4.0-expsym-c
index 6860317739a7..1538a6225dc7 100644
--- a/eclass/ELT-patches/aixrtl/2.4.0-expsym-c
+++ b/eclass/ELT-patches/aixrtl/2.4.0-expsym-c
@@ -1,14 +1,16 @@
--- configure
+++ configure
-@@ -9660,9 +9660,9 @@
+@@ -9660,9 +9660,11 @@
# Also, AIX nm treats weak defined symbols like other global
# defined symbols, whereas GNU nm marks them as "W".
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
fi
aix_use_runtimelinking=no
diff --git a/eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx b/eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx
index ca9fd97be522..1fba0b9405e7 100644
--- a/eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx
+++ b/eclass/ELT-patches/aixrtl/2.4.0-expsym-cxx
@@ -1,14 +1,16 @@
--- configure
+++ configure
-@@ -15711,9 +15711,9 @@
+@@ -15711,9 +15711,11 @@
# Also, AIX nm treats weak defined symbols like other global defined
# symbols, whereas GNU nm marks them as "W".
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='`echo $NM | sed -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
fi
;;
pw32*)
diff --git a/eclass/ELT-patches/aixrtl/2.4.4-expsym-c b/eclass/ELT-patches/aixrtl/2.4.4-expsym-c
new file mode 100644
index 000000000000..f79c0f6b7ce7
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.4.4-expsym-c
@@ -0,0 +1,21 @@
+commit 2dfd834840a9de8ce3866af1cf8f3aff9b1a15e8
+Author: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
+Date: Wed Mar 2 15:06:48 2016 +0100
+
+ AIX: Stop exporting any _GLOBAL__ symbol.
+
+ * m4/libtool.m4 (_LT_LINKER_SHLIBS): On AIX, GNU g++ generates
+ _GLOBAL__* symbols as, amongst others, landing pads for C++ exceptions.
+ These symbols must not be exported from shared libraries, or exception
+ handling may break for applications with runtime linking enabled.
+
+--- configure
++++ configure
+@@ -5446,6 +5447,7 @@ _LT_EOF
+ # symbols only, and the '-p' flag disables sorting to improve
+ # performance. For the weak symbol handling see the CXX tag.
+ export_symbols_cmds='$NM -gp $libobjs $convenience | $global_symbol_pipe | $EGREP -v " ($exclude_expsyms)$" | awk '\''{ kw = "" } /^([[CVWZ]]|[[BDLT]]\*) / { kw = " weak" } { print $ 3 kw }'\'' | sort -u > $export_symbols'
++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
diff --git a/eclass/ELT-patches/aixrtl/2.4.4-expsym-cxx b/eclass/ELT-patches/aixrtl/2.4.4-expsym-cxx
new file mode 100644
index 000000000000..abb41e6d25bb
--- /dev/null
+++ b/eclass/ELT-patches/aixrtl/2.4.4-expsym-cxx
@@ -0,0 +1,21 @@
+commit 2dfd834840a9de8ce3866af1cf8f3aff9b1a15e8
+Author: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
+Date: Wed Mar 2 15:06:48 2016 +0100
+
+ AIX: Stop exporting any _GLOBAL__ symbol.
+
+ * m4/libtool.m4 (_LT_LINKER_SHLIBS): On AIX, GNU g++ generates
+ _GLOBAL__* symbols as, amongst others, landing pads for C++ exceptions.
+ These symbols must not be exported from shared libraries, or exception
+ handling may break for applications with runtime linking enabled.
+
+--- configure
++++ configure
+@@ -5000,6 +5000,7 @@ m4_if([$1], [CXX], [
+ # '[[BDLT]]*' with AIX nm in default mode (POSIX like)
+ # '[[CVW]]' with GNU nm in either BSD or POSIX mode
+ export_symbols_cmds_CXX='$NM -gp $libobjs $convenience | $global_symbol_pipe | $EGREP -v " ($exclude_expsyms)$" | awk '\''{ kw = "" } /^([[CVWZ]]|[[BDLT]]\*) / { kw = " weak" } { print $ 3 kw }'\'' | sort -u > $export_symbols'
++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX=$ltdll_cmds