For cross-compiling PPC-Binaries on an Intel-Mac (which Bennett and me
need to do to create universal binaries for release), I need to set
export CFLAGS="-arch ppc"
export CXXFLAGS="-arch ppc"
export LDFLAGS="$LDFLAGS -arch ppc"
and they automatically get passed to g++, libtool, etc. (and worked fine
for 1.5.5).
It still works for 1.6beta1, EXCEPT for the LinkBack part, where for one
or the other reason the above flags are not put it:
/bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src
-I./.. -I../../boost -DQT_NO_STL -DQT_NO_KEYWORDS
-I/Users/khofbaue/lyxdevel2/qt-4.4.0-install/include
-I/Users/khofbaue/lyxdevel2/qt-4.4.0-install/include/QtCore -Wextra -Wall
-I/System/Library/Frameworks/CoreFoundation.framework/Headers -g -O2 -MT
LinkBack.lo -MD -MP -MF .deps/LinkBack.Tpo -c -o LinkBack.lo `test -f
'linkback/LinkBack.m' || echo './'`linkback/LinkBack.m
gcc -DHAVE_CONFIG_H -I. -I../../src -I./.. -I../../boost -DQT_NO_STL
-DQT_NO_KEYWORDS -I/Users/khofbaue/lyxdevel2/qt-4.4.0-install/include
-I/Users/khofbaue/lyxdevel2/qt-4.4.0-install/include/QtCore -Wextra -Wall
-I/System/Library/Frameworks/CoreFoundation.framework/Headers -g -O2 -MT
LinkBack.lo -MD -MP -MF .deps/LinkBack.Tpo -c linkback/LinkBack.m -o LinkBack.o
There is no "-arch ppc", but there needs to be one. Without it, this
part is compiled to the i686 machine format (while everything else is in
ppc), which later results in the following error (because it tries to
mix ppc and intel code).:
ranlib: archive member: .libs/liblyxsupport.a(LinkBack.o) cputype (7) does not
match previous archive members cputype (18) (all members must match)
I see that the compiler calls for the LinkBack-Files are slightly
different to all the rest, but I do not quite understand that stuff.
Why is this happening, what sets LinkBack apart from the rest?
How do I pass the above flags also to the part where LinkBack is compiled?
Any hint appreciated!
Thanks a lot,
Konrad