[Freemint-list] When cross compiling native gcc, 'include-fixed' contains stuff from /usr

Miro Kropáček miro.kropacek at gmail.com
Mon Sep 25 01:25:37 MSD 2017


On 24 September 2017 at 22:11, Thorsten Otto <admin at tho-otto.de> wrote:

> Does that also happen when you build only the cross-compiler, or only when
> yo
> build the native compiler with that?

Native compiler only. It doesn't matter whether I build it along with the
cross compiler or just as a standalone Canadian cross
<https://en.wikipedia.org/wiki/Cross_compiler#Canadian_Cross>, it's
actually more or less the same process.


> The include-fixed directory should only contain fixed headers from your
> target specific include directory, but not from your build system.
>
I think that --prefix=/usr confuses the script to think that I am really
installing a system compiler even though --host and --target say otherwise.

Btw, not all files from /usr/include are "fixed", it's about 20 files.
Still it takes tens of seconds to scan and generally speaking it's really
annoying.

On 24 September 2017 at 17:53, Vincent Rivière <vincent.riviere at freesbee.fr>
 wrote:

- What happens on Linux, when compiling native GCC for Linux? If /usr is
> copied as you describe for MiNT, include-fixed should become full of mess,
> while I'm pretty sure it does not happen.
>
It's rather strange, isn't it? We're compiling more or less the same gcc
(7.x) and yet our mint target decides the headers must be fixed. I'll take
a closer look today. Maybe it's really as Thorsten suggests, when building
a compiler with --prefix=/usr, your /usr should contain anything
user-specific but that sounds like a really dumb rule.

- I'm pretty sure that fixincludes is not used at all on Linux. Because
> fixincludes is only required when GCC uses the includes of an old compiler.
> While on Linux, GCC is the only compiler, and by design the headers in
> /usr/include are already compatible with GCC.
> And it should be the same on MiNT.


> - Originally, I did't enable fixincludes for the m68k-atari-mint target.
> But, as Alan pointed me, <syslimits.h> was not properly installed. So I
> enabled fixincludes for MiNT. See there:
> https://github.com/freemint/m68k-atari-mint-gcc/commit/
> 9835ac6ff1955daf699008cc5f8d70bd17286346
> That commit is a bit messy, only the bottom part about
> gcc/config/m68k/t-mint is relevant.
>
Isn't t this contradicting each other? From your explanation above I'd say
we do need fixing then. :)

- So my advice would be to disable fixincludes, and make the whole GCC
> compilation work fine without that. That might require some fixes in the
> MiNTLib headers.
>
It's not that the compilation files, it's just prolonging the build + I
have to rm -rf it manually.

- On the other hand, maybe the solution is just to use --with-headers, with
> the contents of the missing mintlib-headers package. I'm not sure how that
> combines with the fixincludes stuff.
>
Will experiment, thanks for all your suggestions!

-- 
MiKRO / Mystic Bytes
http://mikro.atari.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.atariforge.org/pipermail/freemint-list/attachments/20170925/9bdd32a0/attachment-0001.html 


More information about the Freemint-list mailing list