From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16828 invoked by alias); 29 Apr 2003 01:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 16784 invoked by uid 71); 29 Apr 2003 01:36:01 -0000 Resent-Date: 29 Apr 2003 01:36:01 -0000 Resent-Message-ID: <20030429013601.16783.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, joel@oarcorp.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, corsepiu@faw.uni-ulm.de Received: (qmail 15918 invoked by uid 48); 29 Apr 2003 01:33:43 -0000 Message-Id: <20030429013343.15917.qmail@sources.redhat.com> Date: Tue, 29 Apr 2003 01:36:00 -0000 From: corsepiu@faw.uni-ulm.de Reply-To: corsepiu@faw.uni-ulm.de To: gcc-gnats@gcc.gnu.org Cc: joel@oarcorp.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: joel@oarcorp.com Subject: other/10532: include-path broken for cross-gccs (PREFIX_INCLUDE_DIR) X-SW-Source: 2003-04/txt/msg01313.txt.bz2 List-Id: >Number: 10532 >Category: other >Synopsis: include-path broken for cross-gccs (PREFIX_INCLUDE_DIR) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Apr 29 01:36:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: corsepiu@faw.uni-ulm.de >Release: gcc-3.2.x, gcc-3.3, gcc-3.4 >Organization: >Environment: Any. >Description: Any cross-gcc has $prefix/include before $prefix//include and $prefix/lib/gcc-lib///include in its include-path. This is not correct, because $prefix/include for cross-gccs contains host-headers, not target-headers, like it does for native gccs and therefore bogusly pulls-in host headers. >How-To-Repeat: Build a cross-gcc and examine the include-path Example: touch tmp.c i386-rtems-gcc -v -o tmp.o -c tmp.c gcc version 3.2.2 (OAR Corporation gcc-3.2.2-20030425/newlib-1.11.0-20030416a-0_rc_10) /opt/rtems/lib/gcc-lib/i386-rtems/3.2.2/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=2 -D__GXX_ABI_VERSION=102 -D__rtems__ -D__ELF__ -D__i386__ -D__USE_INIT_FINI__ -D__rtems__ -D__ELF__ -D__i386__ -D__USE_INIT_FINI__ -Asystem=rtems -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ tmp.c -quiet -dumpbase tmp.c -version -o /tmp/cc66lQPD.s GNU CPP version 3.2.2 (OAR Corporation gcc-3.2.2-20030425/newlib-1.11.0-20030416a-0_rc_10) (cpplib) (i386 bare ELF target) GNU C version 3.2.2 (OAR Corporation gcc-3.2.2-20030425/newlib-1.11.0-20030416a-0_rc_10) (i386-rtems) compiled by GNU C version 3.2.2 20030313 (Red Hat Linux 3.2.2-10). ignoring nonexistent directory "/opt/rtems/i386-rtems/sys-include" #include "..." search starts here: #include <...> search starts here: /opt/rtems/include /opt/rtems/lib/gcc-lib/i386-rtems/3.2.2/include /opt/rtems/i386-rtems/include End of search list. >Fix: The cause of this seems to be PREFIX_INCLUDE_DIR in gcc/configure.in. The patch in the attachment works around this issue by #undef'ing PREFIX_INCLUDE_DIR in cppdefaults.h for cross-compilation. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="gcc-3.2.2-prefix-include-dir.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gcc-3.2.2-prefix-include-dir.diff" LS0tIC91c3IvbG9jYWwvc3JjL3BhY2thZ2VzL2djYy9zdWJ2ZXJzaW9ucy9nY2MtMy4yLjIvZ2Nj L2NwcGRlZmF1bHQuaAkyMDAxLTEwLTE0IDA5OjM1OjA3LjAwMDAwMDAwMCArMDIwMAorKysgZ2Nj LTMuMi4yL2djYy9jcHBkZWZhdWx0LmgJMjAwMy0wNC0yOCAyMzo1Mzo0OC4wMDAwMDAwMDAgKzAy MDAKQEAgLTM4LDYgKzM4LDcgQEAKICN1bmRlZiBMT0NBTF9JTkNMVURFX0RJUgogI3VuZGVmIFNZ U1RFTV9JTkNMVURFX0RJUgogI3VuZGVmIFNUQU5EQVJEX0lOQ0xVREVfRElSCisjdW5kZWYgUFJF RklYX0lOQ0xVREVfRElSCiAjZWxzZQogI3VuZGVmIENST1NTX0lOQ0xVREVfRElSCiAjZW5kaWYK