patch to fix for g++ -O3
David Fang <[email protected]> Fri, 5 Jan 2007 15:26:26 -0500 (EST)
| Newsgroups | gmane.comp.gnu.aspell.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi folks, Attached is a little patch for aspell-0.60.5. The patch has two parts: 1) Makefile.am: corrected some path references to various perl scripts and generated files so the project builds correctly with a VPATH build (when srcdir != builddir). I don't consider this critical, but nevertheless I offer it up. (I excluded the Makefile.in changes because my autotools used in autoreconf are slightly newer.) 2) common/string_map.cpp: explicitly instantiate HashTable::erase, which is needed for the library, but sometimes dropped at higher optimization levels (because it is only implicitly instantiated). Tested against a g++-4.2 prerelease, original link-fail reported against g++-4.1 -O3 by Chris Clayton (CC'd) to gcc-bugs. Fang _______________________________________________ Aspell-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/aspell-devel
aspell-0.60.5.patch
(text/plain, 2.6 KB)
diff -u -r aspell-0.60.5/Makefile.am aspell-0.60.5-patched/Makefile.am
--- aspell-0.60.5/Makefile.am 2006-12-10 22:36:41.000000000 -0500
+++ aspell-0.60.5-patched/Makefile.am 2007-01-05 13:56:43.000000000 -0500
@@ -12,7 +12,7 @@
PERLPROG = @PERLPROG@
-AM_CPPFLAGS = -I${srcdir}/gen -I${srcdir}/common \
+AM_CPPFLAGS = -Igen -I${srcdir}/common \
-I${srcdir}/interfaces/cc/ -I${srcdir}/modules/speller/default/
SUFFIXES = .info
@@ -237,15 +237,18 @@
opt_DATA = $(dynamic_optfiles)
filter_DATA = $(fltfiles)
+PREPEND_SRCDIR_AWK = $(AWK) '{ ntoks=split($$0,toks); for(i=0;i<ntoks;++i) print "$(srcdir)/" toks[i]; }'
+
# settings.h added as a dependency so it will get recreated if
# the COMPILE_IN_FILTERS option changes
-gen/static_filters.src.cpp: ${static_optfiles} gen/mk-static-filter.pl gen/settings.h
- ${PERLPROG} gen/mk-static-filter.pl ${static_optfiles}
+gen/static_filters.src.cpp: ${static_optfiles} $(srcdir)/gen/mk-static-filter.pl gen/settings.h
+ ${PERLPROG} $(srcdir)/gen/mk-static-filter.pl \
+ `echo "${static_optfiles}" | $(PREPEND_SRCDIR_AWK)`
lib/new_filter.cpp: gen/static_filters.src.cpp
-gen/filter.pot: gen/mk-filter-pot.pl ${static_optfiles} ${dynamic_optfiles}
- ${PERLPROG} gen/mk-filter-pot.pl
+gen/filter.pot: $(srcdir)/gen/mk-filter-pot.pl ${static_optfiles} ${dynamic_optfiles}
+ ${PERLPROG} $(srcdir)/gen/mk-filter-pot.pl
EXTRA_DIST += ${static_optfiles} ${dynamic_optfiles} ${fltfiles} \
gen/mk-static-filter.pl gen/mk-filter-pot.pl\
@@ -260,8 +263,8 @@
common/config.cpp: gen/dirs.h
-gen/dirs.h: gen/mk-dirs_h.pl
- cd gen; perl mk-dirs_h.pl ${prefix} ${pkgdatadir} ${pkglibdir} ${sysconfdir} > dirs.h
+gen/dirs.h: $(srcdir)/gen/mk-dirs_h.pl
+ cd gen; perl ../$(srcdir)/gen/mk-dirs_h.pl ${prefix} ${pkgdatadir} ${pkglibdir} ${sysconfdir} > dirs.h
EXTRA_DIST += gen/mk-dirs_h.pl
CLEANFILES += gen/dirs.h
diff -u -r aspell-0.60.5/common/string_map.cpp aspell-0.60.5-patched/common/string_map.cpp
--- aspell-0.60.5/common/string_map.cpp 2006-01-22 08:04:46.000000000 -0500
+++ aspell-0.60.5-patched/common/string_map.cpp 2007-01-05 15:07:36.000000000 -0500
@@ -23,6 +23,8 @@
HashTable<StringMap::Parms>::insert(const StringPair &);
template void HashTable<StringMap::Parms>::init(unsigned int);
template void HashTable<StringMap::Parms>::del(void);
+ template HashTable<StringMap::Parms>::size_type
+ HashTable<StringMap::Parms>::erase(char const* const&);
template void BlockSList<StringPair>::clear(void);
void StringMap::copy(const StringMap & other)