Re: [dev] [scc] typeof is a gcc keyword

From: S. Gilles <sgilles_AT_math.umd.edu>
Date: Tue, 5 Jul 2016 15:12:32 -0400

On 2016-07-05T16:00:11-0300, Marc Collin wrote:
> > I don't think this does what you expect it to do. At least looking at
> > the 8cc makefile, the compiler is hardcoded as `cc', not the expansion
> > of the variable `cc'.
>
> You are right.
> But the CC flag is accepted.
> Try "make CC=clang" and it will work.

Excellent. Make moves in mysterious ways, its wonders to perform.

> But "make CC=../1c/8cc" fails. Any idea how to use relative paths like that?

Stick a $(pwd) in there, as in

    make CC=$(pwd)/../1c/8cc

? That blows up for me because of the CFLAGS, but at least it seems
like a step towards doing what you want.

> > On my system, the resulting binaries include references to the path they were compiled at.
>
> That could be the reason then.
> Let's try to test on the same absolute paths.

I'm not entirely sure that that the paths are the only environmental
pollutants in the result (in particular, I suspect the system time might
make its way in somehow, though I have very little evidence to support
this). There's a lot of confusing hype around `reproducible builds',
but the `Tips & help' section of http://reproducible-builds.org/docs/
might be useful. Your script will be able to ignore things like Locales
or Time zones, of course, since the machine will be constant.

-- 
S. Gilles
Received on Tue Jul 05 2016 - 21:12:32 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 05 2016 - 21:24:13 CEST