[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] When referencing libchicken, take PROGRAM_
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [PATCH] When referencing libchicken, take PROGRAM_PREFIX into account |
Date: |
Thu, 17 May 2012 14:38:28 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, May 17, 2012 at 08:27:47AM -0400, Mario Domenech Goulart wrote:
> > I applied your patch, but it doesn't take into account PROGRAM_SUFFIX.
> > Also, turns out there are some problems when building a non-cross
> > compiler with prefix/suffix (not caused by your patch).
>
> Indeed. I overlooked PROGRAM_SUFFIX. I'll try to provide a patch which
> also takes PROGRAM_SUFFIX into account.
Excellent. I think this is simple enough to go into a new release, since
if it fixes the problem for you it will make cross-compilation work.
It didn't break anything that wasn't already broken. Fixing those other
already broken things should be postponed till after the release.
> > And TARGET_LIB_NAME in defaults.make is simply a hardcoded "chicken".
> > I started adding this to the system, but then I got horribly confused.
> > Shouldn't Chicken be using INSTALL_LIB_NAME when it isn't built as
> > a cross-compiler? ie, isn't it always in host-mode when you didn't
> > build as a cross compiler?
>
> I'm not sure about this part. I suppose tool names built for the target
> don't support prefixing/suffixing.
That's a bug then, since the build uses prefix/suffixes. If it's not
supported, that should be eliminated in normal host builds.
If it is supported, it should be fixed.
> > It should be generating a csc line like this:
> > compile="../$(PROGRAM_PREFIX)csc($PROGRAM_SUFFIX) -compiler $CHICKEN -v
> > -I.. -L.. -include-path .. -o a.out"
> > This would cause it to use the "beforecscafter" program.
>
> If that fixes the problem, it doesn't sound too complicated (hairy
> problems always start with a sentence like that :-)).
:)
> > PS: The README mentions a wiki page that does not exist (anymore):
> > http://wiki.call-cc.org/cross-compilation
> > I think that should be http://wiki.call-cc.org/manual/Cross%20development
> > or http://wiki.call-cc.org/man/4/Cross%20development or maybe it should
> > just refer to the shipped manual?
>
> It seems that master's README doesn't reference that page anymore. Are
> you looking at a README from some tarball (4.7.4 does mention the page
> that doesn't exist)?
I'm looking at 897684c785e9c50a7b2a615f2963511c9aba23ef, which is
the latest master (4.7.5).
> > Then release and *then* figure out this mess?
>
> Your plan sounds good to me. I can try to provide a patch to handle
> PROGRAM_SUFFIX too, so prefixing/suffixing would be supported for the
> cross compiler, but not for the native and target compilers.
Sounds good. Then we can file a Trac ticket so we don't forget about it.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth