2009-08-17 10:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
 * config/global.mk
   + Implemented win/mingw cross-tool autodetection.
     Based on the logic found in make_gnu_xmingwce.sh. It's not
     exactly the same, because I used HB_CCPATH and HB_CCPREFIX
     only. There is no fiddling with the PATH f.e. This may cause
     problems on some systems, but I couldn't understand the intent
     behind every logic (and host environments) in the old script.
     F.e. I left out dealing with 'TARGET' variable completely,
     including just recently added manual override. If they are
     needed with the new system, hopefully we can implement it in
     some ways.
     Please test. If this works out good, the two launcher scripts
     are no longer necessary.

When I try to run ./make_gnu_xmingwce.sh i have:

make[3]: /opt/mingw32ce/bin:arm-wince-mingw32ce-gcc: Command not found
  make[3]: *** [expropt1.o] Error 127
  make[2]: *** [descend] Error 2
  make[1]: *** [common.inst] Error 2

I'll fix it because it to keep working hb* scripts.

Thank you.

Here I do not think that moving the corssbuild logic inside make files
it's very good idea. It always needs setting some additional variable
setting and usually for users it's easier to adopt .sh script then editing
make files.

I don't see why they would need to edit any make files.

If there is a setting which needs to be controlled by users
we can provide it through envvars or VAR=VALUE make
parameters.

The goal of course would be to require the least amount of
such settings.

The only such remaining TODO is to autocheck /opt/mingw32ce/bin
for wce cross-builds. Of course unless I missed some bits which
may need to be fixed and cannot be covered by existing means,
which may happen.

But if everything fits, make_gnu_xmingwce.sh content can be
replaced by single call 'make $* HB_ARCHITECTURE=wce' (or
better be dropped), and make_gnu_xmingw.sh by 'make $* HB_ARCHITECTURE=win'.

With some more work this syntax could be made working for
Windows hosts too, and to also autodetect win watcom
compiler (even on OS/2 or DOS), creating a more coherent
feel. Cross compilation is wider topic than just mingw[arm]
on *nix.

Maybe it's time to create a cross-build matrix to document
all supported cross build combinations.

If we don't rely anymore heavily on manual HB_COMPILER and
HB_ARCHITECTURE settings, I also plan to rename the latter
to HB_PLATFORM. (or maybe to short versions HB_COMP and HB_PLAT).

I also found this in global.sh
# HB_HOST_BUILD [yes|all|lib] -> HB_BUILD_LIBONLY (rest is redundant and can be controlled by other means)

It's not redundant and it's used for cross building, i.e. HB_HOST_BUILD=yes
is used to create native harbour and hbpp binaries before build
process is executed to create cross libraries.
It's used by to create RPMs with WIN and WINCE cross builds so they
can be created without preinstalled harbour native binaries because
they are created online so it's guarantied that they are synced with
compiled code.

Okay I see now. I'll update the comment, maybe a more descriptive
name could be found for this setting tough, I'll think about it,
for the time being it's okay as is.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to