delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/07/11/09:25:59

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Message-ID: <COL101-W55D82DCD06860954FF8BD9E6900@phx.gbl>
X-Originating-IP: [76.121.182.92]
From: Jay <jayk123 AT hotmail DOT com>
To: <djgpp AT delorie DOT com>
Subject: sysroot vs. /usr/include vs. /include?
Date: Fri, 11 Jul 2008 13:12:51 +0000
Importance: Normal
In-Reply-To: <200807110405.m6B451vV027439@delorie.com>
References: <200807110405 DOT m6B451vV027439 AT delorie DOT com>
MIME-Version: 1.0
X-OriginalArrivalTime: 11 Jul 2008 13:12:51.0382 (UTC) FILETIME=[D2879560:01C8E357]
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m6BDPO01015828
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

I understand this small problem.
Am curious for consensus on what to do about it.

toplevel gcc configure:


  $ /src/gcc431/configure  
    -disable-bootstrap  
    -disable-nls  
    -enable-languages=c,c++  
    -disable-werror  
    -target i586-pc-msdosdjgpp  
    -without-libiconv-prefix  
    -with-sysroot           <<<<   


 resulting libgcc configure which fails, not actually interesting: 


  $ /src/gcc431/libgcc/configure 
    --cache-file=./config.cache 
    --enable-multilib 
    --with-cross-host=i686-pc-cygwin 
    -disable-bootstrap 
    -disable-nls 
    -enable-languages=c,c++ 
    -disable-werror 
    -without-libiconv-prefix 
    -with-sysroot             <<<< 
    --enable-languages=c,c++ 
    --program-transform-name=s,^,i586-pc-msdosdjgpp-, 
    --with-target-subdir=i586-pc-msdosdjgpp 
    --build=i686-pc-cygwin 
    --host=i586-pc-msdosdjgpp 
    --target=i586-pc-msdosdjgpp 
    --srcdir=/src/gcc431/libgcc 


 libgcc/configure result: 


In file included from conftest.c:10:
/obj/gcc/./gcc/include-fixed/stdio.h:27:25: error: sys/version.h: No such file or directory
/obj/gcc/./gcc/include-fixed/stdio.h:28:25: error: sys/djtypes.h: No such file or directory


actual file locations:


C:\cygwin\usr\local\i586-pc-msdosdjgpp\sys-root\include\sys\djtypes.h
C:\cygwin\usr\local\i586-pc-msdosdjgpp\sys-root\include\sys\version.h


gcc invocations in config.log (slightly confusing, seems
intermixed with output to user):


configure:2747: checking for /obj/gcc/./gcc/xgcc -B/obj/gcc/./gcc/
    -B/usr/local/i586-pc-msdosdjgpp/bin/
    -B/usr/local/i586-pc-msdosdjgpp/lib/
    -isystem /usr/local/i586-pc-msdosdjgpp/include
    -isystem /usr/local/i586-pc-msdosdjgpp/sys-include
    option to accept ANSI C

configure:2817: /obj/gcc/./gcc/xgcc
    -B/obj/gcc/./gcc/
    -B/usr/local/i586-pc-msdosdjgpp/bin/
    -B/usr/local/i586-pc-msdosdjgpp/lib/
    -isystem /usr/local/i586-pc-msdosdjgpp/include
    -isystem /usr/local/i586-pc-msdosdjgpp/sys-include
     -c -O2 -g -g -O2    conftest.c>&5

What do people think should be done?

 - nothing 
  users should use -with-headers or restructure/copy/link
  the headers to fit the search

 - patch gcc to look in sys-root/include instead of or
   in addition to sys-root/usr/include, perhaps only for
   djgpp (yes, I see the years-old post where someone
   essentially asked for this for all platforms)

 - restructure djgpp to use djgpp/usr/include in place
   of djgpp/include; unlikely; native system shouldn't
   change to cater to cross builds; could change the cross
   compilation packages though 


I think #2 patch gcc.
A very small change.
In general I don't want to invent file system layouts if
there is already an existing convention or default.
This seems like disagreement of two conventions.

djgpp's native environment being DOS, it makes up its own
very reasonable and shorter standard include path, which
is /include and not /usr/include.

Gcc configuration for cross builds changed at some point (4.x?)
and assumes a more Unixy layout.

Maybe this belongs in djgpp-workers?

 - Jay

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019