Hello All!

On Wed, May 30, 2012 at 9:10 AM, xunxun <[email protected]> wrote:
> 于 2012/5/30 21:10, Ruben Van Boxem 写道:
>
> 2012/5/30 xunxun <[email protected]>
>>
>> 于 2012/5/30 20:55, Ruben Van Boxem 写道:
>>
>>> Hmm... it seems like it's looking in my --prefix or --sysroot directory.
>>> The MinGW;org version would only work if you installed it in C:\MinGW or are
>>> using MSYS.
>>>
>>> I unfortunately do not know where this search path is hardcoded in GCC.
>>> JonY or ktietz or anyone else: do you know where I could make this path
>>> relative in GCC?
>>
>> I think it's related with the --sysroot, which can hardcode the path.
>>
>> When I don't use --sysroot, specs will be in default path.
>>
>> But if using cross compiling, --sysroot should be a prerequisite option.
>
>
> OK, so a native compiler might do without. I still think this should be
> changed to respect sysroot. I hope someone knows where to look :)
>
> Ruben

For what it's worth, I saw an issue with bogus hard-coded paths in an
old version of mingw-w64.

When I first tried mingw-w64 I downloaded:

   mingw-w64-bin_i686-mingw_20091231.zip

and I couldn't really get it to work correctly.

From my notes at the time:

   directory hierarchy and hard-coded specs seem out of sync.
   i couldn't find a single clean way to fix this, and i couldn't
   see how to put the top-level g++ -B options in the specs file.

(The directory hierarchy being that produce by unzipping the
zip file.)

I was able to compile a test program by invoking g++ with "-B"
options:

   C:\mingw-w64-bin_i686-mingw_20091231\mingw\bin\g++.exe -specs
gspecs.txt -static-libgcc
      -B C:\mingw-w64-bin_i686-mingw_20091231\mingw\bin\
      -B C:\mingw-w64-bin_i686-mingw_20091231\mingw\lib\
      -B 
C:\mingw-w64-bin_i686-mingw_20091231\libexec\gcc\x86_64-w64-mingw32\4.5.0\
      gtest.cpp -o gtest

(Note that "-specs gspecs.txt" worked for me with that version of g++,
in contrast to the original poster's use of "=" instead of a space, e.g.,
"-specs=gspecs.txt".)

I have no idea whether this is related to the current problem, but there
is historical precedent of mingw-w64 having munged hard-coded paths.

Best.


K. Frank

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to