summaryrefslogtreecommitdiff
path: root/solenv/bin/addsym.awk
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-01-29 17:01:54 +0100
committersb <sb@openoffice.org>2010-01-29 17:01:54 +0100
commit945e82ce2c09f7a816ab48076045d3a94066ad71 (patch)
tree5622e8a3a8e1a6d69b0be97f7cc1cce3bee8fc9f /solenv/bin/addsym.awk
parent16ce2ebd2699104d1504328bf8f70832f7704dd2 (diff)
sb118: #i108776# changed addsym.awk to also export STLport num_put symbols, and simplified it by requiring that first section is labeled UDK_3_0_0; adapted map files accordingly, replacing many individual ones with solenv/src templates
Diffstat (limited to 'solenv/bin/addsym.awk')
-rw-r--r--solenv/bin/addsym.awk30
1 files changed, 9 insertions, 21 deletions
diff --git a/solenv/bin/addsym.awk b/solenv/bin/addsym.awk
index b9a1e6e18f66..eb8d95750fa5 100644
--- a/solenv/bin/addsym.awk
+++ b/solenv/bin/addsym.awk
@@ -29,29 +29,17 @@
#
#*************************************************************************
-# Add symbol patterns _ZTI* and _ZTS* to the global section of version UDK_3_0_0
-# (and if that version is not yet present, add it). For C++ exception handling
-# to work across libraries, it is important that all libraries use those symbols
-# with the same version name.
-#
-# The below code fails with 'perverted' mapfiles (using a strange line layout,
-# or containing version UDK_3_0_0 without a global section, ...).
+# Add certain symbol patterns to the first global section.
BEGIN { state = 0 }
-END {
- if (state == 0) {
- print "# Weak RTTI symbols for C++ exceptions:"
- print "UDK_3_0_0 {"
- print "\tglobal:"
- print "\t_ZTI*; _ZTS*;"
- print "};"
- }
-}
+/\{/ && state == 1 { exit 1 } #TODO: print error explanation to stderr?
+/^[\t ]*UDK_3_0_0[\t ]*\{/ && state == 0 { state = 1 }
+/^[\t ]*global[\t ]*:/ && state == 1 { state = 2 }
+{ print }
state == 2 {
- print " _ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions"
+ print "_ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions"
+ if (ENVIRON["USE_SYSTEM_STL"] != "YES")
+ print "_ZN4_STL7num_put*; # for STLport"
state = 3
}
-# #i66636# - ???
-/^[\t ]*UDK_3_0_0[\t ]*\{/ { state = 1 }
-/^[\t ]*global[\t ]*:/ && state == 1 { state = 2 }
-{ print }
+END { if (state != 3) exit 1 } #TODO: print error explanation to stderr?