From 629ceec208ad5fe9f5d201fc42fce611e55c567d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 17 Sep 2015 19:04:42 -0700 Subject: Update qversiontagging.cpp not to use too much assembler magic The only reason I had used them in the first place was because C preprocessor macros cannot call themselves recursively. But the magic was too magic and caused issues with some builds, so let's choose the safer option. Anyway, this solution now works for all ELF architectures, independent of the processor, whereas previously it was restricted to x86 and Linux/ FreeBSD. However, this does not apply to the assembly in qversiontagging.h. Change-Id: I42e7ef1a481840699a8dffff1404f032fc5cacb8 Reviewed-by: Lars Knoll --- mkspecs/features/qt_module.prf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 3c0526055c..b623d68767 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -196,10 +196,14 @@ unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static { } else { current = Qt_$$QT_MAJOR_VERSION verscript_content = "$$current { *; };" - for(i, 0..$$section(VERSION, ., 1, 1)) { + isEmpty(QT_NAMESPACE): tag_symbol = qt_version_tag + else: tag_symbol = qt_version_tag_$$QT_NAMESPACE + + for(i, 0..$$QT_MINOR_VERSION) { previous = $$current current = Qt_$${QT_MAJOR_VERSION}.$$i - verscript_content += "$$current {} $$previous;" + equals(i, $$QT_MINOR_VERSION): verscript_content += "$$current { $$tag_symbol; } $$previous;" + else: verscript_content += "$$current {} $$previous;" } } write_file($$verscript, verscript_content)|error("Aborting.") -- cgit v1.2.3