On Wed, Jan 6, 2021 at 1:55 PM Marc Glisse <marc.gli...@inria.fr> wrote:
>
> On Wed, 6 Jan 2021, David Edelsohn via Gcc-patches wrote:
>
> > Currently the type of streamoff is determined at libstdc++ configure
> > time, chosen by the definitions of _GLIBCXX_HAVE_INT64_T_LONG and
> > _GLIBCXX_HAVE_INT64_T_LONG_LONG.  For a multilib configuration, the
> > difference is encoded in the different multilib header file paths.
> > For "FAT" library targets that package 32 bit and 64 bit libraries
> > together, G++ also expects a single header file directory hierarchy,
> > causing an incorrect value for streamoff in some situations.
>
> Shouldn't we change that? I don't see why using the same directory for
> linking should imply using the same directory for includes.

First, the search path assumption is rather strongly embedded in the
GCC driver in somewhat delicate code.  There already is a lot of
fragile, complicated processing for multilibs and search paths and
exception.  It is more risky, both in the potential new search logic
and in possible breakage, to perform surgery on the multilib support
code.

Second, it's confusing and error-prone to have different search
behavior for different parts of the compiler until we can completely
remove multilib headers.

Third, there is no inherent reason that the header files should be
multilib-dependent.  I'm not trying to boil the ocean and remove all
multilib differences in headers.  I'm trying to solve specific issues
caused by the differences in header files that also happen to move GCC
in a direction of less multilib differences encoded in header files,
which I think is a GOOD THING[tm].

Thanks, David

Reply via email to