On Oct 4, 2009, at 12:13 PM, Viktor Szakáts wrote:

Hi Teo,

On Oct 4, 2009, at 11:23 AM, Teo Fonrouge wrote:

Hello [Victor],


Sorry, the name is Viktor, my stupid typo.

No prob, Victor is also fine :)

May be I overlooked something, but I'm unable to find an easy way (I want to use some flag parameter to the make command) to build the Harbour libs as i386 ones.

for i386 only:

export HB_USER_LDFLAGS=-arch i386
export HB_USER_CFLAGS=$(HB_USER_LDFLAGS)
export HB_COMPILER=gcc

or, for 10.5 Leopard Unibin:

export HB_USER_LDFLAGS=-arch i386 -arch ppc
export HB_USER_CFLAGS=$(HB_USER_LDFLAGS)
export HB_COMPILER=gcc

You can combine any -arch flags below:
-arch i386
-arch x86_64
-arch ppc
-arch ppc64

I've tried the above to no avail. The following error shows (make clean was made before):

<output>
gcc -I. -I../../../../../include -fno-common -Wall -W -O3 -o hbpp.o -c ../../../hbpp.c gcc -fno-common -Wall -W -O3 -o ../../../../../bin/darwin/gcc/hbpp hbpp.o -L../../../../../lib/darwin/gcc -arch -lhbnortl -lhbcommon -lm
gcc-4.2: Invalid arch name : -lhbnortl
make[3]: *** [hbpp] Error 1
rm hbpp.o
make[2]: *** [descend] Error 2
make[1]: *** [pp] Error 2
make: *** [source] Error 2
</output>

However, I have already managed to successfully build i386 libraries by modifying the HB_CMP variable on the config/darwin/gcc.mk file:

from:
HB_CMP := gcc

to:
HB_CMP := gcc -arch i386


So, what about to have an HB_ARCH flag in the following form in the .mk file:

ifneq($(HB_ARCH),)
        HB_CMP += -arch $(HB_ARCH)
endif

So we simply we need to do:

export HB_ARCH=i386 ;



[ 'export HB_COMPILER=gcc' is needed on Snow Leopard
only to force gcc, since the default is clang there,
and clang doesn't support PPC arch anymore. ]

clang compiler is fine here.

I've already created i386 libraries from object files from this compiler.


BTW: You have done a fantastic work here simplifying the process to build harbour in almost *every* platform, my sincere congrats.


best regards,

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

Reply via email to