From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15040 invoked by alias); 10 Feb 2013 23:04:32 -0000 Received: (qmail 14843 invoked by uid 48); 10 Feb 2013 23:04:16 -0000 From: "karlson2k at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/56279] Unwanted directory is added to include search path when building for MingGW with --native-system-header-dir Date: Sun, 10 Feb 2013 23:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: karlson2k at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg00995.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56279 --- Comment #1 from Evgeny Grin 2013-02-10 23:04:16 UTC --- This unwanted dir is added by blindly overriding directory in gcc/config/i386/mingw32.h: #undef NATIVE_SYSTEM_HEADER_DIR #define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" as result of fixing bug 52947. I think, it needs more improvement. At least for MinGW this directory should be relative to GCC files, as other include dirs. And cppdefault.c should be corrected like this: #ifdef NATIVE_SYSTEM_HEADER_DIR /* /usr/include comes dead last. */ { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, NATIVE_SYSTEM_HEADER_DIR_ADD_SYSROOT, 0 }, #endif similar to GPLUSPLUS_INCLUDE_DIR part in cppdefault.c.