https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65998

            Bug ID: 65998
           Summary: please support multiarch for the user search paths
                    (CPATH, etc.)
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincent-gcc at vinc17 dot net
  Target Milestone: ---

cpp currently supports multiarch search paths for /usr/local and /usr, but not
for directories supplied via environment variables like $CPATH and
$C_INCLUDE_PATH. For instance, "cpp -v" gives:

/usr/local/include/x86_64-linux-gnu
/usr/local/include
[...]
/usr/include/x86_64-linux-gnu
/usr/include

and when adding the -m32 option:

/usr/local/include/i386-linux-gnu
/usr/local/include
[...]
/usr/include/i386-linux-gnu
/usr/include

But if I use CPATH=/home/vlefevre/include, I just get:

/home/vlefevre/include

in the cpp output (while the subdirectories
/home/vlefevre/include/x86_64-linux-gnu and
/home/vlefevre/include/i386-linux-gnu exist too).

Adding the other subdirectory to $CPATH is not a good solution because one
doesn't always know the ABI (whether -m32 is present or not) in advance, i.e.
one doesn't know in advance which directory to add to $CPATH.

Reply via email to