Hi,

One thing is not clear for me. What are these switches 
doing on non-Intel systems?

Next thing to decide is how to control this matter, 
because if you say that hbmk2 should automatically 
add -m64 as linker option, it means we're converting 
-m* switches to hbmk2 ones, and in this case I'm not 
sure it's the best thing to do. We already have 
-plat switch to choose these kind of things for win/wce 
platform, but it's not very good either, so maybe its 
time to introduce new -cpu switch. This however seems to 
need more serious redesign of autodetection code in hbmk2 
and possibly in GNU Make system (and probably more).

So for now, to avoid that, the best shortcut is to 
simply parse HB_USER_CFLAGS for -m64/-m32 and make 
some internal decisions based on that. It cannot be 
done in very clean way, but at least I don't have to 
rewrite the whole thing before release. In this 
scenario it's users job to pass this switch to 
HB_USER_LDFLAGS also (but is this really required?, 
cannot the linker automatically detect the target 
arch based on input files?).

The other remaining thing to see, is how this thing 
works on other *nix platforms? bsd for example, or 
even darwin.

On darwin / clang and gcc it seems to work similarly 
to Linux, but I did only try on Snow Leopard / Intel.

[ PCC would really be interesting here, but I deleted 
XCode from my old machine just recently. ]

Brgds,
Viktor

On 2009 Dec 4, at 22:32, Przemysław Czerpak wrote:

> Hi Viktor,
> 
> In most of 64 bit Linux systems where hardware allow to execute 32 and
> 64 bit binaries default library directories for native 64 bit libraries
> are /lib64 and /usr/lib64.
> /lib and /usr/lib also exists but they are used for 32 bit libraries.
> HBMK2 executed from /usr/bin by default choose /usr/lib/harbour so it
> does not work with Harbour builds using default library directories.
> 
> The directory autodetection code in HBMK2 have to be changed and it
> should look for harbour libraries in /usr/lib64/harbour and then if
> they do not exist chose /usr/lib/harbour. It will be nice to enable
> such order only for 64 bit system and revert it for 32 bit ones but
> it's not strictly necessary yet.
> 
> It will be also nice if it can recognize -m32 and -m64 C compiler
> switches (or some own new ones) used to force 32/64 bit builds
> adopting autodetection order and passing -m32 or -m64 as compile
> and link time parameter for GCC, ICC, SunCC. In all these compilers
> it's standard switch to force 32 or 64 bit mode.
> 
> best regards,
> Przemek
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to