Paolo Bonzini <bonz...@gnu.org> writes: > Il 02/12/2013 20:34, Richard Sandiford ha scritto: >>>> >> I followed Joseph's suggestion and reused longlong.h. I copied it from >>>> >> libgcc rather than glibc since it seemed better for GCC to have a single >>>> >> version across both gcc/ and libgcc/. I can put it in include/ if that >>>> >> seems better. >>> > >>> > Actually copying complex code like this does not seem maintainable. I >>> > think there needs to be only one copy in the GCC sources. If that >>> > requires moving it back from libgcc to gcc, or moving it to include, >>> > do that. >> OK, will do, but which do you prefer? > > libgcc/ should not use gcc/ sources too much. Please put it in include/.
OK, how about this, against trunk? Tested on x86_64-linux-gnu. Thanks, Richard include/ * longlong.h: New file. libgcc/ * longlong.h: Delete (moved to include/). libquadmath/ * Makefile.am (AM_CPPFLAGS): Define. * Makefile.in: Regenerate. * printf/gmp-impl.h: Remove path from longlong.h include. Index: libquadmath/Makefile.am =================================================================== --- libquadmath/Makefile.am 2012-11-03 09:21:21.000000000 +0000 +++ libquadmath/Makefile.am 2013-12-03 19:30:02.551636610 +0000 @@ -6,6 +6,7 @@ AUTOMAKE_OPTIONS = 1.8 foreign ## Skip over everything if the quadlib is not available: if BUILD_LIBQUADMATH ACLOCAL_AMFLAGS = -I .. -I ../config +AM_CPPFLAGS = -I $(top_srcdir)/../include ## May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) Index: libquadmath/Makefile.in =================================================================== --- libquadmath/Makefile.in 2013-11-18 14:46:49.994728318 +0000 +++ libquadmath/Makefile.in 2013-12-03 19:31:06.828134039 +0000 @@ -310,6 +310,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.8 foreign @BUILD_LIBQUADMATH_TRUE@ACLOCAL_AMFLAGS = -I .. -I ../config +@BUILD_LIBQUADMATH_TRUE@AM_CPPFLAGS = -I $(top_srcdir)/../include @BUILD_LIBQUADMATH_TRUE@gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_FALSE@version_arg = @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_GNU_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_arg = -Wl,--version-script=$(srcdir)/quadmath.map Index: libquadmath/printf/gmp-impl.h =================================================================== --- libquadmath/printf/gmp-impl.h 2013-12-03 19:20:58.167441116 +0000 +++ libquadmath/printf/gmp-impl.h 2013-12-03 19:21:07.093509627 +0000 @@ -60,7 +60,7 @@ #define attribute_hidden __attribute__(( #define attribute_hidden #endif -#include "../../libgcc/longlong.h" +#include "longlong.h" /* Copy NLIMBS *limbs* from SRC to DST. */ #define MPN_COPY_INCR(DST, SRC, NLIMBS) \