Control: tags -1 patch

What broke the build is that gcc 6 changed the default C++ standard
from C++98 to C++14.

Not all valid C++98 code is also valid C++11 and C++14 code.

Note that this just changed the default, when told to process C++98 code 
gcc 6 does not differ in any significant way from gcc 5.

Making the code compatible with C++14 would be the best possible 
solution, but as a workaround it is possible to fix the build with
this change to tell gcc that this is C++98 code.

CXXFLAGS set in debian/rules were not used at all, this is also fixed.

--- debian/rules.old    2016-11-21 21:00:13.000000000 +0000
+++ debian/rules        2016-11-21 21:02:13.000000000 +0000
@@ -15,6 +15,8 @@
        CXXFLAGS += -O2
 endif
 
+CXXFLAGS += -std=gnu++98
+
 # shared library versions,
 version=`ls src/.libs/lib*.so.* | \
 awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
@@ -33,7 +35,7 @@
 
 configure-stamp: config-stamp
        dh_testdir
-       CFLAGS="$(CFLAGS) -Wl,-z,defs" \
+       CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS) -Wl,-z,defs" \
         ./configure --host=$(DEB_HOST_GNU_TYPE) \
         --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
         --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Reply via email to