On Tue, Aug 14, 2012 at 3:30 AM, Corinna Vinschen <vinsc...@redhat.com> wrote:
> Ping?
>
> On Aug  7 17:21, Corinna Vinschen wrote:
>> Hi,
>>
>>
>> there appears to be a bug in WITHSYSROOT and TARGET_SYSTEM_ROOT handling.
>>
>> WITHSYSROOT is always set, even if --with-sysroot is not given.  The
>> reason is that configure.ac sets with_sysroot to yes by default.
>> This should be changed, IMHO, since sysroot only makes sense if
>> sysroot is not / anyway.
>>
>> However, even if that's not changed, TARGET_SYSTEM_ROOT is set to
>> with_sysroot, which is set to $prefix/include by default.  That's kind
>> of weird.  Makefile.am sets sysinclude to -I@TARGET_SYSTEM_ROOT@/include,
>> which means, the resulting path is =I${prefix}/include/include.  I assume
>> that's not supposed to be...
>>
>> Patch suggestion below.
>>
>>
>> Corinna
>>
>>
>>       * configure.ac (sysroot): Default to no sysroot.  Set sysroot to
>>       $prefix since include is attahed in Makefile.am anyway.
>>
>>
>> Index: configure.ac
>> ===================================================================
>> --- configure.ac      (revision 5352)
>> +++ configure.ac      (working copy)
>> @@ -16,12 +16,12 @@
>>  AC_MSG_CHECKING([for sysroot])
>>  AC_ARG_WITH([sysroot],
>>    [AS_HELP_STRING([--with-sysroot=DIR],
>> -    [Search for headers within DIR/include (default: prefix/include)])],
>> +    [Search for headers within DIR/include (default: prefix)])],

Definitely a bug.  Good catch.

>>    [],
>> -  [AS_VAR_SET([with_sysroot],[yes])])
>> +  [AS_VAR_SET([with_sysroot],[no])])

For a long time, building with a sysroot was the default case.  To
build without one (ie, to use /usr/include) requires
--without-sysroot.  Is the consensus that that is no longer the
desired default?  That's a big change.

>>  AS_CASE([$with_sysroot],
>>    [no],[],
>> -  [yes],[AS_VAR_SET([with_sysroot],[$prefix/include])],
>> +  [yes],[AS_VAR_SET([with_sysroot],[$prefix])],
>>    [])
>>  AC_MSG_RESULT([$with_sysroot])
>>  
>> AS_VAR_IF([with_sysroot],[no],[],[AS_VAR_SET([TARGET_SYSTEM_ROOT],[$with_sysroot])])

Even if I agreed with the with-sysroot default, these should be
committed as two separate things.  So, approved for the /include bug.
We should talk about the with-sysroot default.  I'm interested to hear
what Ozkan and Ruben have to say.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to